Commit af06c5af authored by Klaus-Uwe Mitterer's avatar Klaus-Uwe Mitterer

Add logging in ssltools

parent c88f4f20
import datetime, OpenSSL, socket, ssl
import datetime, logging, OpenSSL, socket, ssl
PEM = 0
DER = 1
......@@ -27,4 +27,4 @@ def getRemoteExpiry(host,port):
try:
return datetime.datetime.strptime(str(OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, getRemoteCert(host, port)).get_notAfter().decode("UTF-8")), "%Y%m%d%H%M%SZ")
except:
pass
logging.exception("Could not receive remote certificate")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment