Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
error-the-certificate-provided-is-not-valid-until-when-starting-tabpy
issue: certificate not_before and not_after are naive datetimes in UTC,
so now variable should use datetime.utcnow().
  • Loading branch information
jhilyard committed May 3, 2023
1 parent 61bc4b2 commit 35c8249
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tabpy/tabpy_server/app/util.py
Expand Up @@ -17,7 +17,7 @@ def validate_cert(cert_file_path):
date_format, encoding = "%Y%m%d%H%M%SZ", "ascii"
not_before = datetime.strptime(cert.get_notBefore().decode(encoding), date_format)
not_after = datetime.strptime(cert.get_notAfter().decode(encoding), date_format)
now = datetime.now()
now = datetime.utcnow()

https_error = "Error using HTTPS: "
if now < not_before:
Expand Down

0 comments on commit 35c8249

Please sign in to comment.