Servers requesting client cert can cause scan to hang forever if server closes connection
FestiveKyle opened this issue · comments
Describe the bug
If a server requests a client cert but then closes the connection, the scan will never finish. The issue occurs at _detect_client_auth_requirement_with_tls_1_3 under check_connectivity_to_server during the ssl_connection_auth.ssl_client.read(1) step. The client throws an IOError here which doesn't get caught.
Expected behavior
The error would be caught and shown in the results.
Looking at _detect_support_for_tls_1_3, this error would be caught under OSError, perhaps this could be added to _detect_client_auth_requirement_with_tls_1_3 as well?
Python environment (please complete the following information):
- OS: Ubuntu 22.04
- Python version: 3.11.4
Additional context
Image of error:
Nice catch! Thanks for the detailed report and PR 👍👍
Fixed in v5.2.0.