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

Viktor Dukhovni noreply at github.com
Tue Apr 16 16:00:03 UTC 2024


  Branch: refs/heads/fix-cert-date-tests
  Home:   https://github.com/openssl/openssl
  Commit: ec9f5c0d2d652371cb4fe19d7e40fdfbcbef1c55
      https://github.com/openssl/openssl/commit/ec9f5c0d2d652371cb4fe19d7e40fdfbcbef1c55
  Author: Viktor Dukhovni <openssl-users at dukhovni.org>
  Date:   2024-04-16 (Tue, 16 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



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