Skip to content

Commit 1eb0feb

Browse files
authored
Merge pull request nabla-c0d3#613 from FestiveKyle/catch-oserror
Catch OSError when checking client auth requirement
2 parents 08b9f17 + bb0692e commit 1eb0feb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

sslyze/server_connectivity.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,17 @@ def _detect_client_auth_requirement_with_tls_1_3(
372372
else:
373373
raise
374374

375+
except OSError as e:
376+
# If these errors get propagated here, it means they're not part of the known/normal errors that
377+
# can happen when trying to check requirements for client auth and defined in tls_connection.py
378+
# Hence we re-raise these as "unknown" connection errors; might be caused by bad connectivity to
379+
# the server (random disconnects, etc.) and the scan against this server should not be performed
380+
raise ConnectionToServerFailed(
381+
server_location=server_location,
382+
network_configuration=network_config,
383+
error_message=f'Unexpected connection error: "{e.args}"',
384+
)
385+
375386
finally:
376387
ssl_connection_auth.close()
377388

0 commit comments

Comments
 (0)