Browse Source

Change certificate-file location for distributions

tags/2.3.0Alpha1
Safihre 8 years ago
parent
commit
d765fa09f1
  1. 7
      SABnzbd.py

7
SABnzbd.py

@ -1178,14 +1178,11 @@ def main():
logging.info("SSL version %s", sabnzbd.utils.sslinfo.ssl_version()) logging.info("SSL version %s", sabnzbd.utils.sslinfo.ssl_version())
logging.info("SSL supported protocols %s", str(sabnzbd.utils.sslinfo.ssl_protocols_labels())) 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"): if hasattr(sys, "frozen"):
# The certifi package brings the latest certificates on build # The certifi package brings the latest certificates on build
# This will cause the create_default_context to load it automatically # This will cause the create_default_context to load it automatically
if sabnzbd.DARWIN: if sabnzbd.WIN32 or sabnzbd.DARWIN:
import certifi
os.environ["SSL_CERT_FILE"] = certifi.where()
if sabnzbd.WIN32:
os.environ["SSL_CERT_FILE"] = os.path.join(sabnzbd.DIR_PROG, 'cacert.pem') 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"]) logging.info('Loaded additional certificates from %s', os.environ["SSL_CERT_FILE"])

Loading…
Cancel
Save