Merge branch 'TinCanTech-aesthetics-build-ca-create-dirs-files'

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
This commit is contained in:
Richard T Bonhomme 2023-01-26 19:40:19 +00:00
commit 005ae7f072
No known key found for this signature in database
GPG Key ID: 2D767DB92FB6C246

View File

@ -1343,7 +1343,7 @@ This openssl config file does not support X509-type 'ca'.
Please update openssl-easyrsa.cnf to the latest release."
fi
# create necessary files and dirs:
# create necessary dirs:
err_msg="\
Unable to create necessary PKI files (permissions?)"
for i in issued inline certs_by_serial \
@ -1352,13 +1352,14 @@ Unable to create necessary PKI files (permissions?)"
do
mkdir -p "$EASYRSA_PKI/$i" || die "$err_msg"
done
printf "" > "$EASYRSA_PKI/index.txt" || \
die "$err_msg"
attrib='unique_subject = no'
printf '%s\n' "$attrib" > "$EASYRSA_PKI/index.txt.attr" || \
die "$err_msg"
printf '%s\n' "01" > "$EASYRSA_PKI/serial" || \
die "$err_msg"
# create necessary files:
printf "" > \
"$EASYRSA_PKI/index.txt" || die "$err_msg"
printf '%s\n' 'unique_subject = no' \
> "$EASYRSA_PKI/index.txt.attr" || die "$err_msg"
printf '%s\n' "01" \
> "$EASYRSA_PKI/serial" || die "$err_msg"
unset -v err_msg
# Set ssl batch mode, as required