diff options
author | Matt Caswell <matt@openssl.org> | 2021-05-27 15:03:06 +0100 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2021-06-05 17:39:27 +1000 |
commit | d2b6c06274f37c5c6c967939ee556c4be5b568d0 (patch) | |
tree | 8aa39fb3aa61f76fe8a9bf4728e8badb5b970814 /test/cmp_msg_test.c | |
parent | 7be04a3ac40fb6cf83be2c619dc30625988c6742 (diff) |
Ensure libctx/propq is propagated when handling X509_REQ
When we create via d2i or dup an X509_REQ we should ensure that the libctx
is properly propagated. We also ensure we create X509_REQ objects with the
proper libctx assigned in the CMP tests.
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_msg_test.c')
-rw-r--r-- | test/cmp_msg_test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/cmp_msg_test.c b/test/cmp_msg_test.c index a9a858c07a..4f2ca1b40b 100644 --- a/test/cmp_msg_test.c +++ b/test/cmp_msg_test.c @@ -226,7 +226,7 @@ static int test_cmp_create_p10cr(void) fixture->bodytype = OSSL_CMP_PKIBODY_P10CR; fixture->err_code = CMP_R_ERROR_CREATING_CERTREQ; fixture->expected = 1; - if (!TEST_ptr(p10cr = load_csr_der(pkcs10_f)) + if (!TEST_ptr(p10cr = load_csr_der(pkcs10_f, libctx)) || !TEST_true(set1_newPkey(ctx, newkey)) || !TEST_true(OSSL_CMP_CTX_set1_p10CSR(ctx, p10cr))) { tear_down(fixture); @@ -504,7 +504,7 @@ static int test_cmp_pkimessage_create(int bodytype) switch (fixture->bodytype = bodytype) { case OSSL_CMP_PKIBODY_P10CR: fixture->expected = 1; - p10cr = load_csr_der(pkcs10_f); + p10cr = load_csr_der(pkcs10_f, libctx); if (!TEST_true(OSSL_CMP_CTX_set1_p10CSR(fixture->cmp_ctx, p10cr))) { tear_down(fixture); fixture = NULL; |