Skip to content

Commit e8053fb

Browse files
authored
upip: Add server_hostname param to ussl.wrap_socket() call.
1 parent 7522c14 commit e8053fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

upip/upip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def url_open(url):
122122
s.connect(addr)
123123

124124
if proto == "https:":
125-
s = ussl.wrap_socket(s)
125+
s = ussl.wrap_socket(s, server_hostname=host)
126126
if warn_ussl:
127127
print("Warning: %s SSL certificate is not validated" % host)
128128
warn_ussl = False

0 commit comments

Comments
 (0)