From e8053fb06a40a580bebfcc5a01114ff57e2f3cc7 Mon Sep 17 00:00:00 2001 From: Anne Jan Brouwer Date: Thu, 15 Jun 2017 16:04:58 +0200 Subject: [PATCH] upip: Add server_hostname param to ussl.wrap_socket() call. --- upip/upip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upip/upip.py b/upip/upip.py index 7b85c718..411da49e 100644 --- a/upip/upip.py +++ b/upip/upip.py @@ -122,7 +122,7 @@ def url_open(url): s.connect(addr) if proto == "https:": - s = ussl.wrap_socket(s) + s = ussl.wrap_socket(s, server_hostname=host) if warn_ussl: print("Warning: %s SSL certificate is not validated" % host) warn_ussl = False