Skip to content

Commit

Permalink
Allow optional "NEW" in CSR header and footer
Browse files Browse the repository at this point in the history
When generating a CSR in Windows it seems to create a CSR header that looks like "-----BEGIN NEW CERTIFICATE REQUEST-----", but the addition of "NEW" breaks the parsing of the CSR. Making "NEW " optional fixes the problem.

Apparently certbot is tolerant of both forms, see: https://community.letsencrypt.org/t/error-parsing-certificate-request-resolved/40039/6 for more information.
  • Loading branch information
pearj authored and Neilpang committed Jan 6, 2022
1 parent 37cc611 commit 0727f70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions acme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ NGINX="nginx:"
NGINX_START="#ACME_NGINX_START"
NGINX_END="#ACME_NGINX_END"

BEGIN_CSR="-----BEGIN CERTIFICATE REQUEST-----"
END_CSR="-----END CERTIFICATE REQUEST-----"
BEGIN_CSR="-----BEGIN [NEW ]\{0,4\}CERTIFICATE REQUEST-----"
END_CSR="-----END [NEW ]\{0,4\}CERTIFICATE REQUEST-----"

BEGIN_CERT="-----BEGIN CERTIFICATE-----"
END_CERT="-----END CERTIFICATE-----"
Expand Down

0 comments on commit 0727f70

Please sign in to comment.