From: Matt Caswell Date: Tue, 29 Jun 2021 13:12:28 +0000 (+0100) Subject: Use TEST_time_t_* functions in cmp_hrd_test.c X-Git-Tag: openssl-3.0.0-beta2~126 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4616a61416e7ea860e871001879e735943434f00;p=thirdparty%2Fopenssl.git Use TEST_time_t_* functions in cmp_hrd_test.c This gives better diagnostic output Reviewed-by: Tomas Mraz Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/15939) --- diff --git a/test/cmp_hdr_test.c b/test/cmp_hdr_test.c index f4bc65bb9e9..178a1330355 100644 --- a/test/cmp_hdr_test.c +++ b/test/cmp_hdr_test.c @@ -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)