diff options
author | Matt Caswell <matt@openssl.org> | 2021-05-26 17:18:13 +0100 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2021-06-05 17:39:10 +1000 |
commit | c6313780586f94b0542f55c3ffa399f5ad2c7297 (patch) | |
tree | 4ee7a22fbbe0e507a1b974b5e2e45778836fed09 /test/cmp_protect_test.c | |
parent | 5dca2afca3f5de55f3de3a404ede1a96c6d9af26 (diff) | |
download | openssl-new-c6313780586f94b0542f55c3ffa399f5ad2c7297.tar.gz |
Use the new ASN.1 libctx aware capabilities in CMP
Make sure we pass the libctx/propq around everywhere that we need it to
ensure we get provider keys when needed.
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15591)
Diffstat (limited to 'test/cmp_protect_test.c')
-rw-r--r-- | test/cmp_protect_test.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/cmp_protect_test.c b/test/cmp_protect_test.c index 5fafb69475..9111b89423 100644 --- a/test/cmp_protect_test.c +++ b/test/cmp_protect_test.c @@ -143,7 +143,7 @@ static int execute_calc_protection_signature_test(CMP_PROTECT_TEST_FIXTURE * static int test_cmp_calc_protection_no_key_no_secret(void) { SETUP_TEST_FIXTURE(CMP_PROTECT_TEST_FIXTURE, set_up); - if (!TEST_ptr(fixture->msg = load_pkimsg(ir_unprotected_f)) + if (!TEST_ptr(fixture->msg = load_pkimsg(ir_unprotected_f, libctx)) || !TEST_ptr(fixture->msg->header->protectionAlg = X509_ALGOR_new() /* no specific alg needed here */)) { tear_down(fixture); @@ -159,7 +159,7 @@ static int test_cmp_calc_protection_pkey(void) SETUP_TEST_FIXTURE(CMP_PROTECT_TEST_FIXTURE, set_up); fixture->pubkey = loadedpubkey; if (!TEST_true(OSSL_CMP_CTX_set1_pkey(fixture->cmp_ctx, loadedprivkey)) - || !TEST_ptr(fixture->msg = load_pkimsg(ir_protected_f))) { + || !TEST_ptr(fixture->msg = load_pkimsg(ir_protected_f, libctx))) { tear_down(fixture); fixture = NULL; } @@ -174,7 +174,7 @@ static int test_cmp_calc_protection_pbmac(void) SETUP_TEST_FIXTURE(CMP_PROTECT_TEST_FIXTURE, set_up); if (!TEST_true(OSSL_CMP_CTX_set1_secretValue(fixture->cmp_ctx, sec_insta, sizeof(sec_insta))) - || !TEST_ptr(fixture->msg = load_pkimsg(ip_PBM_f))) { + || !TEST_ptr(fixture->msg = load_pkimsg(ip_PBM_f, libctx))) { tear_down(fixture); fixture = NULL; } @@ -577,8 +577,8 @@ int setup_tests(void) return 0; if (TEST_true(EVP_PKEY_up_ref(loadedprivkey))) loadedpubkey = loadedprivkey; - if (!TEST_ptr(ir_protected = load_pkimsg(ir_protected_f)) - || !TEST_ptr(ir_unprotected = load_pkimsg(ir_unprotected_f))) + if (!TEST_ptr(ir_protected = load_pkimsg(ir_protected_f, libctx)) + || !TEST_ptr(ir_unprotected = load_pkimsg(ir_unprotected_f, libctx))) return 0; if (!TEST_ptr(endentity1 = load_cert_pem(endentity1_f, libctx)) || !TEST_ptr(endentity2 = load_cert_pem(endentity2_f, libctx)) |