Fix PKCS#12 creation error when certificate contains auxiliary data
authorOlga Batyshkina <obatysh@gmx.com>
Mon, 7 Aug 2023 13:14:53 +0000 (15:14 +0200)
committerTomas Mraz <tomas@openssl.org>
Fri, 15 Sep 2023 14:13:33 +0000 (16:13 +0200)
commitcdc4f2b5072f908e88e3aae83d87a7d095d2b36a
treeb24f17318a89a3a262e1c621d531e1e0cee00b1e
parentbb67dff95aeb21047b95f92c5119cb63e75cfd2f
Fix PKCS#12 creation error when certificate contains auxiliary data

Prefer friendly name passed by the caller and calculated local
key id to ones found in certificate auxiliary data when creating
PKCS#12.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21675)

(cherry picked from commit 388a8e731445d190a46ec27b2ff5b4bf334d526b)
crypto/pkcs12/p12_crt.c
test/pkcs12_format_test.c