Compare all timestamps using UTC timezone (#308)
This commit is contained in:
committed by
GitHub
parent
9a1c060234
commit
7c8894bb04
@@ -107,7 +107,7 @@ def main(args):
|
|||||||
|
|
||||||
cert = x509.load_pem_x509_certificate(args.certificate.read())
|
cert = x509.load_pem_x509_certificate(args.certificate.read())
|
||||||
# Some sanity/validity checks
|
# Some sanity/validity checks
|
||||||
now = datetime.datetime.now()
|
now = datetime.datetime.utcnow()
|
||||||
if cert.not_valid_before > now:
|
if cert.not_valid_before > now:
|
||||||
fatal("Certificate validity starts in the future.")
|
fatal("Certificate validity starts in the future.")
|
||||||
if cert.not_valid_after <= now:
|
if cert.not_valid_after <= now:
|
||||||
|
|||||||
Reference in New Issue
Block a user