]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Use TEST_time_t_* functions in cmp_hrd_test.c
authorMatt Caswell <matt@openssl.org>
Tue, 29 Jun 2021 13:12:28 +0000 (14:12 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 2 Jul 2021 16:44:02 +0000 (17:44 +0100)
This gives better diagnostic output

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15939)

test/cmp_hdr_test.c

index f4bc65bb9e9e5843395c106fced16e009a2a41f4..178a1330355f58c5863d3a2503dde16b4f08d849 100644 (file)
@@ -172,11 +172,11 @@ static int execute_HDR_update_messageTime_test(CMP_HDR_TEST_FIXTURE *fixture)
         return 0;
 
     hdrtime = mktime(&hdrtm);
-    if (!TEST_true(before <= hdrtime))
+    if (!TEST_time_t_le(before, hdrtime))
         return 0;
     now = time(NULL);
     after = mktime(gmtime(&now));
-    return TEST_true(hdrtime <= after);
+    return TEST_time_t_le(hdrtime, after);
 }
 
 static int test_HDR_update_messageTime(void)