diff --git a/postgres_get_server_cert.py b/postgres_get_server_cert.py index 9301bee..065f7f8 100755 --- a/postgres_get_server_cert.py +++ b/postgres_get_server_cert.py @@ -66,7 +66,7 @@ def request_ssl(sock): def get_ssl_context(): # Return the strongest SSL context available locally - for proto in ('PROTOCOL_TLSv1_2', 'PROTOCOL_TLSv1', 'PROTOCOL_SSLv23'): + for proto in ('PROTOCOL_TLSv1_3', 'PROTOCOL_TLSv1_2', 'PROTOCOL_TLSv1', 'PROTOCOL_SSLv23'): protocol = getattr(ssl, proto, None) if protocol: break