This repository was archived by the owner on Jan 13, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1111
1212
1313NPN_PROTOCOL = 'h2'
14- H2_NPN_PROTOCOLS = [NPN_PROTOCOL , 'h2-16' , 'h2-15' , 'h2-14' ] # All h2s we support.
14+ H2_NPN_PROTOCOLS = [NPN_PROTOCOL , 'h2-16' , 'h2-15' , 'h2-14' ]
1515SUPPORTED_NPN_PROTOCOLS = H2_NPN_PROTOCOLS + ['http/1.1' ]
1616
1717
2222# Work out where our certificates are.
2323cert_loc = path .join (path .dirname (__file__ ), 'certs.pem' )
2424
25+
2526def wrap_socket (sock , server_hostname ):
2627 """
2728 A vastly simplified SSL wrapping function. We'll probably extend this to
@@ -35,8 +36,8 @@ def wrap_socket(sock, server_hostname):
3536 # the spec requires SNI support
3637 ssl_sock = _context .wrap_socket (sock , server_hostname = server_hostname )
3738 # Setting SSLContext.check_hostname to True only verifies that the
38- # post-handshake servername matches that of the certificate. We also need to
39- # check that it matches the requested one.
39+ # post-handshake servername matches that of the certificate. We also need
40+ # to check that it matches the requested one.
4041 if _context .check_hostname : # pragma: no cover
4142 try :
4243 ssl .match_hostname (ssl_sock .getpeercert (), server_hostname )
You can’t perform that action at this time.
0 commit comments