From 477b1aa1670e2c2c766eb920a8df20e68c181cd7 Mon Sep 17 00:00:00 2001 From: Amir Omidi Date: Wed, 6 Jul 2022 16:23:42 -0400 Subject: [PATCH] Change generated CSR version to 0 CSRs are PKCS#10 documents, and the standard does not define versions above 0. Reference: certbot/certbot#9334 --- acme_nginx/Acme.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acme_nginx/Acme.py b/acme_nginx/Acme.py index dd58bd8..9afd61b 100644 --- a/acme_nginx/Acme.py +++ b/acme_nginx/Acme.py @@ -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