#include
char *ERR_error_string(unsigned long e, char *buf); void ERR_error_string_n(unsigned long e, char *buf, size_t len);
const char *ERR_lib_error_string(unsigned long e); const char *ERR_func_error_string(unsigned long e); const char *ERR_reason_error_string(unsigned long e);
The string will have the following format:
error:[error code]:[library name]:[function name]:[reason string]
_e_r_r_o_r _c_o_d_e is an 8 digit hexadecimal number, _l_i_b_r_a_r_y _n_a_m_e, _f_u_n_c_t_i_o_n _n_a_m_e and _r_e_a_s_o_n _s_t_r_i_n_g are ASCII text.
_E_R_R___l_i_b___e_r_r_o_r___s_t_r_i_n_g_(_), _E_R_R___f_u_n_c___e_r_r_o_r___s_t_r_i_n_g_(_) and _E_R_R___r_e_a_s_o_n___e_r_r_o_r___s_t_r_i_n_g_(_) return the library name, function name and reason string respectively.
The OpenSSL error strings should be loaded by calling _E_R_R___l_o_a_d___c_r_y_p_t_o___s_t_r_i_n_g_s(3) or, for SSL applications, _S_S_L___l_o_a_d___e_r_r_o_r___s_t_r_i_n_g_s(3) first. If there is no text string registered for the given error code, the error string will contain the numeric code.
_E_R_R___p_r_i_n_t___e_r_r_o_r_s(3) can be used to print all error codes currently in the queue.
_E_R_R___l_i_b___e_r_r_o_r___s_t_r_i_n_g_(_), _E_R_R___f_u_n_c___e_r_r_o_r___s_t_r_i_n_g_(_) and _E_R_R___r_e_a_s_o_n___e_r_r_o_r___s_t_r_i_n_g_(_) return the strings, and NNUULLLL if none is registered for the error code.