summaryrefslogtreecommitdiff
path: root/tests/white-box/network.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tests/white-box/network.rb')
-rw-r--r--tests/white-box/network.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/white-box/network.rb b/tests/white-box/network.rb
index 2436230b..436fc8a8 100644
--- a/tests/white-box/network.rb
+++ b/tests/white-box/network.rb
@@ -77,9 +77,9 @@ class Network < LeapTest
cert_paths.each do |cert_path|
if File.exists?(cert_path)
cert = OpenSSL::X509::Certificate.new(File.read(cert_path))
- if cert.not_after > Time.now
+ if Time.now > cert.not_after
fail "The certificate #{cert_path} expired on #{cert.not_after}"
- elsif cert.not_after > Time.now + THIRTY_DAYS
+ elsif Time.now + THIRTY_DAYS > cert.not_after
fail "The certificate #{cert_path} will expire soon, on #{cert.not_after}"
end
end