diff options
author | xkernel <xkernel.wang@foxmail.com> | 2022-07-13 11:07:31 +0800 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-07-14 14:11:08 +0200 |
commit | e893c7b0434255cf915bd52b10a3c9f3c25c5a45 (patch) | |
tree | 8ab4ac621560b2ca9420530531e4e6e937fd17f3 /test/ocspapitest.c | |
parent | 287947928e54565baa2a46f37af55e18848c3227 (diff) |
ocspapitest: use TEST_true to report the exact failure
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18774)
(cherry picked from commit 180c8d7ae56378992b90ace9626d6df6ab1d4de8)
Diffstat (limited to 'test/ocspapitest.c')
-rw-r--r-- | test/ocspapitest.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/ocspapitest.c b/test/ocspapitest.c index 7142f50831..bc0c965d85 100644 --- a/test/ocspapitest.c +++ b/test/ocspapitest.c @@ -81,10 +81,11 @@ static OCSP_BASICRESP *make_dummy_resp(void) if (!TEST_ptr(name) || !TEST_ptr(key) || !TEST_ptr(serial) - || !X509_NAME_add_entry_by_NID(name, NID_commonName, MBSTRING_ASC, - namestr, -1, -1, 1) - || !ASN1_BIT_STRING_set(key, keybytes, sizeof(keybytes)) - || !ASN1_INTEGER_set_uint64(serial, (uint64_t)1)) + || !TEST_true(X509_NAME_add_entry_by_NID(name, NID_commonName, + MBSTRING_ASC, + namestr, -1, -1, 1)) + || !TEST_true(ASN1_BIT_STRING_set(key, keybytes, sizeof(keybytes))) + || !TEST_true(ASN1_INTEGER_set_uint64(serial, (uint64_t)1))) goto err; cid = OCSP_cert_id_new(EVP_sha256(), name, key, serial); if (!TEST_ptr(bs) |