{"action":"created","comment":{"url":"https://api.github.com/repos/openssl/openssl/pulls/comments/192196504","pull_request_review_id":124925549,"id":192196504,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjE5NjUwNA==","diff_hunk":"@@ -3466,6 +3466,25 @@ long ssl3_ctrl(SSL *s, int cmd, long larg, void *parg)\n         break;\n #endif                          /* !OPENSSL_NO_EC */\n     case SSL_CTRL_SET_TLSEXT_HOSTNAME:\n+#if 0\n+        /*\n+         * TODO(OpenSSL1.2) s->server is initially set based on the absence\n+         * of an accept method, and can be a false positive when a generic\n+         * SSL_METHOD is used.  We rely on the ability to set a (client)\n+         * SNI hostname before forcing 'client' status, as tested in\n+         * test_servername.c:client_setup_sni_before_state(), so this\n+         * block of code cannot be enabled until ABI-breaking changes\n+         * are permitted by release policy.\n+         */\n+        /*\n+         * This is the API to set what SNI a client requests; it makes no\n+         * sense for a server.\n+         */\n+        if (s->server) {\n+            SSLerr(SSL_F_SSL3_CTRL, SSL_R_SSL3_EXT_INVALID_SERVERNAME);\n+            return 0;","path":"ssl/s3_lib.c","position":20,"original_position":20,"commit_id":"457482bf56d2c37ebeb229ea3c6202584eb87902","original_commit_id":"457482bf56d2c37ebeb229ea3c6202584eb87902","user":{"login":"kaduk","id":1894506,"node_id":"MDQ6VXNlcjE4OTQ1MDY=","avatar_url":"https://avatars1.githubusercontent.com/u/1894506?v=4","gravatar_id":"","url":"https://api.github.com/users/kaduk","html_url":"https://github.com/kaduk","followers_url":"https://api.github.com/users/kaduk/followers","following_url":"https://api.github.com/users/kaduk/following{/other_user}","gists_url":"https://api.github.com/users/kaduk/gists{/gist_id}","starred_url":"https://api.github.com/users/kaduk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaduk/subscriptions","organizations_url":"https://api.github.com/users/kaduk/orgs","repos_url":"https://api.github.com/users/kaduk/repos","events_url":"https://api.github.com/users/kaduk/events{/privacy}","received_events_url":"https://api.github.com/users/kaduk/received_events","type":"User","site_admin":false},"body":"> The OpenSSL API is such that ```s->server``` is not meaningful in config functions.\r\n\r\nThe current one is, yes.  Perhaps it need not be, though (when we are permitted to make such breaking changes).  But I don't think there would be too much harm from just dropping the last commit, if I'm in the minority.  As a very far aside note, I've been pondering whether there is room to do a full-on API modernization for 1.2, making a new TLS structure and TLS_foo() public APIs that are free of historical cruft (such as this lack of meaning for ```s->server``` until the handshake begins).\r\n\r\nI could also do as you implicitly suggest, and defer this check until SSL_do_handshake(), if people want that, of course.","created_at":"2018-05-31T18:34:52Z","updated_at":"2018-05-31T18:34:53Z","html_url":"https://github.com/openssl/openssl/pull/6378#discussion_r192196504","pull_request_url":"https://api.github.com/repos/openssl/openssl/pulls/6378","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/openssl/openssl/pulls/comments/192196504"},"html":{"href":"https://github.com/openssl/openssl/pull/6378#discussion_r192196504"},"pull_request":{"href":"https://api.github.com/repos/openssl/openssl/pulls/6378"}},"in_reply_to_id":192189760},"pull_request":{"url":"https://api.github.com/repos/openssl/openssl/pulls/6378","id":191581044,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxNTgxMDQ0","html_url":"https://github.com/openssl/openssl/pull/6378","diff_url":"https://github.com/openssl/openssl/pull/6378.diff","patch_url":"https://github.com/openssl/openssl/pull/6378.patch","issue_url":"https://api.github.com/repos/openssl/openssl/issues/6378","number":6378,"state":"open","locked":false,"title":"Only store negotiated (not offered) SNI hostname in SSL_SESSION","user":{"login":"kaduk","id":1894506,"node_id":"MDQ6VXNlcjE4OTQ1MDY=","avatar_url":"https://avatars1.githubusercontent.com/u/1894506?v=4","gravatar_id":"","url":"https://api.github.com/users/kaduk","html_url":"https://github.com/kaduk","followers_url":"https://api.github.com/users/kaduk/followers","following_url":"https://api.github.com/users/kaduk/following{/other_user}","gists_url":"https://api.github.com/users/kaduk/gists{/gist_id}","starred_url":"https://api.github.com/users/kaduk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaduk/subscriptions","organizations_url":"https://api.github.com/users/kaduk/orgs","repos_url":"https://api.github.com/users/kaduk/repos","events_url":"https://api.github.com/users/kaduk/events{/privacy}","received_events_url":"https://api.github.com/users/kaduk/received_events","type":"User","site_admin":false},"body":"Fix a thread-safety issue from #4519 by only writing to the SSL_SESSION during non-resumption handshakes and only when SNI is negotiated.\r\n\r\nconst-ify a few interfaces that can trivially do so (in order to use one of them), and also leave a comment noting work that can only be done at an API-breaking release boundary.\r\n\r\n##### Checklist\r\n<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->\r\n- [x] documentation is added or updated\r\n- [ ] tests are added or updated\r\n","created_at":"2018-05-30T21:06:48Z","updated_at":"2018-05-31T18:34:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dfc0aceaf861d44d8a43e2ed7449f8b09eb583f5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/openssl/openssl/pulls/6378/commits","review_comments_url":"https://api.github.com/repos/openssl/openssl/pulls/6378/comments","review_comment_url":"https://api.github.com/repos/openssl/openssl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openssl/openssl/issues/6378/comments","statuses_url":"https://api.github.com/repos/openssl/openssl/statuses/457482bf56d2c37ebeb229ea3c6202584eb87902","head":{"label":"kaduk:sni","ref":"sni","sha":"457482bf56d2c37ebeb229ea3c6202584eb87902","user":{"login":"kaduk","id":1894506,"node_id":"MDQ6VXNlcjE4OTQ1MDY=","avatar_url":"https://avatars1.githubusercontent.com/u/1894506?v=4","gravatar_id":"","url":"https://api.github.com/users/kaduk","html_url":"https://github.com/kaduk","followers_url":"https://api.github.com/users/kaduk/followers","following_url":"https://api.github.com/users/kaduk/following{/other_user}","gists_url":"https://api.github.com/users/kaduk/gists{/gist_id}","starred_url":"https://api.github.com/users/kaduk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaduk/subscriptions","organizations_url":"https://api.github.com/users/kaduk/orgs","repos_url":"https://api.github.com/users/kaduk/repos","events_url":"https://api.github.com/users/kaduk/events{/privacy}","received_events_url":"https://api.github.com/users/kaduk/received_events","type":"User","site_admin":false},"repo":{"id":39841603,"node_id":"MDEwOlJlcG9zaXRvcnkzOTg0MTYwMw==","name":"openssl","full_name":"kaduk/openssl","owner":{"login":"kaduk","id":1894506,"node_id":"MDQ6VXNlcjE4OTQ1MDY=","avatar_url":"https://avatars1.githubusercontent.com/u/1894506?v=4","gravatar_id":"","url":"https://api.github.com/users/kaduk","html_url":"https://github.com/kaduk","followers_url":"https://api.github.com/users/kaduk/followers","following_url":"https://api.github.com/users/kaduk/following{/other_user}","gists_url":"https://api.github.com/users/kaduk/gists{/gist_id}","starred_url":"https://api.github.com/users/kaduk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaduk/subscriptions","organizations_url":"https://api.github.com/users/kaduk/orgs","repos_url":"https://api.github.com/users/kaduk/repos","events_url":"https://api.github.com/users/kaduk/events{/privacy}","received_events_url":"https://api.github.com/users/kaduk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kaduk/openssl","description":null,"fork":true,"url":"https://api.github.com/repos/kaduk/openssl","forks_url":"https://api.github.com/repos/kaduk/openssl/forks","keys_url":"https://api.github.com/repos/kaduk/openssl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaduk/openssl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaduk/openssl/teams","hooks_url":"https://api.github.com/repos/kaduk/openssl/hooks","issue_events_url":"https://api.github.com/repos/kaduk/openssl/issues/events{/number}","events_url":"https://api.github.com/repos/kaduk/openssl/events","assignees_url":"https://api.github.com/repos/kaduk/openssl/assignees{/user}","branches_url":"https://api.github.com/repos/kaduk/openssl/branches{/branch}","tags_url":"https://api.github.com/repos/kaduk/openssl/tags","blobs_url":"https://api.github.com/repos/kaduk/openssl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaduk/openssl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaduk/openssl/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaduk/openssl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaduk/openssl/statuses/{sha}","languages_url":"https://api.github.com/repos/kaduk/openssl/languages","stargazers_url":"https://api.github.com/repos/kaduk/openssl/stargazers","contributors_url":"https://api.github.com/repos/kaduk/openssl/contributors","subscribers_url":"https://api.github.com/repos/kaduk/openssl/subscribers","subscription_url":"https://api.github.com/repos/kaduk/openssl/subscription","commits_url":"https://api.github.com/repos/kaduk/openssl/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaduk/openssl/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaduk/openssl/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaduk/openssl/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaduk/openssl/contents/{+path}","compare_url":"https://api.github.com/repos/kaduk/openssl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaduk/openssl/merges","archive_url":"https://api.github.com/repos/kaduk/openssl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaduk/openssl/downloads","issues_url":"https://api.github.com/repos/kaduk/openssl/issues{/number}","pulls_url":"https://api.github.com/repos/kaduk/openssl/pulls{/number}","milestones_url":"https://api.github.com/repos/kaduk/openssl/milestones{/number}","notifications_url":"https://api.github.com/repos/kaduk/openssl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaduk/openssl/labels{/name}","releases_url":"https://api.github.com/repos/kaduk/openssl/releases{/id}","deployments_url":"https://api.github.com/repos/kaduk/openssl/deployments","created_at":"2015-07-28T15:18:41Z","updated_at":"2017-01-24T16:54:50Z","pushed_at":"2018-05-31T17:30:59Z","git_url":"git://github.com/kaduk/openssl.git","ssh_url":"git@github.com:kaduk/openssl.git","clone_url":"https://github.com/kaduk/openssl.git","svn_url":"https://github.com/kaduk/openssl","homepage":null,"size":146548,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openssl:master","ref":"master","sha":"5eb774324a14b03835020bb3ae2e1c6c92515db0","user":{"login":"openssl","id":3279138,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNzkxMzg=","avatar_url":"https://avatars2.githubusercontent.com/u/3279138?v=4","gravatar_id":"","url":"https://api.github.com/users/openssl","html_url":"https://github.com/openssl","followers_url":"https://api.github.com/users/openssl/followers","following_url":"https://api.github.com/users/openssl/following{/other_user}","gists_url":"https://api.github.com/users/openssl/gists{/gist_id}","starred_url":"https://api.github.com/users/openssl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openssl/subscriptions","organizations_url":"https://api.github.com/users/openssl/orgs","repos_url":"https://api.github.com/users/openssl/repos","events_url":"https://api.github.com/users/openssl/events{/privacy}","received_events_url":"https://api.github.com/users/openssl/received_events","type":"Organization","site_admin":false},"repo":{"id":7634677,"node_id":"MDEwOlJlcG9zaXRvcnk3NjM0Njc3","name":"openssl","full_name":"openssl/openssl","owner":{"login":"openssl","id":3279138,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNzkxMzg=","avatar_url":"https://avatars2.githubusercontent.com/u/3279138?v=4","gravatar_id":"","url":"https://api.github.com/users/openssl","html_url":"https://github.com/openssl","followers_url":"https://api.github.com/users/openssl/followers","following_url":"https://api.github.com/users/openssl/following{/other_user}","gists_url":"https://api.github.com/users/openssl/gists{/gist_id}","starred_url":"https://api.github.com/users/openssl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openssl/subscriptions","organizations_url":"https://api.github.com/users/openssl/orgs","repos_url":"https://api.github.com/users/openssl/repos","events_url":"https://api.github.com/users/openssl/events{/privacy}","received_events_url":"https://api.github.com/users/openssl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openssl/openssl","description":"TLS/SSL and crypto library","fork":false,"url":"https://api.github.com/repos/openssl/openssl","forks_url":"https://api.github.com/repos/openssl/openssl/forks","keys_url":"https://api.github.com/repos/openssl/openssl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openssl/openssl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openssl/openssl/teams","hooks_url":"https://api.github.com/repos/openssl/openssl/hooks","issue_events_url":"https://api.github.com/repos/openssl/openssl/issues/events{/number}","events_url":"https://api.github.com/repos/openssl/openssl/events","assignees_url":"https://api.github.com/repos/openssl/openssl/assignees{/user}","branches_url":"https://api.github.com/repos/openssl/openssl/branches{/branch}","tags_url":"https://api.github.com/repos/openssl/openssl/tags","blobs_url":"https://api.github.com/repos/openssl/openssl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openssl/openssl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openssl/openssl/git/refs{/sha}","trees_url":"https://api.github.com/repos/openssl/openssl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openssl/openssl/statuses/{sha}","languages_url":"https://api.github.com/repos/openssl/openssl/languages","stargazers_url":"https://api.github.com/repos/openssl/openssl/stargazers","contributors_url":"https://api.github.com/repos/openssl/openssl/contributors","subscribers_url":"https://api.github.com/repos/openssl/openssl/subscribers","subscription_url":"https://api.github.com/repos/openssl/openssl/subscription","commits_url":"https://api.github.com/repos/openssl/openssl/commits{/sha}","git_commits_url":"https://api.github.com/repos/openssl/openssl/git/commits{/sha}","comments_url":"https://api.github.com/repos/openssl/openssl/comments{/number}","issue_comment_url":"https://api.github.com/repos/openssl/openssl/issues/comments{/number}","contents_url":"https://api.github.com/repos/openssl/openssl/contents/{+path}","compare_url":"https://api.github.com/repos/openssl/openssl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openssl/openssl/merges","archive_url":"https://api.github.com/repos/openssl/openssl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openssl/openssl/downloads","issues_url":"https://api.github.com/repos/openssl/openssl/issues{/number}","pulls_url":"https://api.github.com/repos/openssl/openssl/pulls{/number}","milestones_url":"https://api.github.com/repos/openssl/openssl/milestones{/number}","notifications_url":"https://api.github.com/repos/openssl/openssl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openssl/openssl/labels{/name}","releases_url":"https://api.github.com/repos/openssl/openssl/releases{/id}","deployments_url":"https://api.github.com/repos/openssl/openssl/deployments","created_at":"2013-01-15T22:34:48Z","updated_at":"2018-05-31T17:53:33Z","pushed_at":"2018-05-31T17:31:05Z","git_url":"git://github.com/openssl/openssl.git","ssh_url":"git@github.com:openssl/openssl.git","clone_url":"https://github.com/openssl/openssl.git","svn_url":"https://github.com/openssl/openssl","homepage":"https://www.openssl.org","size":148235,"stargazers_count":7251,"watchers_count":7251,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3490,"mirror_url":null,"archived":false,"open_issues_count":384,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":3490,"open_issues":384,"watchers":7251,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openssl/openssl/pulls/6378"},"html":{"href":"https://github.com/openssl/openssl/pull/6378"},"issue":{"href":"https://api.github.com/repos/openssl/openssl/issues/6378"},"comments":{"href":"https://api.github.com/repos/openssl/openssl/issues/6378/comments"},"review_comments":{"href":"https://api.github.com/repos/openssl/openssl/pulls/6378/comments"},"review_comment":{"href":"https://api.github.com/repos/openssl/openssl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openssl/openssl/pulls/6378/commits"},"statuses":{"href":"https://api.github.com/repos/openssl/openssl/statuses/457482bf56d2c37ebeb229ea3c6202584eb87902"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"kaduk"}}