This commit is contained in:
Ronnie Andrew Magatti 2015-10-05 15:37:38 -03:00
parent 2ecc461727
commit 26c69a2abf
1 changed files with 2 additions and 1 deletions

View File

@ -272,7 +272,8 @@ class UrlRequest(Thread):
ctx.verify_mode = ssl.CERT_REQUIRED
args['context'] = ctx
if not verify and parse.scheme == 'https' and hasattr(ssl, 'create_default_context'):
if not verify and parse.scheme == 'https' and (
hasattr(ssl, 'create_default_context')):
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE