Skip to content

Commit

Permalink
Change generated CSR version to 0
Browse files Browse the repository at this point in the history
CSRs are PKCS#10 documents, and the standard does not define versions above 0.

Reference: certbot/certbot#9334
  • Loading branch information
aaomidi authored Jul 6, 2022
1 parent 341a537 commit 477b1aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion acme_nginx/Acme.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def create_csr(self):
key = fd.read()
pk = OpenSSL.crypto.load_privatekey(OpenSSL.crypto.FILETYPE_PEM, key)
req.set_pubkey(pk)
req.set_version(2)
req.set_version(0)
req.sign(pk, "sha256")
return OpenSSL.crypto.dump_certificate_request(
OpenSSL.crypto.FILETYPE_ASN1, req
Expand Down

0 comments on commit 477b1aa

Please sign in to comment.