{"action":"created","issue":{"url":"https://api.github.com/repos/ruby/openssl/issues/8","repository_url":"https://api.github.com/repos/ruby/openssl","labels_url":"https://api.github.com/repos/ruby/openssl/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/ruby/openssl/issues/8/comments","events_url":"https://api.github.com/repos/ruby/openssl/issues/8/events","html_url":"https://github.com/ruby/openssl/issues/8","id":64115523,"number":8,"title":"Subject is not ensured to be verified even when OpenSSL::SSL::VERIFY_PEER is configured","user":{"login":"tarcieri","id":797,"avatar_url":"https://avatars.githubusercontent.com/u/797?v=3","gravatar_id":"","url":"https://api.github.com/users/tarcieri","html_url":"https://github.com/tarcieri","followers_url":"https://api.github.com/users/tarcieri/followers","following_url":"https://api.github.com/users/tarcieri/following{/other_user}","gists_url":"https://api.github.com/users/tarcieri/gists{/gist_id}","starred_url":"https://api.github.com/users/tarcieri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarcieri/subscriptions","organizations_url":"https://api.github.com/users/tarcieri/orgs","repos_url":"https://api.github.com/users/tarcieri/repos","events_url":"https://api.github.com/users/tarcieri/events{/privacy}","received_events_url":"https://api.github.com/users/tarcieri/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-24T22:27:01Z","updated_at":"2016-06-16T17:09:04Z","closed_at":null,"body":"Even if OpenSSL::SSL::VERIFY_PEER is configured, I/O is allowed with a remote server before the subject has been verified. VERIFY_PEER only checks the cert chain is rooted in the local truststore. It does not check if the subject is valid in and of itself.\r\n\r\nMy understanding is the `ssl_socket.post_connection_check(hostname)` method *must* be called to ensure the subject is correctly verified. However, communication is allowed to remote services without verifying the subject.\r\n\r\nI would suggest throwing an exception if VERIFY_PEER is configured and I/O is attempted without first calling `post_connection_check`\r\n\r\nIt would also be nice if this all happened automatically simply by passing `hostname` into OpenSSL::SSL::SSLSocket (which AFAICT only affects SNI presently, and not subject verification)"},"comment":{"url":"https://api.github.com/repos/ruby/openssl/issues/comments/226550198","html_url":"https://github.com/ruby/openssl/issues/8#issuecomment-226550198","issue_url":"https://api.github.com/repos/ruby/openssl/issues/8","id":226550198,"user":{"login":"rhenium","id":1033740,"avatar_url":"https://avatars.githubusercontent.com/u/1033740?v=3","gravatar_id":"","url":"https://api.github.com/users/rhenium","html_url":"https://github.com/rhenium","followers_url":"https://api.github.com/users/rhenium/followers","following_url":"https://api.github.com/users/rhenium/following{/other_user}","gists_url":"https://api.github.com/users/rhenium/gists{/gist_id}","starred_url":"https://api.github.com/users/rhenium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhenium/subscriptions","organizations_url":"https://api.github.com/users/rhenium/orgs","repos_url":"https://api.github.com/users/rhenium/repos","events_url":"https://api.github.com/users/rhenium/events{/privacy}","received_events_url":"https://api.github.com/users/rhenium/received_events","type":"User","site_admin":false},"created_at":"2016-06-16T17:09:04Z","updated_at":"2016-06-16T17:09:04Z","body":"While I agree this is beneficial in most cases, this is our extension so I rather think this is something that should be enabled by explicitly calling SSLContext#set_params."}}
{"actor":{"display_login":"rhenium"}}