Bug 38502 - "newtls" unable to establish TLS connection
Summary: "newtls" unable to establish TLS connection
Alias: None
Product: Class Libraries
Classification: Mono
Component: Mono.Security ()
Version: master
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2016-02-05 16:53 UTC by Peter Nelson
Modified: 2016-02-10 19:09 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Peter Nelson 2016-02-05 16:53:51 UTC
I'm testing newtls as I need to make TLS 1.2 requests, however when newtls is enabled my request times out. I'm using the nightly packages provided as a Debian repo via "deb http://download.mono-project.com/repo/debian nightly main".

$ MONO_TLS_PROVIDER=oldtls csharp -r:System.Net.Http.dll
csharp> using System.Net;
csharp> var req = (HttpWebRequest)WebRequest.Create("https://google.com/");
csharp> var res = (HttpWebResponse)req.GetResponse();
csharp> res.StatusCode;

$ MONO_TLS_PROVIDER=newtls csharp -r:System.Net.Http.dll
csharp> using System.Net;
csharp> var req = (HttpWebRequest)WebRequest.Create("https://google.com/");
csharp> var res = (HttpWebResponse)req.GetResponse();
System.Net.WebException: The request timed out
  at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) <0x408d6170 + 0x00183> in <filename unknown>:0 
  at System.Net.HttpWebRequest.GetResponse () <0x408c76e0 + 0x00053> in <filename unknown>:0 
  at <InteractiveExpressionClass>.Host (System.Object& $retval) <0x408c75e0 + 0x0002f> in <filename unknown>:0 
  at Mono.CSharp.Evaluator.Evaluate (System.String input, System.Object& result, System.Boolean& result_set) <0x407a3040 + 0x000d6> in <filename unknown>:0 
  at Mono.CSharpShell.Evaluate (System.String input) <0x407a2f40 + 0x00053> in <filename unknown>:0 

$ mono --version
Mono JIT compiler version 4.3.3 (Nightly Thu Jan 21 19:49:38 UTC 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug 
	LLVM:          supported, not enabled.
	GC:            sgen
Comment 1 Aleksey Kliger 2016-02-10 19:09:11 UTC
Hi Peter,

Thanks for the bug report,  newtls is still a work in progress and not ready for casual use, and problems like this one are expected at this point.