summaryrefslogtreecommitdiffstats
path: root/test/cmp_msg_test.c
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2023-04-25 19:26:36 +0200
committerDr. David von Oheimb <dev@ddvo.net>2023-05-12 10:46:27 +0200
commite0f1ec3b2ec1b137695abc3199a62def5965351f (patch)
tree493e4f6d3ffdab4015ef030004de11bc285b9db3 /test/cmp_msg_test.c
parent2d6585986f3b754750b25e7a296a08e7129a5320 (diff)
CMP client: fix checking new cert enrolled with oldcert and without private key
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Todd Short <todd.short@me.com> Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com> (Merged from https://github.com/openssl/openssl/pull/20832)
Diffstat (limited to 'test/cmp_msg_test.c')
-rw-r--r--test/cmp_msg_test.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/cmp_msg_test.c b/test/cmp_msg_test.c
index 1f288f3b8d..4438b53cb3 100644
--- a/test/cmp_msg_test.c
+++ b/test/cmp_msg_test.c
@@ -382,7 +382,6 @@ static int execute_certrep_create(CMP_MSG_TEST_FIXTURE *fixture)
OSSL_CMP_CTX *ctx = fixture->cmp_ctx;
OSSL_CMP_CERTREPMESSAGE *crepmsg = OSSL_CMP_CERTREPMESSAGE_new();
OSSL_CMP_CERTRESPONSE *read_cresp, *cresp = OSSL_CMP_CERTRESPONSE_new();
- EVP_PKEY *privkey;
X509 *certfromresp = NULL;
int res = 0;
@@ -404,8 +403,7 @@ static int execute_certrep_create(CMP_MSG_TEST_FIXTURE *fixture)
goto err;
if (!TEST_ptr_null(ossl_cmp_certrepmessage_get0_certresponse(crepmsg, 88)))
goto err;
- privkey = OSSL_CMP_CTX_get0_newPkey(ctx, 1); /* may be NULL */
- certfromresp = ossl_cmp_certresponse_get1_cert(read_cresp, ctx, privkey);
+ certfromresp = ossl_cmp_certresponse_get1_cert(ctx, read_cresp);
if (certfromresp == NULL || !TEST_int_eq(X509_cmp(cert, certfromresp), 0))
goto err;