@@ -86,6 +86,7 @@ def check_connectivity_to_server(
86
86
TlsVersionEnum .TLS_1_1 ,
87
87
TlsVersionEnum .TLS_1_0 ,
88
88
TlsVersionEnum .SSL_3_0 ,
89
+ TlsVersionEnum .SSL_2_0 ,
89
90
]:
90
91
try :
91
92
tls_detection_result = _detect_support_for_tls_1_2_or_below (
@@ -105,6 +106,14 @@ def check_connectivity_to_server(
105
106
error_message = "TLS probing failed: could not find a TLS version and cipher suite supported by the server" ,
106
107
)
107
108
109
+ if tls_detection_result .tls_version_supported == TlsVersionEnum .SSL_2_0 :
110
+ raise ServerTlsConfigurationNotSupported (
111
+ server_location = server_location ,
112
+ network_configuration = network_configuration ,
113
+ error_message = "WARNING: Server only supports SSL 2.0 and is therefore affected by critical vulnerabilities."
114
+ " Update the server's software as soon as possible." ,
115
+ )
116
+
108
117
# If the server requested a client certificate, detect if the client cert is optional or required
109
118
client_auth_requirement = ClientAuthRequirementEnum .DISABLED
110
119
if tls_detection_result .server_requested_client_cert :
@@ -272,10 +281,17 @@ def _detect_support_for_tls_1_2_or_below(
272
281
network_config : ServerNetworkConfiguration ,
273
282
tls_version : TlsVersionEnum ,
274
283
) -> _TlsVersionDetectionResult :
284
+
285
+ if tls_version == TlsVersionEnum .SSL_2_0 :
286
+ # DEFAULT excludes SSLv2 ciphers in OpenSSL 1.0.2
287
+ default_cipher_list = "SSLv2"
288
+ else :
289
+ default_cipher_list = "DEFAULT"
290
+
275
291
# First try the default cipher list, and then all ciphers; this is to work around F5 network devices
276
292
# that time out when the client hello is too long (ie. too many cipher suites enabled)
277
293
# https://support.f5.com/csp/article/K14758
278
- for cipher_list in ["DEFAULT" , "ALL:COMPLEMENTOFALL:-PSK:-SRP" ]:
294
+ for cipher_list in [default_cipher_list , "ALL:COMPLEMENTOFALL:-PSK:-SRP" ]:
279
295
ssl_connection = SslConnection (
280
296
server_location = server_location ,
281
297
network_configuration = network_config ,
0 commit comments