diff --git a/src/util/helper.py b/src/util/helper.py index 61455b085..20f4aaf70 100644 --- a/src/util/helper.py +++ b/src/util/helper.py @@ -209,7 +209,11 @@ def httpRequest(url, as_file=False): conn = http.client.HTTPSConnection(host) sock = socket.create_connection((conn.host, conn.port), conn.timeout, conn.source_address) - conn.sock = ssl.wrap_socket(sock, conn.key_file, conn.cert_file) + + context = ssl.create_default_context() + context.minimum_version = ssl.TLSVersion.TLSv1_2 + + conn.sock = context.wrap_socket(sock, conn.key_file, conn.cert_file) conn.request("GET", request) response = conn.getresponse() if response.status in [301, 302, 303, 307, 308]: