diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-09-04 09:29:01 +0200 |
---|---|---|
committer | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-09-05 18:10:03 +0200 |
commit | 39082af2fa6549c3d92c917ea5a423bca57c7b42 (patch) | |
tree | 2e42a3bafd12963a1e55f039361d28dc9320374f /test/cmp_ctx_test.c | |
parent | test/drbgtest: improve the reseed after fork test (diff) | |
download | openssl-39082af2fa6549c3d92c917ea5a423bca57c7b42.tar.xz openssl-39082af2fa6549c3d92c917ea5a423bca57c7b42.zip |
Add OSSL_CMP_CTX_get1_newChain() and related CLI option -chainout
Also simplify certificate saving in apps/cmp.c
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12790)
Diffstat (limited to 'test/cmp_ctx_test.c')
-rw-r--r-- | test/cmp_ctx_test.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/cmp_ctx_test.c b/test/cmp_ctx_test.c index 184e5bf498..9b2a53df5f 100644 --- a/test/cmp_ctx_test.c +++ b/test/cmp_ctx_test.c @@ -76,6 +76,7 @@ static int execute_CTX_reinit_test(OSSL_CMP_CTX_TEST_FIXTURE *fixture) if (!ossl_cmp_ctx_set0_statusString(ctx, sk_ASN1_UTF8STRING_new_null()) || !ossl_cmp_ctx_set0_newCert(ctx, X509_new()) || !TEST_ptr(certs = sk_X509_new_1()) + || !ossl_cmp_ctx_set1_newChain(ctx, certs) || !ossl_cmp_ctx_set1_caPubs(ctx, certs) || !ossl_cmp_ctx_set1_extraCertsIn(ctx, certs) || !ossl_cmp_ctx_set0_validatedSrvCert(ctx, X509_new()) @@ -93,6 +94,7 @@ static int execute_CTX_reinit_test(OSSL_CMP_CTX_TEST_FIXTURE *fixture) && ctx->failInfoCode == -1 && ctx->statusString == NULL && ctx->newCert == NULL + && ctx->newChain == NULL && ctx->caPubs == NULL && ctx->extraCertsIn == NULL && ctx->validatedSrvCert == NULL @@ -780,6 +782,7 @@ DEFINE_SET_GET_INT_TEST(ossl_cmp, ctx, status) DEFINE_SET_GET_SK_TEST(ossl_cmp, ctx, 0, 0, statusString, ASN1_UTF8STRING) DEFINE_SET_GET_INT_TEST(ossl_cmp, ctx, failInfoCode) DEFINE_SET_GET_TEST(ossl_cmp, ctx, 0, 0, 0, newCert, X509) +DEFINE_SET_GET_SK_X509_TEST(ossl_cmp, ctx, 1, 1, newChain) DEFINE_SET_GET_SK_X509_TEST(ossl_cmp, ctx, 1, 1, caPubs) DEFINE_SET_GET_SK_X509_TEST(ossl_cmp, ctx, 1, 1, extraCertsIn) @@ -869,6 +872,7 @@ int setup_tests(void) ADD_TEST(test_CTX_set0_get0_statusString); ADD_TEST(test_CTX_set_get_failInfoCode); ADD_TEST(test_CTX_set0_get0_newCert); + ADD_TEST(test_CTX_set1_get1_newChain); ADD_TEST(test_CTX_set1_get1_caPubs); ADD_TEST(test_CTX_set1_get1_extraCertsIn); /* exported for testing and debugging purposes: */ |