Fix timezone mismatch in acm certificate created date and now date check
This commit is contained in:
parent
b40c5e557e
commit
760f466a9c
@ -170,7 +170,7 @@ class CertBundle(BaseModel):
|
||||
try:
|
||||
self._cert = cryptography.x509.load_pem_x509_certificate(self.cert, default_backend())
|
||||
|
||||
now = datetime.datetime.now()
|
||||
now = datetime.datetime.utcnow()
|
||||
if self._cert.not_valid_after < now:
|
||||
raise AWSValidationException('The certificate has expired, is not valid.')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user