From 14ebbe2bf66c869d5758f123b06330ab4b11566d Mon Sep 17 00:00:00 2001 From: Richard T Bonhomme Date: Sun, 25 Sep 2022 20:47:21 +0100 Subject: [PATCH] Use correct input file x509-types/ca Signed-off-by: Richard T Bonhomme --- easyrsa3/easyrsa | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index 6fed401..f63835a 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -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