Use correct input file x509-types/ca

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
This commit is contained in:
Richard T Bonhomme 2022-09-25 20:47:21 +01:00
parent 44d69ca2fe
commit 14ebbe2bf6
No known key found for this signature in database
GPG Key ID: 2D767DB92FB6C246

View File

@ -1737,9 +1737,12 @@ Please update openssl-easyrsa.cnf to the latest official release."
if [ "$crt_type" = "ca" ] && [ "$EASYRSA_SUBCA_LEN" ]; then
# Print the last occurence of basicContraints in x509-types/ca
# If basicContraints not defined then bail
# shellcheck disable=SC2016 # vars don't expand in ''
awkscript='/^[[:blank:]]*basicConstraints[[:blank:]]*=/ { bC=$0 }
END { if (length(bC) == 0 ) exit 1; print bC }'
basicConstraints="$(awk "$awkscript" "$ext_tmp")" || die "\
basicConstraints="$(
awk "$awkscript" "$EASYRSA_EXT_DIR/$crt_type"
)" || die "\
basicConstraints is not defined, cannot use 'pathlen'"
print "$basicConstraints, pathlen:$EASYRSA_SUBCA_LEN"
unset -v basicConstraints