diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-03-10 10:29:46 +0100 |
---|---|---|
committer | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-03-10 16:09:44 +0100 |
commit | 62dcd2aa17b27b7892ad62540f9034c9192f6530 (patch) | |
tree | edaeb955151ff3c43c7d6a33b5f6047bd05e637c /test/cmp_vfy_test.c | |
parent | da42c2a3d752628e15b47aa7511e7044745080cb (diff) | |
download | openssl-62dcd2aa17b27b7892ad62540f9034c9192f6530.tar.gz |
Chunk 8 of CMP contribution to OpenSSL: CMP server and cmp_mock_srv.c for testing
Certificate Management Protocol (CMP, RFC 4210) extension to OpenSSL
Also includes CRMF (RFC 4211) and HTTP transfer (RFC 6712).
Adds the CMP and CRMF API to libcrypto and the "cmp" app to the CLI.
Adds extensive documentation and tests.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/11142)
Diffstat (limited to 'test/cmp_vfy_test.c')
-rw-r--r-- | test/cmp_vfy_test.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/cmp_vfy_test.c b/test/cmp_vfy_test.c index 41ddad86ba..f52efa9855 100644 --- a/test/cmp_vfy_test.c +++ b/test/cmp_vfy_test.c @@ -69,7 +69,7 @@ static CMP_VFY_TEST_FIXTURE *set_up(const char *const test_case_name) return NULL; } X509_VERIFY_PARAM_set_time(X509_STORE_get0_param(ts), test_time_valid); - X509_STORE_set_verify_cb(ts, OSSL_CMP_print_cert_verify_cb); + X509_STORE_set_verify_cb(ts, X509_STORE_CTX_print_verify_cb); return fixture; } @@ -437,8 +437,7 @@ static void setup_check_received(CMP_VFY_TEST_FIXTURE **fixture, int expected, nonce_data, nonce_len))) { tear_down((*fixture)); (*fixture) = NULL; - } - else if (trid_data != NULL) { + } else if (trid_data != NULL) { ASN1_OCTET_STRING *trid = ASN1_OCTET_STRING_new(); if (trid == NULL || !ASN1_OCTET_STRING_set(trid, trid_data, @@ -549,6 +548,11 @@ int setup_tests(void) ts.tm_year += 10; /* February 18th 2028 */ test_time_after_expiration = mktime(&ts); + if (!test_skip_common_options()) { + TEST_error("Error parsing test options\n"); + return 0; + } + RAND_bytes(rand_data, OSSL_CMP_TRANSACTIONID_LENGTH); if (!TEST_ptr(server_f = test_get_argument(0)) || !TEST_ptr(client_f = test_get_argument(1)) |