Skip to content

SslError not handled during connectivity testing #562

@domainabusers

Description

@domainabusers

Describe the bug
Unlike _nassl.OpenSSLError, _nassl.SslError is not handled in server_connectivity.py. Further, neither OpenSSLError nor SslError are handled during client certificate requirement testing. I believe this causes the scanner to hang indefinitely if the remote server closes the connection during connectivity testing ("Connection was shut down by peer").

To Reproduce
Steps to reproduce the behavior:

  1. Install SSLyze using pip
  2. Run the API sample code on a server which closes the connection during client certificate requirement testing.
  3. See error

Expected behavior
The SslError in turn throws ConnectionToServerFailed, perhaps with an indication of which stage of connection testing the connection failed. I believe this will in turn add the terminated thread to the results queue in _mass_connectivity_tester.py.

Python environment (please complete the following information):

  • OS: CentOS 7
  • Python version: 3.8.11

Additional context
I believe SslError is also used for I/O errors in nassl. I queued a large number of servers in SSLyze and am thus unsure which server is causing the SslError. I have not tried to reproduce the error myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions