diff options
author | Christian Heimes <christian@cheimes.de> | 2013-12-02 19:59:28 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-12-02 19:59:28 (GMT) |
commit | a02c69a73b11b94adcd4e62316c835e856d6948b (patch) | |
tree | f15dcbc114eac80784c1ceb8aba727553276f5e6 /Lib/ssl.py | |
parent | a5768f729273b3e2f1464eeb348e16ff4c25df77 (diff) | |
download | cpython-a02c69a73b11b94adcd4e62316c835e856d6948b.zip cpython-a02c69a73b11b94adcd4e62316c835e856d6948b.tar.gz cpython-a02c69a73b11b94adcd4e62316c835e856d6948b.tar.bz2 |
add check_hostname arg to ssl._create_stdlib_context()
Diffstat (limited to 'Lib/ssl.py')
-rw-r--r-- | Lib/ssl.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -405,7 +405,7 @@ def create_default_context(purpose=Purpose.SERVER_AUTH, *, cafile=None, def _create_stdlib_context(protocol=PROTOCOL_SSLv23, *, cert_reqs=None, - purpose=Purpose.SERVER_AUTH, + check_hostname=False, purpose=Purpose.SERVER_AUTH, certfile=None, keyfile=None, cafile=None, capath=None, cadata=None): """Create a SSLContext object for Python stdlib modules @@ -424,6 +424,7 @@ def _create_stdlib_context(protocol=PROTOCOL_SSLv23, *, cert_reqs=None, if cert_reqs is not None: context.verify_mode = cert_reqs + context.check_hostname = check_hostname if keyfile and not certfile: raise ValueError("certfile must be specified") |