x509-types: Reset non-existent x509-types dir set by vars

Closes: #654

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
This commit is contained in:
Richard T Bonhomme 2022-08-29 01:42:01 +01:00
parent 75f633a315
commit bb81dc5bb4
No known key found for this signature in database
GPG Key ID: 2D767DB92FB6C246

View File

@ -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