summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/asyncio')
-rw-r--r--Lib/asyncio/selector_events.py2
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: