Message-ID: Date: Tue, 14 Mar 2023 09:45:15 +0100 MIME-Version: 1.0 Content-Language: en-US References: <20230311052403.1154030-1-selva.nair@...277...> From: David Sommerseth In-Reply-To: <20230311052403.1154030-1-selva.nair@...277...> Subject: Re: [Openvpn-devel] [PATCH] Bugfix: Convert ECDSA signature form pkcs11-helper to DER encoded form List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit To: selva.nair@...277..., openvpn-devel@lists.sourceforge.net On 11/03/2023 06:24, selva.nair@...277... wrote: > From: Selva Nair > > - With OpenSSL 3.0 and xkey-provider, we use pkcs11h_certificate_signAny_ex() > which returns EC signature as raw r|s concatenated. But OpenSSL expects > a DER encoded ASN.1 structure. > > Do this conversion as done in cryptoapi.c. For code re-use, ecdsa_bin2sig() > is consolidated with sig to DER conversion as ecdsa_bin2der() and > moved to xkey_helper.c > > In the past when we used OpenSSL hooks installed by pkcs11-helper, > such a conversion was not required as it was internally handled by > the library. > > Reported by: Tom > > Signed-off-by: Selva Nair Just FYI, this report appeared in the bugzilla for the Fedora packaging. This seems related to this patch. I will try to prepare a Fedora build with this patch added, for further testing. -- kind regards, David Sommerseth OpenVPN Inc