PKCS12 - Add additional libctx and propq support.
authorslontis <shane.lontis@oracle.com>
Wed, 21 Dec 2022 04:39:07 +0000 (14:39 +1000)
committerTomas Mraz <tomas@openssl.org>
Mon, 16 Jan 2023 16:17:31 +0000 (17:17 +0100)
commitfe2a7341b50450dc6acd6f8a17d4420511a5aefe
treeb7ebedf8881759406bff879c5826cb182eccc5e7
parent76aa4f3ac0d76e58f2111cbf87ae7f25c8766190
PKCS12 - Add additional libctx and propq support.

Fixes #19718
Fixes #19716

Added PKCS12_SAFEBAG_get1_cert_ex(), PKCS12_SAFEBAG_get1_crl_ex() and
ASN1_item_unpack_ex().

parse_bag and parse_bags now use the libctx/propq stored in the P7_CTX.
PKCS12_free() needed to be manually constructed in order to free the propq.

pkcs12_api_test.c changed so that it actually tests the libctx, propq.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19942)
15 files changed:
crypto/asn1/asn_pack.c
crypto/pkcs12/p12_add.c
crypto/pkcs12/p12_asn.c
crypto/pkcs12/p12_init.c
crypto/pkcs12/p12_kiss.c
crypto/pkcs12/p12_local.h
crypto/pkcs12/p12_sbag.c
crypto/pkcs12/p12_utl.c
doc/man3/ASN1_item_d2i_bio.pod
doc/man3/PKCS12_SAFEBAG_get1_cert.pod
include/openssl/asn1.h.in
include/openssl/pkcs12.h.in
test/pkcs12_api_test.c
util/libcrypto.num
util/missingcrypto.txt