summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-05-13 09:28:24 +0200
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-08-21 09:04:11 +0200
commit1a7cd250ad55a3c9d684a7259c20ea8075c2b08b (patch)
treea0b9578bdfbe5d577a9077a33a631d480be42c74 /test
parent7b1a3a506273bc043cefd7c2202300a9bf81daa0 (diff)
downloadopenssl-new-1a7cd250ad55a3c9d684a7259c20ea8075c2b08b.tar.gz
Add libctx and propq parameters to OSSL_CMP_{SRV_},CTX_new() and ossl_cmp_mock_srv_new()
Also remove not really to-the-point error message if call fails in apps/cmp.c Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/11808)
Diffstat (limited to 'test')
-rw-r--r--test/cmp_client_test.c4
-rw-r--r--test/cmp_ctx_test.c2
-rw-r--r--test/cmp_hdr_test.c2
-rw-r--r--test/cmp_msg_test.c2
-rw-r--r--test/cmp_protect_test.c2
-rw-r--r--test/cmp_server_test.c4
-rw-r--r--test/cmp_vfy_test.c2
7 files changed, 9 insertions, 9 deletions
diff --git a/test/cmp_client_test.c b/test/cmp_client_test.c
index d305eb5610..f5c3fd77c9 100644
--- a/test/cmp_client_test.c
+++ b/test/cmp_client_test.c
@@ -62,7 +62,7 @@ static CMP_SES_TEST_FIXTURE *set_up(const char *const test_case_name)
if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture))))
return NULL;
fixture->test_case_name = test_case_name;
- if (!TEST_ptr(fixture->srv_ctx = ossl_cmp_mock_srv_new())
+ if (!TEST_ptr(fixture->srv_ctx = ossl_cmp_mock_srv_new(NULL, NULL))
|| !OSSL_CMP_SRV_CTX_set_accept_unprotected(fixture->srv_ctx, 1)
|| !ossl_cmp_mock_srv_set1_certOut(fixture->srv_ctx, client_cert)
|| (srv_cmp_ctx =
@@ -70,7 +70,7 @@ static CMP_SES_TEST_FIXTURE *set_up(const char *const test_case_name)
|| !OSSL_CMP_CTX_set1_cert(srv_cmp_ctx, server_cert)
|| !OSSL_CMP_CTX_set1_pkey(srv_cmp_ctx, server_key))
goto err;
- if (!TEST_ptr(fixture->cmp_ctx = ctx = OSSL_CMP_CTX_new())
+ if (!TEST_ptr(fixture->cmp_ctx = ctx = OSSL_CMP_CTX_new(NULL, NULL))
|| !OSSL_CMP_CTX_set_log_cb(fixture->cmp_ctx, print_to_bio_out)
|| !OSSL_CMP_CTX_set_transfer_cb(ctx, OSSL_CMP_CTX_server_perform)
|| !OSSL_CMP_CTX_set_transfer_cb_arg(ctx, fixture->srv_ctx)
diff --git a/test/cmp_ctx_test.c b/test/cmp_ctx_test.c
index 898053424e..184e5bf498 100644
--- a/test/cmp_ctx_test.c
+++ b/test/cmp_ctx_test.c
@@ -37,7 +37,7 @@ static OSSL_CMP_CTX_TEST_FIXTURE *set_up(const char *const test_case_name)
if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture))))
return NULL;
- if (!TEST_ptr(fixture->ctx = OSSL_CMP_CTX_new())) {
+ if (!TEST_ptr(fixture->ctx = OSSL_CMP_CTX_new(NULL, NULL))) {
tear_down(fixture);
return NULL;
}
diff --git a/test/cmp_hdr_test.c b/test/cmp_hdr_test.c
index 24299ab508..4dcf998e26 100644
--- a/test/cmp_hdr_test.c
+++ b/test/cmp_hdr_test.c
@@ -38,7 +38,7 @@ static CMP_HDR_TEST_FIXTURE *set_up(const char *const test_case_name)
if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture))))
return NULL;
fixture->test_case_name = test_case_name;
- if (!TEST_ptr(fixture->cmp_ctx = OSSL_CMP_CTX_new()))
+ if (!TEST_ptr(fixture->cmp_ctx = OSSL_CMP_CTX_new(NULL, NULL)))
goto err;
if (!TEST_ptr(fixture->hdr = OSSL_CMP_PKIHEADER_new()))
goto err;
diff --git a/test/cmp_msg_test.c b/test/cmp_msg_test.c
index ca2a65113f..2d96596520 100644
--- a/test/cmp_msg_test.c
+++ b/test/cmp_msg_test.c
@@ -51,7 +51,7 @@ static CMP_MSG_TEST_FIXTURE *set_up(const char *const test_case_name)
return NULL;
fixture->test_case_name = test_case_name;
- if (!TEST_ptr(fixture->cmp_ctx = OSSL_CMP_CTX_new())
+ if (!TEST_ptr(fixture->cmp_ctx = OSSL_CMP_CTX_new(NULL, NULL))
|| !TEST_true(SET_OPT_UNPROTECTED_SEND(fixture->cmp_ctx, 1))
|| !TEST_true(OSSL_CMP_CTX_set1_referenceValue(fixture->cmp_ctx,
ref, sizeof(ref)))) {
diff --git a/test/cmp_protect_test.c b/test/cmp_protect_test.c
index eed850ee57..9ac590ab63 100644
--- a/test/cmp_protect_test.c
+++ b/test/cmp_protect_test.c
@@ -56,7 +56,7 @@ static CMP_PROTECT_TEST_FIXTURE *set_up(const char *const test_case_name)
if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture))))
return NULL;
fixture->test_case_name = test_case_name;
- if (!TEST_ptr(fixture->cmp_ctx = OSSL_CMP_CTX_new())) {
+ if (!TEST_ptr(fixture->cmp_ctx = OSSL_CMP_CTX_new(NULL, NULL))) {
tear_down(fixture);
return NULL;
}
diff --git a/test/cmp_server_test.c b/test/cmp_server_test.c
index 13159299e9..dc52a2515d 100644
--- a/test/cmp_server_test.c
+++ b/test/cmp_server_test.c
@@ -33,7 +33,7 @@ static CMP_SRV_TEST_FIXTURE *set_up(const char *const test_case_name)
if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture))))
return NULL;
fixture->test_case_name = test_case_name;
- if (!TEST_ptr(fixture->srv_ctx = OSSL_CMP_SRV_CTX_new()))
+ if (!TEST_ptr(fixture->srv_ctx = OSSL_CMP_SRV_CTX_new(NULL, NULL)))
goto err;
return fixture;
@@ -67,7 +67,7 @@ static int execute_test_handle_request(CMP_SRV_TEST_FIXTURE *fixture)
OSSL_CMP_ERRORMSGCONTENT *errorContent;
int res = 0;
- if (!TEST_ptr(client_ctx = OSSL_CMP_CTX_new())
+ if (!TEST_ptr(client_ctx = OSSL_CMP_CTX_new(NULL, NULL))
|| !TEST_true(OSSL_CMP_CTX_set_transfer_cb_arg(client_ctx, ctx)))
goto end;
diff --git a/test/cmp_vfy_test.c b/test/cmp_vfy_test.c
index 4c705f62c8..8d654c6ab4 100644
--- a/test/cmp_vfy_test.c
+++ b/test/cmp_vfy_test.c
@@ -56,7 +56,7 @@ static CMP_VFY_TEST_FIXTURE *set_up(const char *const test_case_name)
return NULL;
fixture->test_case_name = test_case_name;
if (ts == NULL
- || !TEST_ptr(fixture->cmp_ctx = OSSL_CMP_CTX_new())
+ || !TEST_ptr(fixture->cmp_ctx = OSSL_CMP_CTX_new(NULL, NULL))
|| !OSSL_CMP_CTX_set0_trustedStore(fixture->cmp_ctx, ts)
|| !OSSL_CMP_CTX_set_log_cb(fixture->cmp_ctx, print_to_bio_out)) {
tear_down(fixture);