From d765fa09f1441a29f28e853db2c869cad2e61f1a Mon Sep 17 00:00:00 2001 From: Safihre Date: Sat, 19 Aug 2017 20:33:46 +0200 Subject: [PATCH] Change certificate-file location for distributions --- SABnzbd.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/SABnzbd.py b/SABnzbd.py index 281abea..abb896e 100755 --- a/SABnzbd.py +++ b/SABnzbd.py @@ -1178,14 +1178,11 @@ def main(): logging.info("SSL version %s", sabnzbd.utils.sslinfo.ssl_version()) logging.info("SSL supported protocols %s", str(sabnzbd.utils.sslinfo.ssl_protocols_labels())) - # Load extra certificates + # Load (extra) certificates in the distributions if hasattr(sys, "frozen"): # The certifi package brings the latest certificates on build # This will cause the create_default_context to load it automatically - if sabnzbd.DARWIN: - import certifi - os.environ["SSL_CERT_FILE"] = certifi.where() - if sabnzbd.WIN32: + if sabnzbd.WIN32 or sabnzbd.DARWIN: os.environ["SSL_CERT_FILE"] = os.path.join(sabnzbd.DIR_PROG, 'cacert.pem') logging.info('Loaded additional certificates from %s', os.environ["SSL_CERT_FILE"])