So the ERR_error_string_n api gives me the output in the following format.
error:[error code]:[library name]:[function name]:[reason string]
I'm developing a product application and my requirement is that i need to give my own string as output to the log file, which is more readable and abstract for anyone facing that error, rather than the one that SSL dumps.
So instead of:
error:14082174:SSL routines:ssl3_check_cert_and_algorithm:dh key too small
I can dump just:
error: Handshake failure. dh key too small.
If i get all the possible error strings that SSL dumps, i can have a map that matches this string to a custom string of mine.
Did a bit of googling and openssl code browsing, but failed in getting the location storing the error strings.
Is there is a way i can achieve this ?