diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-08-12 20:24:26 +0200 |
---|---|---|
committer | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-08-21 09:04:09 +0200 |
commit | 06cee80a843cae6bcb2dcba7eab26c963e10f825 (patch) | |
tree | ef5df87115cca88e27ee82d0ce2c57ba7757e1c4 /test/cmp_msg_test.c | |
parent | 1a7ceb6c74d930fd5dfbcd06350b4cef0228936b (diff) |
testutil: Make SETUP_TEST_FIXTURE return 0 on fixture == NULL
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/11808)
Diffstat (limited to 'test/cmp_msg_test.c')
-rw-r--r-- | test/cmp_msg_test.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/cmp_msg_test.c b/test/cmp_msg_test.c index 92989f95e1..ca2a65113f 100644 --- a/test/cmp_msg_test.c +++ b/test/cmp_msg_test.c @@ -137,10 +137,12 @@ static int set1_newPkey(OSSL_CMP_CTX *ctx, EVP_PKEY *pkey) static int test_cmp_create_ir_protection_set(void) { - SETUP_TEST_FIXTURE(CMP_MSG_TEST_FIXTURE, set_up); - OSSL_CMP_CTX *ctx = fixture->cmp_ctx; + OSSL_CMP_CTX *ctx; unsigned char secret[16]; + SETUP_TEST_FIXTURE(CMP_MSG_TEST_FIXTURE, set_up); + + ctx = fixture->cmp_ctx; fixture->bodytype = OSSL_CMP_PKIBODY_IR; fixture->err_code = -1; fixture->expected = 1; @@ -213,10 +215,11 @@ static int test_cmp_create_certreq_with_invalid_bodytype(void) static int test_cmp_create_p10cr(void) { - SETUP_TEST_FIXTURE(CMP_MSG_TEST_FIXTURE, set_up); - OSSL_CMP_CTX *ctx = fixture->cmp_ctx; + OSSL_CMP_CTX *ctx; X509_REQ *p10cr = NULL; + SETUP_TEST_FIXTURE(CMP_MSG_TEST_FIXTURE, set_up); + ctx = fixture->cmp_ctx; fixture->bodytype = OSSL_CMP_PKIBODY_P10CR; fixture->err_code = CMP_R_ERROR_CREATING_CERTREQ; fixture->expected = 1; |