]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix fragile explicit cert date tests.
authorViktor Dukhovni <openssl-users@dukhovni.org>
Mon, 15 Apr 2024 02:04:21 +0000 (22:04 -0400)
committerTomas Mraz <tomas@openssl.org>
Thu, 18 Apr 2024 12:20:54 +0000 (14:20 +0200)
commit1692e0d225a7cf513933c05207ceeace4dc85539
treee35964d44d07dff54ece17829b2756611dba4e9a
parent4174f26141a7db3e29dc1f96bc873d357f6ca824
Fix fragile explicit cert date tests.

The tests used localtime to format "today's" date, but then extracted a
GMT date from the cert.  The comparison breaks when run late in the
evening west of UTC, or early in the AM hours east of UTC.

Also took care of case when test runs at stroke of midnight, by
accepting either the "today" before the cert creation, or the
"today" after, should they be different.

Fixes fragile tests in #21716

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24139)
test/recipes/25-test_req.t
test/recipes/25-test_x509.t