This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author desbma
Recipients alex, benjamin.peterson, christian.heimes, desbma
Date 2014-11-30.11:51:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I think it does, when passing a context with ssl_context.verify_mode != ss.CERT_NONE, and when not setting the check_hostname parameter: 
1. will_verify will be True (
2. check_hostname will be True too (
3. ssl.match_hostname will be called after the handshake in wrap_socket (

The following code shows the problem:

import http.client
import ssl

ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
ssl_context.verify_mode = ssl.CERT_REQUIRED
ssl_context.check_hostname = False
https = http.client.HTTPSConnection("localhost", context=ssl_context)
Date User Action Args
2014-11-30 11:51:52desbmasetrecipients: + desbma, christian.heimes, benjamin.peterson, alex
2014-11-30 11:51:52desbmasetmessageid: <>
2014-11-30 11:51:52desbmalinkissue22959 messages
2014-11-30 11:51:52desbmacreate