{"action":"created","issue":{"url":"https://api.github.com/repos/netty/netty/issues/5177","repository_url":"https://api.github.com/repos/netty/netty","labels_url":"https://api.github.com/repos/netty/netty/issues/5177/labels{/name}","comments_url":"https://api.github.com/repos/netty/netty/issues/5177/comments","events_url":"https://api.github.com/repos/netty/netty/issues/5177/events","html_url":"https://github.com/netty/netty/pull/5177","id":151029544,"number":5177,"title":"Improve client SNI in testSniWithApnHandler","user":{"login":"sunrenjie","id":2578274,"avatar_url":"https://avatars.githubusercontent.com/u/2578274?v=3","gravatar_id":"","url":"https://api.github.com/users/sunrenjie","html_url":"https://github.com/sunrenjie","followers_url":"https://api.github.com/users/sunrenjie/followers","following_url":"https://api.github.com/users/sunrenjie/following{/other_user}","gists_url":"https://api.github.com/users/sunrenjie/gists{/gist_id}","starred_url":"https://api.github.com/users/sunrenjie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunrenjie/subscriptions","organizations_url":"https://api.github.com/users/sunrenjie/orgs","repos_url":"https://api.github.com/users/sunrenjie/repos","events_url":"https://api.github.com/users/sunrenjie/events{/privacy}","received_events_url":"https://api.github.com/users/sunrenjie/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/netty/netty/labels/defect","name":"defect","color":"e11d21"}],"state":"open","locked":false,"assignee":{"login":"Scottmitch","id":7562868,"avatar_url":"https://avatars.githubusercontent.com/u/7562868?v=3","gravatar_id":"","url":"https://api.github.com/users/Scottmitch","html_url":"https://github.com/Scottmitch","followers_url":"https://api.github.com/users/Scottmitch/followers","following_url":"https://api.github.com/users/Scottmitch/following{/other_user}","gists_url":"https://api.github.com/users/Scottmitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Scottmitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Scottmitch/subscriptions","organizations_url":"https://api.github.com/users/Scottmitch/orgs","repos_url":"https://api.github.com/users/Scottmitch/repos","events_url":"https://api.github.com/users/Scottmitch/events{/privacy}","received_events_url":"https://api.github.com/users/Scottmitch/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/netty/netty/milestones/141","html_url":"https://github.com/netty/netty/milestones/4.0.37.Final","labels_url":"https://api.github.com/repos/netty/netty/milestones/141/labels","id":1682502,"number":141,"title":"4.0.37.Final","description":"","creator":{"login":"normanmaurer","id":439362,"avatar_url":"https://avatars.githubusercontent.com/u/439362?v=3","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"open_issues":59,"closed_issues":48,"state":"open","created_at":"2016-04-04T16:35:57Z","updated_at":"2016-05-01T08:06:43Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2016-04-26T03:12:07Z","updated_at":"2016-05-01T14:10:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/netty/netty/pulls/5177","html_url":"https://github.com/netty/netty/pull/5177","diff_url":"https://github.com/netty/netty/pull/5177.diff","patch_url":"https://github.com/netty/netty/pull/5177.patch"},"body":"Motivations\r\nThe test SniHandlerTest#testSniWithApnHandler() does not actually\r\ninvolve SNI: given the client setup, the ClientHello in the form of hex\r\nstrings is not actually written to the wire, so the server never receives that.\r\nWe may need to write in somewhere else (e.g., channelActive()) instead of in\r\ninitChannel() in order for the hex strings to reach the server. So here\r\nwhat's actually going on is an ordinary TLS C/S communication without SNI.\r\n\r\nModifications\r\nThe client part is modified to enable SNI by using an SslHandler with an\r\nSSLEngine created by io.netty.handler.ssl.SslContext#newEngine(), where\r\nthe server hostname is specified. Also, more clauses are added to verify that\r\nthe SNI is indeed successful.\r\n\r\nResults\r\nNow the test verifies that both SNI and APN actually happen and succeed."},"comment":{"url":"https://api.github.com/repos/netty/netty/issues/comments/216044056","html_url":"https://github.com/netty/netty/pull/5177#issuecomment-216044056","issue_url":"https://api.github.com/repos/netty/netty/issues/5177","id":216044056,"user":{"login":"normanmaurer","id":439362,"avatar_url":"https://avatars.githubusercontent.com/u/439362?v=3","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"created_at":"2016-05-01T14:10:45Z","updated_at":"2016-05-01T14:10:45Z","body":"Ok cool let me merge"}}