Introducing KubernetesClientConfiguration.ClientCertificateKeyStoreFl… (#237)
* Introducing KubernetesClientConfiguration.ClientCertificateKeyStoreFlags to specify how private key is imported * Type-o
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
4d193e4c1c
commit
9bbe42201f
@@ -90,8 +90,16 @@ namespace k8s
|
||||
using (var pkcs = new MemoryStream())
|
||||
{
|
||||
store.Save(pkcs, new char[0], new SecureRandom());
|
||||
|
||||
if (config.ClientCertificateKeyStoreFlags.HasValue)
|
||||
{
|
||||
return new X509Certificate2(pkcs.ToArray(), "", config.ClientCertificateKeyStoreFlags.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new X509Certificate2(pkcs.ToArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,11 @@ namespace k8s
|
||||
/// </summary>
|
||||
public string ClientCertificateFilePath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ClientCertificate KeyStoreFlags to specify where and how to import the certificate private key
|
||||
/// </summary>
|
||||
public X509KeyStorageFlags? ClientCertificateKeyStoreFlags { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets ClientCertificate Key filename
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user