build-ca: Write 'unique_subject = no' to index.txt.attr file

EasyRSA version 3.1x 'renew' command requires this attribute.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
This commit is contained in:
Richard T Bonhomme 2023-01-22 19:20:24 +00:00
parent 81842810ef
commit c4eeff9201
No known key found for this signature in database
GPG Key ID: 2D767DB92FB6C246

View File

@ -1354,7 +1354,8 @@ Unable to create necessary PKI files (permissions?)"
done
printf "" > "$EASYRSA_PKI/index.txt" || \
die "$err_msg"
printf "" > "$EASYRSA_PKI/index.txt.attr" || \
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"