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_hdr_test.c | |
parent | 1a7ceb6c74d930fd5dfbcd06350b4cef0228936b (diff) | |
download | openssl-06cee80a843cae6bcb2dcba7eab26c963e10f825.zip openssl-06cee80a843cae6bcb2dcba7eab26c963e10f825.tar.gz openssl-06cee80a843cae6bcb2dcba7eab26c963e10f825.tar.bz2 |
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_hdr_test.c')
-rw-r--r-- | test/cmp_hdr_test.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/cmp_hdr_test.c b/test/cmp_hdr_test.c index cd30c49..24299ab 100644 --- a/test/cmp_hdr_test.c +++ b/test/cmp_hdr_test.c @@ -402,9 +402,10 @@ static int execute_HDR_init_test(CMP_HDR_TEST_FIXTURE *fixture) static int test_HDR_init_with_ref(void) { - SETUP_TEST_FIXTURE(CMP_HDR_TEST_FIXTURE, set_up); unsigned char ref[CMP_TEST_REFVALUE_LENGTH]; + SETUP_TEST_FIXTURE(CMP_HDR_TEST_FIXTURE, set_up); + fixture->expected = 1; if (!TEST_int_eq(1, RAND_bytes(ref, sizeof(ref))) || !TEST_true(OSSL_CMP_CTX_set1_referenceValue(fixture->cmp_ctx, @@ -418,9 +419,9 @@ static int test_HDR_init_with_ref(void) static int test_HDR_init_with_subject(void) { - SETUP_TEST_FIXTURE(CMP_HDR_TEST_FIXTURE, set_up); X509_NAME *subject = NULL; + SETUP_TEST_FIXTURE(CMP_HDR_TEST_FIXTURE, set_up); fixture->expected = 1; if (!TEST_ptr(subject = X509_NAME_new()) || !TEST_true(X509_NAME_ADD(subject, "CN", "Common Name")) |