diff --git a/ssltools/__init__.py b/ssltools/__init__.py index 1605670..c5c7b38 100644 --- a/ssltools/__init__.py +++ b/ssltools/__init__.py @@ -1,4 +1,4 @@ -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")