Add missing client cert (#729)
* Updated GitVersioning package to fix issue with loading native libgit lib. Added check for missing HttpClientHandler * fixed type * HttpClientHandler is null when trying to get client certificates for web socket connection. Added direct configuration of client cert instead of via HttpClientHandler * fixed indentation warning * re-added certs from httpclienthandler if present * Updated GitVersioning package to fix issue with loading native libgit lib. Added check for missing HttpClientHandler * fixed type * HttpClientHandler is null when trying to get client certificates for web socket connection. Added direct configuration of client cert instead of via HttpClientHandler * fixed indentation warning * re-added certs from httpclienthandler if present * merged duplicate code * reverted package changes
This commit is contained in:
@@ -295,9 +295,17 @@ namespace k8s
|
||||
}
|
||||
|
||||
// Set Credentials
|
||||
foreach (var cert in this.HttpClientHandler.ClientCertificates.OfType<X509Certificate2>())
|
||||
if (this.ClientCert != null)
|
||||
{
|
||||
webSocketBuilder.AddClientCertificate(cert);
|
||||
webSocketBuilder.AddClientCertificate(this.ClientCert);
|
||||
}
|
||||
|
||||
if (this.HttpClientHandler != null)
|
||||
{
|
||||
foreach (var cert in this.HttpClientHandler.ClientCertificates.OfType<X509Certificate2>())
|
||||
{
|
||||
webSocketBuilder.AddClientCertificate(cert);
|
||||
}
|
||||
}
|
||||
|
||||
if (Credentials != null)
|
||||
|
||||
Reference in New Issue
Block a user