config generation acme.sh

This commit is contained in:
Alois Vollmaier 2024-04-22 09:59:53 +02:00 committed by GitHub
parent bc90376489
commit e8520e848f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1243,6 +1243,12 @@ _createcsr() {
_debug2 csr "$csr" _debug2 csr "$csr"
_debug2 csrconf "$csrconf" _debug2 csrconf "$csrconf"
if [ -f "$csrconf" ]; then
_info "CSR config already exists - skip config generation" "$csrconf"
${ACME_OPENSSL_BIN:-openssl} req -new -sha256 -key "$csrkey" -config "$csrconf" -out "$csr"
return
fi
printf "[ req_distinguished_name ]\n[ req ]\ndistinguished_name = req_distinguished_name\nreq_extensions = v3_req\n[ v3_req ]\nextendedKeyUsage=serverAuth,clientAuth\n" >"$csrconf" printf "[ req_distinguished_name ]\n[ req ]\ndistinguished_name = req_distinguished_name\nreq_extensions = v3_req\n[ v3_req ]\nextendedKeyUsage=serverAuth,clientAuth\n" >"$csrconf"
if [ "$acmeValidationv1" ]; then if [ "$acmeValidationv1" ]; then