ocspapitest: use TEST_true to report the exact failure
authorxkernel <xkernel.wang@foxmail.com>
Wed, 13 Jul 2022 03:07:31 +0000 (11:07 +0800)
committerTomas Mraz <tomas@openssl.org>
Thu, 14 Jul 2022 12:10:30 +0000 (14:10 +0200)
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18774)

test/ocspapitest.c

index 7142f50831ef3cd9f58d33aa5ea4f64c2b2f467b..bc0c965d853b9e588f59c0a023d7fc7613d8303f 100644 (file)
@@ -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)