Added CERTIFICATE_BUNDLE_PATH possible variable on environment to check certificates

This commit is contained in:
Adolfo Gómez García 2022-06-03 13:44:00 +02:00
parent 7775964d62
commit 9343f7c263

View File

@ -247,6 +247,10 @@ def verifySignature(script: bytes, signature: bytes) -> bool:
def getCaCertsFile() -> typing.Optional[str]: def getCaCertsFile() -> typing.Optional[str]:
# First, try certifi... # First, try certifi...
# If environment contains CERTIFICATE_BUNDLE_PATH, use it
if 'CERTIFICATE_BUNDLE_PATH' in os.environ:
return os.environ['CERTIFICATE_BUNDLE_PATH']
try: try:
if os.path.exists(certifi.where()): if os.path.exists(certifi.where()):
return certifi.where() return certifi.where()