Skip to content

Commit c7dee9a

Browse files
committed
Make sensitivity of is_vulnerable_to_client_renegotiation_dos configurable
1 parent 761892b commit c7dee9a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

sslyze/plugins/session_renegotiation_plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def _test_client_renegotiation(server_info: ServerConnectivityInfo) -> Tuple[_Sc
180180
try:
181181
# Do a reneg multiple times in a row to be 100% sure that the server has no mitigations in place
182182
# https://github.com/nabla-c0d3/sslyze/issues/473
183-
for i in range(10):
183+
for i in range(server_info.network_configuration.client_renegotiation_attempts):
184184
ssl_connection.ssl_client.do_renegotiate()
185185
accepts_client_renegotiation = True
186186

sslyze/server_setting.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@ class ServerNetworkConfiguration:
173173
xmpp_to_hostname: The hostname to set within the `to` attribute of the XMPP stream. If not supplied, the
174174
server's hostname will be used. Should only be set if the supplied `tls_wrapped_protocol` is an
175175
XMPP protocol.
176+
client_renegotiation_attempts: The number of attempts to make when testing the client initiated
177+
renegotiation DoS vector. If the server accepts this many attempts,
178+
is_vulnerable_to_client_renegotiation_dos is set. Default: 10.
176179
network_timeout: The timeout (in seconds) to be used when attempting to establish a connection to the
177180
server.
178181
network_max_retries: The number of retries SSLyze will perform when attempting to establish a connection
@@ -184,6 +187,7 @@ class ServerNetworkConfiguration:
184187
tls_client_auth_credentials: Optional[ClientAuthenticationCredentials] = None
185188

186189
xmpp_to_hostname: Optional[str] = None
190+
client_renegotiation_attempts: int = 10
187191

188192
network_timeout: int = 5
189193
network_max_retries: int = 3

0 commit comments

Comments
 (0)