{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/29703","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/29703/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/29703/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/29703/events","html_url":"https://github.com/dotnet/corefx/issues/29703","id":323058689,"number":29703,"title":"[HttpClient] SSL Idn decode failure","user":{"login":"abk-x","id":3858449,"avatar_url":"https://avatars0.githubusercontent.com/u/3858449?v=4","gravatar_id":"","url":"https://api.github.com/users/abk-x","html_url":"https://github.com/abk-x","followers_url":"https://api.github.com/users/abk-x/followers","following_url":"https://api.github.com/users/abk-x/following{/other_user}","gists_url":"https://api.github.com/users/abk-x/gists{/gist_id}","starred_url":"https://api.github.com/users/abk-x/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abk-x/subscriptions","organizations_url":"https://api.github.com/users/abk-x/orgs","repos_url":"https://api.github.com/users/abk-x/repos","events_url":"https://api.github.com/users/abk-x/events{/privacy}","received_events_url":"https://api.github.com/users/abk-x/received_events","type":"User","site_admin":false},"labels":[{"id":497898703,"url":"https://api.github.com/repos/dotnet/corefx/labels/area-System.Net.Http","name":"area-System.Net.Http","color":"d4c5f9","default":false},{"id":145399955,"url":"https://api.github.com/repos/dotnet/corefx/labels/bug","name":"bug","color":"207de5","default":true},{"id":205613977,"url":"https://api.github.com/repos/dotnet/corefx/labels/os-linux","name":"os-linux","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-05-15T04:00:16Z","updated_at":"2018-05-15T16:03:13Z","closed_at":null,"author_association":"NONE","body":"The following produces an exception:\r\n\r\n```c#\r\nusing System.Net.Http;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace test\r\n{\r\n    class Program\r\n    {\r\n        static void Main(string[] args)\r\n        {\r\n            HttpClient client = new HttpClient();\r\n            var _ = client.GetAsync(\"https://r6---sn-uxanug5-hxay.gvt1.com/test/\").Result;\r\n\r\n        }\r\n    }\r\n}\r\n```\r\n\r\nStacktrace:\r\n```\r\nUnhandled Exception: System.AggregateException: One or more errors occurred. (The SSL connection could not be established, see inner exception.) ---> System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception. ---> System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception. ---> System.ArgumentException: Decoded string is not a valid IDN name.\r\nParameter name: unicode\r\n   at System.Globalization.IdnMapping.GetAsciiCore(String unicodeString, Char* unicode, Int32 count)\r\n   at System.Globalization.IdnMapping.GetAscii(String unicode, Int32 index, Int32 count)\r\n   at Interop.OpenSsl.AllocateSslContext(SslProtocols protocols, SafeX509Handle certHandle, SafeEvpPKeyHandle certKeyHandle, EncryptionPolicy policy, SslAuthenticationOptions sslAuthenticationOptions)\r\n   at System.Net.Security.SafeDeleteSslContext..ctor(SafeFreeSslCredentials credential, SslAuthenticationOptions sslAuthenticationOptions)\r\n   at System.Net.Security.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, SslAuthenticationOptions sslAuthenticationOptions)\r\n   --- End of inner exception stack trace ---\r\n   at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, ExceptionDispatchInfo exception)\r\n   at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)\r\n   at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)\r\n   at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)\r\n   at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)\r\n   at System.Net.Security.SslStream.BeginAuthenticateAsClient(SslClientAuthenticationOptions sslClientAuthenticationOptions, CancellationToken cancellationToken, AsyncCallback asyncCallback, Object asyncState)\r\n   at System.Net.Security.SslStream.<>c.<AuthenticateAsClientAsync>b__47_0(SslClientAuthenticationOptions arg1, CancellationToken arg2, AsyncCallback callback, Object state)\r\n   at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl[TArg1,TArg2](Func`5 beginMethod, Func`2 endFunction, Action`1 endAction, TArg1 arg1, TArg2 arg2, Object state, TaskCreationOptions creationOptions)\r\n   at System.Threading.Tasks.TaskFactory.FromAsync[TArg1,TArg2](Func`5 beginMethod, Action`1 endMethod, TArg1 arg1, TArg2 arg2, Object state, TaskCreationOptions creationOptions)\r\n   at System.Threading.Tasks.TaskFactory.FromAsync[TArg1,TArg2](Func`5 beginMethod, Action`1 endMethod, TArg1 arg1, TArg2 arg2, Object state)\r\n   at System.Net.Security.SslStream.AuthenticateAsClientAsync(SslClientAuthenticationOptions sslClientAuthenticationOptions, CancellationToken cancellationToken)\r\n   at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)\r\n   --- End of inner exception stack trace ---\r\n   at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)\r\n   at System.Threading.Tasks.ValueTask`1.get_Result()\r\n   at System.Net.Http.HttpConnectionPool.CreateConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)\r\n   at System.Threading.Tasks.ValueTask`1.get_Result()\r\n   at System.Net.Http.HttpConnectionPool.WaitForCreatedConnectionAsync(ValueTask`1 creationTask)\r\n   at System.Threading.Tasks.ValueTask`1.get_Result()\r\n   at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)\r\n   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\r\n   at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)\r\n   --- End of inner exception stack trace ---\r\n   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)\r\n   at test.Program.Main(String[] args) in /tmp/test/Program.cs:line 18\r\n```\r\n## Additional Info\r\n```\r\n$ dotnet --info\r\n.NET Core SDK (reflecting any global.json):\r\n Version:   2.1.300-rc1-008673\r\n Commit:    f5e3ddbe73\r\n\r\nRuntime Environment:\r\n OS Name:     debian\r\n OS Version:  \r\n OS Platform: Linux\r\n RID:         debian-x64\r\n Base Path:   /usr/share/dotnet/sdk/2.1.300-rc1-008673/\r\n\r\nHost (useful for support):\r\n  Version: 2.1.0-rc1\r\n  Commit:  eb9bc92051\r\n\r\n.NET Core SDKs installed:\r\n  2.1.300-rc1-008673 [/usr/share/dotnet/sdk]\r\n\r\n.NET Core runtimes installed:\r\n  Microsoft.AspNetCore.All 2.1.0-rc1-final [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]\r\n  Microsoft.AspNetCore.App 2.1.0-rc1-final [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]\r\n  Microsoft.NETCore.App 2.1.0-rc1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]\r\n```\r\n\r\n[EDIT] Add C# syntax highlighting by @karelz"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/389221775","html_url":"https://github.com/dotnet/corefx/issues/29703#issuecomment-389221775","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/29703","id":389221775,"user":{"login":"karelz","id":5776068,"avatar_url":"https://avatars2.githubusercontent.com/u/5776068?v=4","gravatar_id":"","url":"https://api.github.com/users/karelz","html_url":"https://github.com/karelz","followers_url":"https://api.github.com/users/karelz/followers","following_url":"https://api.github.com/users/karelz/following{/other_user}","gists_url":"https://api.github.com/users/karelz/gists{/gist_id}","starred_url":"https://api.github.com/users/karelz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karelz/subscriptions","organizations_url":"https://api.github.com/users/karelz/orgs","repos_url":"https://api.github.com/users/karelz/repos","events_url":"https://api.github.com/users/karelz/events{/privacy}","received_events_url":"https://api.github.com/users/karelz/received_events","type":"User","site_admin":false},"created_at":"2018-05-15T16:03:13Z","updated_at":"2018-05-15T16:03:13Z","author_association":"MEMBER","body":"Here's the call:\r\nhttps://github.com/dotnet/corefx/blob/3f5d26c720503f143333f7e51a006c5976f2ee66/src/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs#L130\r\n\r\ncc @wfurt @stephentoub @geoffkizer "}}
{"actor":{"display_login":"karelz"}}