ERR_GET_LIB, ERR_GET_FUNC, ERR_GET_REASON - Get library, function and
unsigned long e ); int ERR_GET_FUNC(
unsigned long e ); int ERR_GET_REASON(
unsigned long e );
The error code returned by the ERR_get_error() function consists of a
library number, function code and reason code. The ERR_GET_LIB(),
ERR_GET_FUNC(), and ERR_GET_REASON() macros can be used to extract
The library number and function code describe where the error occurred.
The reason code is the information about what went wrong.
Each sublibrary of OpenSSL has a unique library number; function and
reason codes are unique within each sublibrary. Different libraries
may use the same value to signal different functions and reasons.
The ERR_R_... reason codes, such as ERR_R_MALLOC_FAILURE, are globally
unique. However, when checking for sublibrary specific reason codes, be
sure to compare the library number.
These functions return the library number, function code, and reason
HISTORYERR_GET_LIB(), ERR_GET_FUNC(), and ERR_GET_REASON() are available in
all versions of SSLeay and OpenSSL.
Functions: err(3), ERR_get_error(3)ERR_GET_LIB(3)