Skip to content

Commit

Permalink
RavenDB-22308 Throw meaningful exception when HttpMessageHandler does…
Browse files Browse the repository at this point in the history
…n't accept client certificates
  • Loading branch information
Lwiel authored and arekpalinski committed May 15, 2024
1 parent a717ade commit 8ed24c3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Raven.Client/Http/RequestExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2005,6 +2005,9 @@ public static HttpClientHandler CreateHttpMessageHandler(X509Certificate2 certif

if (certificate != null)
{
if (httpMessageHandler.ClientCertificates == null)
throw new NotSupportedException($"{typeof(HttpClientHandler)} does not support {nameof(httpMessageHandler.ClientCertificates)}. Setting the UseNativeHttpHandler property in project settings to false may solve the issue.");

httpMessageHandler.ClientCertificates.Add(certificate);
try
{
Expand Down

0 comments on commit 8ed24c3

Please sign in to comment.