diff options
author | slontis <shane.lontis@oracle.com> | 2022-12-21 05:39:07 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2023-01-16 17:17:31 +0100 |
commit | fe2a7341b50450dc6acd6f8a17d4420511a5aefe (patch) | |
tree | b7ebedf8881759406bff879c5826cb182eccc5e7 /crypto/pkcs12/p12_init.c | |
parent | s390x: Fix keccak xofs via CPACF (diff) | |
download | openssl-fe2a7341b50450dc6acd6f8a17d4420511a5aefe.tar.xz openssl-fe2a7341b50450dc6acd6f8a17d4420511a5aefe.zip |
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)
Diffstat (limited to 'crypto/pkcs12/p12_init.c')
-rw-r--r-- | crypto/pkcs12/p12_init.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/pkcs12/p12_init.c b/crypto/pkcs12/p12_init.c index dd469b5c5c..1d6c74b8c4 100644 --- a/crypto/pkcs12/p12_init.c +++ b/crypto/pkcs12/p12_init.c @@ -56,3 +56,9 @@ PKCS12 *PKCS12_init(int mode) return PKCS12_init_ex(mode, NULL, NULL); } +const PKCS7_CTX *ossl_pkcs12_get0_pkcs7ctx(const PKCS12 *p12) +{ + if (p12 == NULL || p12->authsafes == NULL) + return NULL; + return &p12->authsafes->ctx; +} |