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

Commit c2bb522

Browse files
committed
Decode hostnames when verifying.
1 parent a12ebb4 commit c2bb522

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

hyper/ssl_compat.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ def verify_hostname(ssl_sock, server_hostname):
5656
"""
5757
A method nearly compatible with the stdlib's match_hostname.
5858
"""
59+
if isinstance(server_hostname, bytes):
60+
server_hostname = server_hostname.decode('ascii')
5961
return _verify(ssl_sock._conn, server_hostname)
6062

6163

0 commit comments

Comments
 (0)