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,7 +90,15 @@ namespace k8s
|
|||||||
using (var pkcs = new MemoryStream())
|
using (var pkcs = new MemoryStream())
|
||||||
{
|
{
|
||||||
store.Save(pkcs, new char[0], new SecureRandom());
|
store.Save(pkcs, new char[0], new SecureRandom());
|
||||||
return new X509Certificate2(pkcs.ToArray());
|
|
||||||
|
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>
|
/// </summary>
|
||||||
public string ClientCertificateFilePath { get; set; }
|
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>
|
/// <summary>
|
||||||
/// Gets ClientCertificate Key filename
|
/// Gets ClientCertificate Key filename
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user