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

Commit 75ac14f

Browse files
committed
Merge pull request #165 from Lukasa/issue/162
Decode hostnames when verifying.
2 parents a12ebb4 + c2bb522 commit 75ac14f

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)