Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit 4e1487f

Browse files
committed
Use check_hostname of _ssl_context
1 parent 5dac9a8 commit 4e1487f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hyper/tls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def wrap_socket(sock, server_hostname, ssl_context=None):
4343
# Setting SSLContext.check_hostname to True only verifies that the
4444
# post-handshake servername matches that of the certificate. We also need
4545
# to check that it matches the requested one.
46-
if _context.check_hostname: # pragma: no cover
46+
if _ssl_context.check_hostname: # pragma: no cover
4747
try:
4848
ssl.match_hostname(ssl_sock.getpeercert(), server_hostname)
4949
except AttributeError:

0 commit comments

Comments
 (0)