summaryrefslogtreecommitdiffstats
path: root/test/recipes/25-test_req.t
diff options
context:
space:
mode:
Diffstat (limited to 'test/recipes/25-test_req.t')
-rw-r--r--test/recipes/25-test_req.t7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/recipes/25-test_req.t b/test/recipes/25-test_req.t
index f68f443fe4..872ed316fc 100644
--- a/test/recipes/25-test_req.t
+++ b/test/recipes/25-test_req.t
@@ -609,7 +609,7 @@ ok(run(app(["openssl", "x509", "-in", "testreq-cert.pem",
"-noout", "-text"])), "cert verification");
# Generate cert with explicit start and end dates
-my $today = strftime("%Y-%m-%d", localtime);
+my %today = (strftime("%Y-%m-%d", gmtime) => 1);
my $cert = "self-signed_explicit_date.pem";
ok(run(app(["openssl", "req", "-x509", "-new", "-text",
"-config", srctop_file('test', 'test.cnf'),
@@ -617,5 +617,6 @@ ok(run(app(["openssl", "req", "-x509", "-new", "-text",
"-not_before", "today",
"-not_after", "today",
"-out", $cert]))
-&& get_not_before_date($cert) eq $today
-&& get_not_after_date($cert) eq $today, "explicit start and end dates");
+&& ++$today{strftime("%Y-%m-%d", gmtime)}
+&& (grep { defined $today{$_} } get_not_before_date($cert))
+&& (grep { defined $today{$_} } get_not_after_date($cert)), "explicit start and end dates");