mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-05-30 18:45:20 -04:00
Workaround for usual Linux distro nonsense
Fedora 44 broke the long standing decade plus location of OpenSSL certificates file. Fixes #2151819 [Download metadata not working](https://bugs.launchpad.net/calibre/+bug/2151819)
This commit is contained in:
@@ -25,6 +25,11 @@ def setup_openssl_environment():
|
||||
if 'SSL_CERT_FILE' not in os.environ and 'SSL_CERT_DIR' not in os.environ:
|
||||
if os.access('/etc/pki/tls/certs/ca-bundle.crt', os.R_OK):
|
||||
os.environ['SSL_CERT_FILE'] = '/etc/pki/tls/certs/ca-bundle.crt'
|
||||
# morons in Fedora removed the bundle file in Fedora 44.
|
||||
# https://fedoraproject.org/wiki/Changes/droppingOfCertPemFile
|
||||
# Hopefully there does not exist another distro that uses this dir for something else.
|
||||
elif os.path.isdir('/etc/pki/tls/certs'):
|
||||
os.environ['SSL_CERT_DIR'] = '/etc/pki/tls/certs'
|
||||
elif os.path.isdir('/etc/ssl/certs'):
|
||||
os.environ['SSL_CERT_DIR'] = '/etc/ssl/certs'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user