From: Nicki Křížek Date: Mon, 6 May 2024 16:04:46 +0000 (+0200) Subject: Ensure OPENSSL_CONF is a file if it exists X-Git-Tag: v9.20.0~43^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=faeec83b6473989e16f5e062237ff9331a8d135b;p=thirdparty%2Fbind9.git Ensure OPENSSL_CONF is a file if it exists Prevent unexpected behavior in cases where the OPENSSL_CONF path would exist, but it wouldn't point to a file. --- diff --git a/bin/tests/system/isctest/vars/openssl.py b/bin/tests/system/isctest/vars/openssl.py index 9ad20209384..5df12b72472 100644 --- a/bin/tests/system/isctest/vars/openssl.py +++ b/bin/tests/system/isctest/vars/openssl.py @@ -25,12 +25,13 @@ OPENSSL_VARS = { def parse_openssl_config(path: Optional[str]): - if path is None or not os.path.isfile(path): + if path is None or not os.path.exists(path): OPENSSL_VARS["ENGINE_ARG"] = None OPENSSL_VARS["SOFTHSM2_MODULE"] = None os.environ.pop("ENGINE_ARG", None) os.environ.pop("SOFTHSM2_MODULE", None) return + assert os.path.isfile(path), f"{path} exists, but it's not a file" regex = re.compile(r"([^=]+)=(.*)") log.debug(f"parsing openssl config: {path}")