From 9343f7c263aea476360ef327b14f619840b3fe13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Fri, 3 Jun 2022 13:44:00 +0200 Subject: [PATCH] Added CERTIFICATE_BUNDLE_PATH possible variable on environment to check certificates --- client-py3/full/src/uds/tools.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client-py3/full/src/uds/tools.py b/client-py3/full/src/uds/tools.py index 8f3fa05c..d82baf66 100644 --- a/client-py3/full/src/uds/tools.py +++ b/client-py3/full/src/uds/tools.py @@ -247,6 +247,10 @@ def verifySignature(script: bytes, signature: bytes) -> bool: def getCaCertsFile() -> typing.Optional[str]: # 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: if os.path.exists(certifi.where()): return certifi.where()