[Mono-list] Mono 5 TLS 1.2 support not yet built-in???

Frédéric SOUCHU Frederic.SOUCHU at ingenico.com
Wed Jun 28 17:17:55 UTC 2017

I am running Mono on CentOS 6 (binaries downloaded from official Mono yum repo) and could not get a connection to TLS 1.2 servers.
The documentation says ‘since 4.8 TLS 1.2 is natively supported’ but I couldn’t get it to work.
What I am missing to get TLS 1.2 on Mono? Is the only option to recompile from sources???

How to reproduce:
$> export MONO_TLS_PROVIDER=legacy
$> csharp -e 'Console.WriteLine (new System.Net.WebClient ().DownloadString ("https://www.howsmyssl.com/")'
I get back a not so nice message:
Bad Your client is using TLS 1.0, which is very old, possibly susceptible to the BEAST attack, and doesn't have the best cipher suites available on it. Additions like AES-GCM, and SHA256 to replace MD5-SHA-1 are unavailable to a TLS 1.0 client as well as many more modern cipher suites.
Trying with the BoringTLS flag yields an even worse error:

Error: ConnectFailure (TLS Support not available.)
---> System.NotSupportedException: TLS Support not available.
---> System.NotSupportedException: No such TLS Provider: `btls'.
  at Mono.Net.Security.MonoTlsProviderFactory.LookupProviderType (System.String name, System.Boolean throwOnError) [0x00032] in <d2abb5dd463e4257bc4bb6c9614f73e7>:0
  at Mono.Net.Security.MonoTlsProviderFactory.LookupProvider (System.String name, System.Boolean throwOnError) [0x00000] in <d2abb5dd463e4257bc4bb6c9614f73e7>:0
  at Mono.Net.Security.MonoTlsProviderFactory.TryDynamicLoad () [0x00019] in <d2abb5dd463e4257bc4bb6c9614f73e7>:0
  at Mono.Net.Security.MonoTlsProviderFactory.CreateDefaultProviderImpl () [0x00000] in <d2abb5dd463e4257bc4bb6c9614f73e7>:0
  at Mono.Net.Security.MonoTlsProviderFactory.InitializeInternal () [0x0001a] in <d2abb5dd463e4257bc4bb6c9614f73e7>:0
   --- End of inner exception stack trace ---
  at Mono.Net.Security.MonoTlsProviderFactory.InitializeInternal () [0x0002e] in <d2abb5dd463e4257bc4bb6c9614f73e7>:0
  at Mono.Net.Security.MonoTlsProviderFactory.GetProviderInternal () [0x00010] in <d2abb5dd463e4257bc4bb6c9614f73e7>:0
  at Mono.Net.Security.MonoTlsStream..ctor (System.Net.HttpWebRequest request, System.Net.Sockets.NetworkStream networkStream) [0x00027] in <d2abb5dd463e4257bc4bb6c9614f73e7>:0
  at System.Net.WebConnection.CreateStream (System.Net.HttpWebRequest request) [0x00066] in <d2abb5dd463e4257bc4bb6c9614f73e7>:0
   --- End of inner exception stack trace ---
  at System.Net.WebClient.DownloadDataInternal (System.Uri address, System.Net.WebRequest& request) [0x00072] in <d2abb5dd463e4257bc4bb6c9614f73e7>:0
  at System.Net.WebClient.DownloadString (System.Uri address) [0x00020] in <d2abb5dd463e4257bc4bb6c9614f73e7>:0
  at System.Net.WebClient.DownloadString (System.String address) [0x00016] in <d2abb5dd463e4257bc4bb6c9614f73e7>:0
  at <InteractiveExpressionClass>.Host (System.Object& $retval) [0x00005] in <61903e49f3474c469d10aac989d2bbea>:0
  at Mono.CSharp.Evaluator.Evaluate (System.String input, System.Object& result, System.Boolean& result_set) [0x00038] in <26092501e18f4d6bbb84790c331dcb20>:0
  at Mono.CSharpShell.Evaluate (System.String input) [0x00000] in <9c2a1356e8c3450d8aa1583549a8198e>:0

System information:
Linux 2.6.32-642.1.1.el6.x86_64 #1 SMP Fri May 6 14:54:05 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux

Mono Version:
Mono JIT compiler version (2017-02/5077205 Wed May 24 13:08:40 UTC 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com<http://www.mono-project.com>
        TLS:           __thread
        SIGSEGV:       altstack
       Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            sgen (concurrent by default)


This email and its content belong to Ingenico Group. The enclosed information is confidential and may not be disclosed to any unauthorized person. If you have received it by mistake do not forward it and delete it from your system. Cet email et son contenu sont la propriété du Groupe Ingenico. L’information qu’il contient est confidentielle et ne peut être communiquée à des personnes non autorisées. Si vous l’avez reçu par erreur ne le transférez pas et supprimez-le.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dot.net/pipermail/mono-list/attachments/20170628/c8b53eda/attachment.html>

More information about the Mono-list mailing list