rajanadar / VaultSharp

A comprehensive cross-platform .NET Library for HashiCorp's Vault, a secret management tool

Home Page:http://rajanadar.github.io/VaultSharp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TLS authentication failed when using Tls13

samisil opened this issue · comments

The SSL connection could not be established, see inner exception.
Authentication failed because the remote party sent a TLS alert: 'HandshakeFailure'.
The message received was unexpected or badly formatted.

VaultSharp: 1.13.0.1
Windows 11

When using Tls12, it works fine.

Any way to configure VaultSharp http handler with "SslProtocols = System.Security.Authentication.SslProtocols.Tls12"?

I've handled it with HttpClient injection into VaultSharp. Very well documented.

var httpClientHandler = new HttpClientHandler { SslProtocols = System.Security.Authentication.SslProtocols.Tls12 };
var vaultClientSettings = new VaultClientSettings("https://HOST:PORT", authMethod)
{
MyHttpClientProviderFunc = handler => new HttpClient(httpClientHandler)
};