fix: Use new not after utc for cert date
This commit is contained in:
parent
c657edd08a
commit
778b32f78c
@ -190,9 +190,9 @@ def https_check(params, authentication):
|
||||
break
|
||||
|
||||
|
||||
expiry_date = cert_obj.not_valid_after
|
||||
expiry_date = cert_obj.not_valid_after_utc
|
||||
# Check if expiry date is past
|
||||
if expiry_date < datetime.datetime.now():
|
||||
if expiry_date < datetime.datetime.now(datetime.timezone.utc):
|
||||
return {"result": "Certificate is expired"}
|
||||
else:
|
||||
return {"result": "No certificate found"}
|
||||
|
Loading…
Reference in New Issue
Block a user