Use current UTC time for comparison against certificate validity. Closes #14. Thanks, mozz!

This commit is contained in:
Solderpunk 2020-05-28 21:01:04 +02:00
parent 6b17792546
commit fecd46378c
1 changed files with 1 additions and 1 deletions

View File

@ -672,7 +672,7 @@ Slow internet connection? Use 'set timeout' to be more patient.""")
def _validate_cert(self, address, host, cert):
now = datetime.datetime.now()
now = datetime.datetime.utcnow()
if _HAS_CRYPTOGRAPHY:
# Using the cryptography module we can get detailed access
# to the properties of even self-signed certs, unlike in