Compare all timestamps using UTC timezone (#308)

This commit is contained in:
Jean-Michel Picod
2021-04-15 17:22:38 +02:00
committed by GitHub
parent 9a1c060234
commit 7c8894bb04

View File

@@ -107,7 +107,7 @@ def main(args):
cert = x509.load_pem_x509_certificate(args.certificate.read())
# Some sanity/validity checks
now = datetime.datetime.now()
now = datetime.datetime.utcnow()
if cert.not_valid_before > now:
fatal("Certificate validity starts in the future.")
if cert.not_valid_after <= now: