From bb81dc5bb48137f2731f957df3d7ddc1723fc391 Mon Sep 17 00:00:00 2001 From: Richard T Bonhomme Date: Mon, 29 Aug 2022 01:42:01 +0100 Subject: [PATCH] x509-types: Reset non-existent x509-types dir set by vars Closes: #654 Signed-off-by: Richard T Bonhomme --- easyrsa3/easyrsa | 3 +++ 1 file changed, 3 insertions(+) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index 95eee6f..b42df8c 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -1021,7 +1021,10 @@ The preferred location for 'vars' is within the PKI folder. # Find x509-types dir, always prefer PKI location find_x509_types_dir() { + # if EASYRSA_EXT_DIR is set to a non-existent dir the reset it + [ -d "$EASYRSA_EXT_DIR" ] || unset -v EASYRSA_EXT_DIR x509_types_dir='x509-types' + # if PKI/x509-types exists then it wins, except for command line if [ -d "$EASYRSA_PKI/$x509_types_dir" ]; then # use set_var to preserve command line