From 62dcd2aa17b27b7892ad62540f9034c9192f6530 Mon Sep 17 00:00:00 2001 From: "Dr. David von Oheimb" Date: Tue, 10 Mar 2020 10:29:46 +0100 Subject: 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 Reviewed-by: David von Oheimb (Merged from https://github.com/openssl/openssl/pull/11142) --- test/cmp_status_test.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'test/cmp_status_test.c') diff --git a/test/cmp_status_test.c b/test/cmp_status_test.c index 7311c2e444..15cd6a5fd0 100644 --- a/test/cmp_status_test.c +++ b/test/cmp_status_test.c @@ -45,18 +45,18 @@ static int execute_PKISI_test(CMP_STATUS_TEST_FIXTURE *fixture) ASN1_UTF8STRING *statusString = NULL; int res = 0, i; - if (!TEST_ptr(si = ossl_cmp_statusinfo_new(fixture->pkistatus, + if (!TEST_ptr(si = OSSL_CMP_STATUSINFO_new(fixture->pkistatus, fixture->pkifailure, fixture->text))) goto end; - status = ossl_cmp_pkisi_get_pkistatus(si); + status = ossl_cmp_pkisi_get_status(si); if (!TEST_int_eq(fixture->pkistatus, status) || !TEST_str_eq(fixture->str, ossl_cmp_PKIStatus_to_string(status))) goto end; if (!TEST_ptr(statusString = - sk_ASN1_UTF8STRING_value(ossl_cmp_pkisi_get0_statusstring(si), + sk_ASN1_UTF8STRING_value(ossl_cmp_pkisi_get0_statusString(si), 0)) || !TEST_str_eq(fixture->text, (char *)statusString->data)) goto end; @@ -66,7 +66,7 @@ static int execute_PKISI_test(CMP_STATUS_TEST_FIXTURE *fixture) goto end; for (i = 0; i <= OSSL_CMP_PKIFAILUREINFO_MAX; i++) if (!TEST_int_eq((fixture->pkifailure >> i) & 1, - ossl_cmp_pkisi_pkifailureinfo_check(si, i))) + ossl_cmp_pkisi_check_pkifailureinfo(si, i))) goto end; res = 1; @@ -99,12 +99,12 @@ int setup_tests(void) { /*- * this tests all of: - * ossl_cmp_statusinfo_new() - * ossl_cmp_pkisi_get_pkistatus() + * OSSL_CMP_STATUSINFO_new() + * ossl_cmp_pkisi_get_status() * ossl_cmp_PKIStatus_to_string() - * ossl_cmp_pkisi_get0_statusstring() + * ossl_cmp_pkisi_get0_statusString() * ossl_cmp_pkisi_get_pkifailureinfo() - * ossl_cmp_pkisi_pkifailureinfo_check() + * ossl_cmp_pkisi_check_pkifailureinfo() */ ADD_TEST(test_PKISI); return 1; -- cgit v1.2.1