Repository navigation
[AutoPR azure-security-keyvault-certificates]-generated-from-SDK Generation - Java-6995116 #50976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ROHIT SINGHAL (rohitsinghal4u)
merged 12 commits into
main
from
sdkauto/azure-security-keyvault-certificates-6995116
Oct 27, 2026
+130
−34
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
4cbcda7
Configurations: 'specification/keyvault/data-plane/Certificates/tspc…
azure-sdk d5dafe6
Merge branch 'main' into sdkauto/azure-security-keyvault-certificates…
rohitsinghal4u fed2448
Use stable changelog version for certificates
singhalrohit4u c7671cf
Align certificates changelog header with beta package version
singhalrohit4u d847ca5
Merge branch 'main' into sdkauto/azure-security-keyvault-certificates…
rohitsinghal4u 98b24cf
Use stable 2026-04-01 Key Vault Certificates service version
singhalrohit4u 43d98a9
Merge branch 'main' into sdkauto/azure-security-keyvault-certificates…
rohitsinghal4u dad658a
Merge current Certificates PR main updates into local stable correction
singhalrohit4u 9532068
Prepare Key Vault Certificates 4.10.0 stable release for October 27
singhalrohit4u db20221
Update Key Vault live test recording assets for 2026-04-01
singhalrohit4u 7734142
Align Key Vault performance tests with stable Certificates version
singhalrohit4u 5989da7
Refresh stable Key Vault certificate merge recordings
singhalrohit4u File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 11 additions & 4 deletions
15
sdk/keyvault/azure-security-keyvault-certificates/CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
...ates/src/test/java/com/azure/security/keyvault/certificates/ImportCertificateFixture.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| package com.azure.security.keyvault.certificates; | ||
|
|
||
| import org.bouncycastle.cert.X509CertificateHolder; | ||
| import org.bouncycastle.cert.X509v3CertificateBuilder; | ||
| import org.bouncycastle.cert.jcajce.JcaX509CertificateConverter; | ||
| import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder; | ||
|
|
||
| import java.io.ByteArrayInputStream; | ||
| import java.io.ByteArrayOutputStream; | ||
| import java.nio.charset.StandardCharsets; | ||
| import java.security.KeyStore; | ||
| import java.security.MessageDigest; | ||
| import java.security.PrivateKey; | ||
| import java.security.cert.Certificate; | ||
| import java.security.cert.X509Certificate; | ||
| import java.time.Instant; | ||
| import java.util.Base64; | ||
| import java.util.Date; | ||
|
|
||
| final class ImportCertificateFixture { | ||
| private static final byte[] PKCS12; | ||
| private static final byte[] PEM; | ||
| private static final byte[] THUMBPRINT; | ||
|
|
||
| static { | ||
| try { | ||
| char[] password = "fakePasswordPlaceholder".toCharArray(); | ||
| KeyStore keyStore = KeyStore.getInstance("PKCS12"); | ||
| keyStore.load( | ||
| new ByteArrayInputStream(Base64.getDecoder().decode(FakeCredentialsForTests.FAKE_CERTIFICATE)), | ||
| password); | ||
| String alias = keyStore.aliases().nextElement(); | ||
| PrivateKey privateKey = (PrivateKey) keyStore.getKey(alias, password); | ||
| X509CertificateHolder original = new X509CertificateHolder(keyStore.getCertificate(alias).getEncoded()); | ||
|
|
||
| // Renew the existing fake test key with fixed validity dates to avoid expired fixtures and playback drift. | ||
| X509CertificateHolder renewed | ||
| = new X509v3CertificateBuilder(original.getIssuer(), original.getSerialNumber(), | ||
| Date.from(Instant.parse("2020-01-01T00:00:00Z")), Date.from(Instant.parse("2050-01-01T00:00:00Z")), | ||
| original.getSubject(), original.getSubjectPublicKeyInfo()) | ||
| .build(new JcaContentSignerBuilder("SHA256withRSA").build(privateKey)); | ||
| X509Certificate certificate = new JcaX509CertificateConverter().getCertificate(renewed); | ||
| keyStore.setKeyEntry(alias, privateKey, password, new Certificate[] { certificate }); | ||
| ByteArrayOutputStream output = new ByteArrayOutputStream(); | ||
| keyStore.store(output, password); | ||
| PKCS12 = output.toByteArray(); | ||
| Base64.Encoder encoder = Base64.getMimeEncoder(64, new byte[] { '\n' }); | ||
| PEM = ("-----BEGIN CERTIFICATE-----\n" + encoder.encodeToString(certificate.getEncoded()) | ||
| + "\n-----END CERTIFICATE-----\n-----BEGIN PRIVATE KEY-----\n" | ||
| + encoder.encodeToString(privateKey.getEncoded()) + "\n-----END PRIVATE KEY-----\n") | ||
| .getBytes(StandardCharsets.UTF_8); | ||
| THUMBPRINT = MessageDigest.getInstance("SHA-1").digest(certificate.getEncoded()); | ||
| } catch (Exception exception) { | ||
| throw new ExceptionInInitializerError(exception); | ||
| } | ||
| } | ||
|
|
||
| private ImportCertificateFixture() { | ||
| } | ||
|
|
||
| static byte[] getPkcs12() { | ||
| return PKCS12.clone(); | ||
| } | ||
|
|
||
| static byte[] getPem() { | ||
| return PEM.clone(); | ||
| } | ||
|
|
||
| static byte[] getThumbprint() { | ||
| return THUMBPRINT.clone(); | ||
| } | ||
| } |
3 changes: 1 addition & 2 deletions
3
sdk/keyvault/azure-security-keyvault-certificates/tsp-location.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| directory: specification/keyvault/data-plane/Certificates | ||
| commit: e054e0def9d5daed1819f447be9a8f05ebdf099f | ||
| commit: 569464e8c8b02ebd1b4d939f899508467528c696 | ||
| repo: Azure/azure-rest-api-specs | ||
| cleanup: true | ||
| additionalDirectories: | ||
| - specification/keyvault/data-plane/Certificates/common | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.