[issue35422] misleading error message from ssl.get_server_certificate() when bad port

2021-04-19 Thread Christian Heimes
Christian Heimes added the comment: There is no easy fix for that. The TLS handskae is performed by OpenSSL internally. You could open a feature request with OpenSSL and ask them to implement better error detection and reporting. -- resolution: -> wont fix stage: -> resolved status

[issue35422] misleading error message from ssl.get_server_certificate() when bad port

2019-04-08 Thread Ruluk
Ruluk added the comment: I would still validate the error somewhere, maybe before reaching the OpenSSL library, because that same error is also shown for other cases. E.g: http_connection = HTTPSConnection("localhost") http_connection.request("POST", my_url, my_body, my_headers) The use of a

[issue35422] misleading error message from ssl.get_server_certificate() when bad port

2018-12-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: Note this is just the error that OpenSSL produces. There isn't a whole Python can do to change it. -- nosy: +benjamin.peterson ___ Python tracker ___

[issue35422] misleading error message from ssl.get_server_certificate() when bad port

2018-12-05 Thread Cédric Van Rompay
New submission from Cédric Van Rompay : When calling ssl.get_server_certificate() with a bad port number (I used 80 when I should have been using 443), the error raised is a bit misleading: >>> import ssl >>> ssl.get_server_certificate(('gitlab.com',80)) [...] SSLError: [SSL: WR