Improve TLS error messages

Bug #1952607 reported by eMTee
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DC++
Confirmed
Low
Unassigned

Bug Description

DC++ displays a vague "TLS Error" most of the time e.g. when connecting to a hub with kp check and the hub cert is expired.
At least printing some error strings OpenSSL likely has defined, in English, would be much more useful. Just like what we do with low level socket errors, where we print the error message what Windows offers, in the language of the current locale.

Revision history for this message
cologic (cologic) wrote :

A combination of https://www.openssl.org/docs/man1.1.1/man3/ERR_get_error.html (though one has to ensure one picks whether one wants the most recent or least recent still-known error per thread) and https://www.openssl.org/docs/man1.1.1/man3/ERR_error_string.html ("Note that this function is not thread-safe and does no checks on the size of the buffer; use ERR_error_string_n() instead.") seems to be the most straightforward ways of doing this.

Revision history for this message
eMTee (realprogger) wrote :

We actually have a reason why these aren't displayed. See https://sourceforge.net/p/dcplusplus/code/ci/86fb99c179b26740946abe87f1af190b8fcf24bc/tree/dcpp/SSLSocket.cpp#L185

However, this might worth a reconsideration and change to something or exactly like what AirDC++ does in https://github.com/airdcpp/airdcpp-windows/blob/bd9a1ce849ccde795d8b0d9c1fe3ebcfa4a7aea5/airdcpp/airdcpp/SSLSocket.cpp#L199

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.