Skip to content

Commit 7b7fdbe

Browse files
authored
Recommend DownloadCertificate in getcert sample (Azure#23945)
Resolves Azure#22341
1 parent af038bf commit 7b7fdbe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sdk/keyvault/samples/getcert/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ description: Gets a full certificate including the private key from Azure Key Va
1414

1515
[Azure Key Vault certificates][azure-keyvault-certificates] are a great way to manage certificates. They allow you to set policies, automatically renew near-expiring certificates, and permit cryptographic operations with access to the private key. There are times, however, when you may want to download and use the entire certificate - including the private key - locally. You might have a legacy application, for example, that needs access to a key pair.
1616

17-
> [!NOTE]
17+
> [!CAUTION]
1818
> We recommend you keep cryptographic operations using the private key - including decryption, signing, and unwrapping - in Key Vault to minimize access to the private and mitigate possible breaches with a properly secured Key Vault.
1919
20+
> [!NOTE]
21+
> The functions `CertificateClient.DownloadCertificate` and `CertificateClient.DownloadCertificateAsync` were [added](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/keyvault/Azure.Security.KeyVault.Certificates/CHANGELOG.md#420-2021-06-15) in [Azure.Security.KeyVault.Certificates](https://www.nuget.org/packages/Azure.Security.KeyVault.Certificates/4.2.0) 4.2.0. Those new functions effectively replace this sample, though we have retained this sample that shows some best practices and to notify any developers redirected here of these new functions.
22+
2023
Key Vault stores the public key as a managed key but the entire key pair including the private key - if created or imported as exportable - as a [secret][azure-keyvault-secrets]. This example shows you how download the key pair and uses it to encrypt and decrypt a plain text message.
2124

2225
## Getting Started

0 commit comments

Comments
 (0)