diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-05-13 16:03:26 +0200 |
---|---|---|
committer | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-08-21 09:04:12 +0200 |
commit | 28e9f62b2dd5f59218bd7d5c3ef877dd06e5eb97 (patch) | |
tree | 0dcb04286e0915154867c5c3b56ed80916d5ca5f /test/cmp_protect_test.c | |
parent | 1930b58642a67eecf23708aa71df9e193e849a3c (diff) |
cmp_util.c: Add OPENSSL_CTX parameter to ossl_cmp_build_cert_chain(), improve its doc
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/11808)
Diffstat (limited to 'test/cmp_protect_test.c')
-rw-r--r-- | test/cmp_protect_test.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/cmp_protect_test.c b/test/cmp_protect_test.c index 9ac590ab63..2a2a697051 100644 --- a/test/cmp_protect_test.c +++ b/test/cmp_protect_test.c @@ -335,14 +335,16 @@ static int test_MSG_add_extraCerts(void) /* The cert chain tests use EC certs so we skip them in no-ec builds */ static int execute_cmp_build_cert_chain_test(CMP_PROTECT_TEST_FIXTURE *fixture) { - STACK_OF(X509) *result = NULL; int ret = 0; + OSSL_CMP_CTX *ctx = fixture->cmp_ctx; + STACK_OF(X509) *chain = + ossl_cmp_build_cert_chain(ctx->libctx, ctx->propq, + fixture->certs, fixture->cert); - if (TEST_ptr(result = ossl_cmp_build_cert_chain(fixture->certs, - fixture->cert))) { + if (TEST_ptr(chain)) { /* Check whether chain built is equal to the expected one */ - ret = TEST_int_eq(0, STACK_OF_X509_cmp(result, fixture->chain)); - sk_X509_pop_free(result, X509_free); + ret = TEST_int_eq(0, STACK_OF_X509_cmp(chain, fixture->chain)); + sk_X509_pop_free(chain, X509_free); } return ret; } |