diff options
author | slontis <shane.lontis@oracle.com> | 2022-12-21 14:39:07 +1000 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2023-01-16 17:17:31 +0100 |
commit | fe2a7341b50450dc6acd6f8a17d4420511a5aefe (patch) | |
tree | b7ebedf8881759406bff879c5826cb182eccc5e7 /crypto/pkcs12/p12_init.c | |
parent | 76aa4f3ac0d76e58f2111cbf87ae7f25c8766190 (diff) |
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; +} |