Make use of Cert Flags if Set (#936)

This commit is contained in:
bootleg224
2022-09-20 16:09:15 -04:00
committed by GitHub
parent 9c9dc29b74
commit 8dd8a1eb6a

View File

@@ -95,10 +95,18 @@ namespace k8s
// see https://github.com/kubernetes-client/csharp/issues/737
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
if (config.ClientCertificateKeyStoreFlags.HasValue)
{
cert = new X509Certificate2(cert.Export(X509ContentType.Pkcs12), "", config.ClientCertificateKeyStoreFlags.Value);
}
else
{
cert = new X509Certificate2(cert.Export(X509ContentType.Pkcs12));
}
}
return cert;
#else