diff options
author | Guido van Rossum <guido@dropbox.com> | 2013-10-19 16:52:09 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@dropbox.com> | 2013-10-19 16:52:09 (GMT) |
commit | f19a6ef2c9e87f7a5429b2fcf0705265bdeb8b34 (patch) | |
tree | 8e9e6b5cb647024612e7e902e47eacd8fcebc420 | |
parent | 3743711a96e500d30e7084f74f49431547008392 (diff) | |
download | cpython-f19a6ef2c9e87f7a5429b2fcf0705265bdeb8b34.zip cpython-f19a6ef2c9e87f7a5429b2fcf0705265bdeb8b34.tar.gz cpython-f19a6ef2c9e87f7a5429b2fcf0705265bdeb8b34.tar.bz2 |
Verify hostname if verify_mode is CERT_OPTIONAL too.
-rw-r--r-- | Lib/asyncio/selector_events.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/asyncio/selector_events.py b/Lib/asyncio/selector_events.py index 63164f0..dee2306 100644 --- a/Lib/asyncio/selector_events.py +++ b/Lib/asyncio/selector_events.py @@ -604,7 +604,7 @@ class _SelectorSslTransport(_SelectorTransport): # Verify hostname if requested. peercert = self._sock.getpeercert() if (self._server_hostname is not None and - self._sslcontext.verify_mode == ssl.CERT_REQUIRED): + self._sslcontext.verify_mode != ssl.CERT_NONE): try: ssl.match_hostname(peercert, self._server_hostname) except Exception as exc: |