[openssl/openssl] 1692e0: Fix fragile explicit cert date tests.

openssl-machine noreply at github.com
Thu Apr 18 12:23:05 UTC 2024


  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 1692e0d225a7cf513933c05207ceeace4dc85539
      https://github.com/openssl/openssl/commit/1692e0d225a7cf513933c05207ceeace4dc85539
  Author: Viktor Dukhovni <openssl-users at dukhovni.org>
  Date:   2024-04-18 (Thu, 18 Apr 2024)

  Changed paths:
    M test/recipes/25-test_req.t
    M test/recipes/25-test_x509.t

  Log Message:
  -----------
  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 at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24139)



To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications


More information about the openssl-commits mailing list