INNER CODE UNIT · Python
_find_wolfssl_dir
wolfSSL/wolfssl · scripts/multi-msg-record.py:45
def _find_wolfssl_dir():
# Under `make check` the working directory is the build tree, which is
# where the client binary lives and which differs from the tree
# containing this script in an out-of-tree (VPATH) build. Fall back to
# the script's parent for direct invocation from the source tree.
for root in (os.getcwd(), os.path.dirname(SCRIPT_DIR)):
if os.path.isfile(os.path.join(root, "examples", "client", "client")):
return root
return os.path.dirname(SCRIPT_DIR)
WOLFSSL_DIR = _find_wolfssl_dir()
WOLF_CLIENT = os.path.join(WOLFSSL_DIR, "examples", "client", "client")
CERT_DIR = os.path.join(WOLFSSL_DIR, "certs")
# CA cert path passed to the wolfSSL client via -A. Set in main() after
# detect_wolf_features() determines whether the build accepts PEM or DER.
WOLF_CA_CERT = os.path.join(CERT_DIR, "ca-cert.pem")