From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id DF2799915E for ; Thu, 20 Apr 2023 14:32:39 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id C78012B60C for ; Thu, 20 Apr 2023 14:32:39 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Thu, 20 Apr 2023 14:32:39 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id CFBD545D75 for ; Thu, 20 Apr 2023 14:32:38 +0200 (CEST) Date: Thu, 20 Apr 2023 14:32:30 +0200 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Proxmox VE development discussion References: <20230331161224.1499336-1-m.limbeck@proxmox.com> In-Reply-To: <20230331161224.1499336-1-m.limbeck@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.16.0 (https://github.com/astroidmail/astroid) Message-Id: <1681993915.hw21npir87.astroid@yuna.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.076 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com, certificate.pm, rfc-editor.org] Subject: [pve-devel] applied: [PATCH common] cert: fix invalid CSR version X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2023 12:32:39 -0000 thanks! (and sorry for the delay) On March 31, 2023 6:12 pm, Mira Limbeck wrote: > According to rfc2986 the only valid version is 0. No newer rfc changed > that. > See section 4.1: > https://www.rfc-editor.org/rfc/rfc2986#section-4.1 >=20 > Manually verifying the CSR with openssl results in the following error: > ``` > $ openssl req -in bad.csr -text -noout > Certificate Request: > Data: > Version: Unknown (2) > ``` >=20 > Signed-off-by: Mira Limbeck > --- > I wasn't able to create a test setup where I could test this yet, will > try again on monday. >=20 > Stoiko tested it on his setup with Let's Encrypt Staging and it worked > fine. Although he didn't extract the CSR to verify it. >=20 > A customer reported the issue in the enterprise support portal and > provided the fix as well. >=20 > src/PVE/Certificate.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/src/PVE/Certificate.pm b/src/PVE/Certificate.pm > index 4ce7364..f67f6cd 100644 > --- a/src/PVE/Certificate.pm > +++ b/src/PVE/Certificate.pm > @@ -430,7 +430,7 @@ sub generate_csr { > =20 > $cleanup->("Failed to set public key\n") if !Net::SSLeay::X509_REQ_s= et_pubkey($req, $pk); > =20 > - $cleanup->("Failed to set CSR version\n") if !Net::SSLeay::X509_REQ_= set_version($req, 2); > + $cleanup->("Failed to set CSR version\n") if !Net::SSLeay::X509_REQ_= set_version($req, 0); > =20 > $cleanup->("Failed to sign CSR\n") if !Net::SSLeay::X509_REQ_sign($r= eq, $pk, $md); > =20 > --=20 > 2.30.2 >=20 >=20 > _______________________________________________ > pve-devel mailing list > pve-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel >=20 >=20 >=20