Fixed check certificate on python 3.6

This commit is contained in:
Adolfo Gómez García 2021-11-03 14:39:58 +01:00
parent b67771d5f3
commit 98d7a24656

View File

@ -231,8 +231,8 @@ class RestApi:
# Ask about invalid certificate # Ask about invalid certificate
if certErrorCallback: if certErrorCallback:
if certErrorCallback(hostname, serial): if certErrorCallback(hostname, serial):
ctx.verify_mode = ssl.CERT_NONE
ctx.check_hostname = False ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
response = urlopen(url) response = urlopen(url)
else: else:
raise raise