summaryrefslogtreecommitdiff
path: root/lib/libcrypto/man/ERR_GET_LIB.3
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2016-11-02 15:23:42 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2016-11-02 15:23:42 +0000
commitf694bb54c87ae39557f815fbd67ca45705562473 (patch)
treeac24112951b5adecaf6655b4dd89d72fd6f49e66 /lib/libcrypto/man/ERR_GET_LIB.3
parent7eea14558aa5be59676a633af5a6cbf1e25f45d7 (diff)
convert ERR manuals from pod to mdoc; while reading this,
i wtfed, laughed, puked, and cried in more or less that order...
Diffstat (limited to 'lib/libcrypto/man/ERR_GET_LIB.3')
-rw-r--r--lib/libcrypto/man/ERR_GET_LIB.363
1 files changed, 63 insertions, 0 deletions
diff --git a/lib/libcrypto/man/ERR_GET_LIB.3 b/lib/libcrypto/man/ERR_GET_LIB.3
new file mode 100644
index 00000000000..9b50ce39e64
--- /dev/null
+++ b/lib/libcrypto/man/ERR_GET_LIB.3
@@ -0,0 +1,63 @@
+.Dd $Mdocdate: November 2 2016 $
+.Dt ERR_GET_LIB 3
+.Os
+.Sh NAME
+.Nm ERR_GET_LIB ,
+.Nm ERR_GET_FUNC ,
+.Nm ERR_GET_REASON
+.Nd get library, function and reason codes for OpenSSL errors
+.Sh SYNOPSIS
+.In openssl/err.h
+.Ft int
+.Fo ERR_GET_LIB
+.Fa "unsigned long e"
+.Fc
+.Ft int
+.Fo ERR_GET_FUNC
+.Fa "unsigned long e"
+.Fc
+.Ft int
+.Fo ERR_GET_REASON
+.Fa "unsigned long e"
+.Fc
+.Sh DESCRIPTION
+The error code returned by
+.Xr ERR_get_error 3
+consists of a library number, function code, and reason code.
+.Fn ERR_GET_LIB ,
+.Fn ERR_GET_FUNC ,
+and
+.Fn ERR_GET_REASON
+can be used to extract these.
+.Pp
+The library number and function code describe where the error occurred,
+the reason code is the information about what went wrong.
+.Pp
+Each sub-library of OpenSSL has a unique library number; function and
+reason codes are unique within each sub-library.
+Note that different libraries may use the same value to signal different
+functions and reasons.
+.Pp
+.Dv ERR_R_*
+reason codes such as
+.Dv ERR_R_MALLOC_FAILURE
+are globally unique.
+However, when checking for sub-library specific reason codes, be sure to
+also compare the library number.
+.Pp
+.Fn ERR_GET_LIB ,
+.Fn ERR_GET_FUNC ,
+and
+.Fn ERR_GET_REASON
+are macros.
+.Sh RETURN VALUES
+The library number, function code, and reason code, respectively.
+.Sh SEE ALSO
+.Xr ERR 3 ,
+.Xr ERR_get_error 3
+.Sh HISTORY
+.Fn ERR_GET_LIB ,
+.Fn ERR_GET_FUNC ,
+and
+.Fn ERR_GET_REASON
+are available in all versions of SSLeay and OpenSSL.