问题: 在这种情况下,私人密钥在机器中不可用,那么客户端身份验证如何工作?
以获取参考代码以获取pfx并导入证书:
secretBundle = await kvClientProvider.GetSecretAsync(secretUri, timeoutCancellation.Token).ConfigureAwait(false);
if (0 == string.CompareOrdinal(secretBundle.ContentType,
CertificateContentType.Pfx))
{
var exportedCertCollection = new X509Certificate2Collection();
exportedCertCollection.Import(Convert.FromBase64String(secretBundle.Value));
var cert = exportedCertCollection.Cast<X509Certificate2>().Single(sc => sc.HasPrivateKey);
return cert;
}