From: Marcin Krol Date: Thu, 28 Jul 2016 16:06:02 +0000 (+0000) Subject: - disable SSL certificate validation globally to allow self-signed certs X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=51ef5d71032ce137b14665b925c75e788471ca5f;p=tld-builder.git - disable SSL certificate validation globally to allow self-signed certs --- diff --git a/TLD_Builder/config.py b/TLD_Builder/config.py index 663862e..2e86325 100644 --- a/TLD_Builder/config.py +++ b/TLD_Builder/config.py @@ -9,6 +9,7 @@ import path import log import status +import ssl syslog_facilities = { 'kern': syslog.LOG_KERN, @@ -122,6 +123,12 @@ class Builder_Conf: config = Builder_Conf() def init_conf(builder=None): + try: + _create_unverified_https_context = ssl._create_unverified_context + except AttributeError: + pass + else: + ssl._create_default_https_context = _create_unverified_https_context os.environ['LC_ALL'] = "C" status.push("reading builder config") log.builder = builder