diff --git a/esnicheck/check.py b/esnicheck/check.py index dbd4ea1..0b7c2bc 100644 --- a/esnicheck/check.py +++ b/esnicheck/check.py @@ -160,8 +160,8 @@ def has_tls13(self): protocol = ssock.version() except (ConnectionRefusedError, ConnectionResetError): return (False, "Unable to connect to port 443") - except ssl.CertificateError as error: - return (False, error.verify_message) + except ssl.SSLError as error: + return (False, error.reason) except socket.gaierror: return (False, "Hostname lookup failed") except socket.timeout: