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:
Frode Hus
2021-10-20 15:51:58 +02:00
committed by GitHub
parent 2d8915dff7
commit 73d8e99d2a
4 changed files with 40 additions and 10 deletions

View File

@@ -57,6 +57,7 @@ namespace k8s
ValidateConfig(config);
CaCerts = config.SslCaCerts;
SkipTlsVerify = config.SkipTlsVerify;
ClientCert = CertUtils.GetClientCert(config);
SetCredentials(config);
}
@@ -133,7 +134,7 @@ namespace k8s
}
private X509Certificate2Collection CaCerts { get; }
private X509Certificate2 ClientCert { get; }
private bool SkipTlsVerify { get; }
partial void CustomInitialize()
@@ -262,6 +263,8 @@ namespace k8s
};
}
/// <summary>
/// Set credentials for the Client
/// </summary>