Set SSL_CERT_FILE and SSL_CERT_DIR only under frozen win32

This is the only case where ssl certificates are bundled. On other platform,
it prevents to use the system certificates.

issue6901
review36771002
This commit is contained in:
Cédric Krier committed 2017-11-09 19:00:56 +01:00
1 parent 2526aa733b
commit 7436b718fe
1 file changed
+5 -4
+5 -4
View File
@@ -23,10 +23,11 @@ if hasattr(sys, 'frozen'):
etc, 'gtk-2.0', 'gdk-pixbuf.loaders')
os.environ['GTK_IM_MODULE_FILE'] = os.path.join(
etc, 'gtk-2.0', 'gtk.immodules')
os.environ.setdefault('SSL_CERT_FILE',
os.path.join(etc, 'ssl', 'cert.pem'))
os.environ.setdefault('SSL_CERT_DIR',
os.path.join(etc, 'ssl', 'certs'))
if sys.platform == 'win32':
os.environ.setdefault('SSL_CERT_FILE',
os.path.join(etc, 'ssl', 'cert.pem'))
os.environ.setdefault('SSL_CERT_DIR',
os.path.join(etc, 'ssl', 'certs'))
# On first launch the MacOSX app launcher may append an extra unique
# argument starting with -psn_. This must be filtered to not crash the