This file contains 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
var vaultUri = new Uri("https://your-key-vault.vault.azure.net/"); | |
var credential = new AzureCliCredential(new AzureCliCredentialOptions | |
{ | |
TenantId = "your-aad-tenant-id" | |
}); | |
var keyClient = new KeyClient(vaultUri, credential); | |
var cryptoProviderFactory = new CryptoProviderFactory(); | |
cryptoProviderFactory.CustomCryptoProvider = new KeyVaultCryptoProvider(keyClient); |
This file contains 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
var vaultUri = new Uri("https://your-key-vault.vault.azure.net/"); | |
var credential = new AzureCliCredential(new AzureCliCredentialOptions | |
{ | |
TenantId = "your-aad-tenant-id" | |
}); | |
var certificateClient = new CertificateClient(vaultUri, credential); | |
static string GetKeyId(X509Certificate2 certificate) | |
{ |