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

Commit a679cb9

Browse files
committed
Formatting improvements in tls.py.
1 parent fd3c54b commit a679cb9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

hyper/tls.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
NPN_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']
1515
SUPPORTED_NPN_PROTOCOLS = H2_NPN_PROTOCOLS + ['http/1.1']
1616

1717

@@ -22,6 +22,7 @@
2222
# Work out where our certificates are.
2323
cert_loc = path.join(path.dirname(__file__), 'certs.pem')
2424

25+
2526
def 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)

0 commit comments

Comments
 (0)