Mono 5.14.0 and TLS 1.2 "No such TLS Provider btls"

839 Views Asked by At

If I connect to an TLS 1.0 - 1.2 endpoint with a HttpClient and Mono 5.14.0 I get the exception "No such TLS Provider: btls."

No such TLS Provider: `btls'.
at Mono.Net.Security.MonoTlsProviderFactory.LookupProvider (System.String name, System.Boolean throwOnError)
as Mono.Net.Security.MonoTlsProviderFactory.CreateDefaultProviderImpl ()
at Mono.Net.Security.MonoTlsProviderFactory.InitializeInternal ()

If I change the TLS Provider to legacy I can only connect to an Endpoint with TLS 1.0, an Endpoint with TLS 1.0 - 1.2 doesn't work.

MONO_TLS_PROVIDER=legacy

I don't understand how the provider blts is unknown, since Mono 4.8.0 is the provider btls from the BoringSSL project included. see here.

If I take a look at MonoTlsProviderFactory.cs to understand this behavior, I stumble upon the line, which I don't understand.

internal extern static bool IsBtlsSupported ();

see here and there is the MONO_FEATURE_BTLS symbol which is a condition for btls. But How can I know if my Mono version is compiled with this symbol?

There are similar cases but with an older Mono version

0

There are 0 best solutions below