Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Use ERR_get_error to get last SSL error in openssl.d #796
I dug more into this:
So the right approach IMHO would be to check if an error exists using SSL_get_error() and then get the error (or the errors) using ERR_get_error().
Trying to refactor the patch I saw there is no need to check both function, we already know an error exists and we only need to give the user a proper error string so he can understand why SSL failed. Using ERR_get_error() / ERR_error_string() we do the job.