summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/ERR_GET_LIB.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/man/ERR_GET_LIB.3')
-rw-r--r--src/lib/libcrypto/man/ERR_GET_LIB.363
1 files changed, 63 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/ERR_GET_LIB.3 b/src/lib/libcrypto/man/ERR_GET_LIB.3
new file mode 100644
index 0000000000..9b50ce39e6
--- /dev/null
+++ b/src/lib/libcrypto/man/ERR_GET_LIB.3
@@ -0,0 +1,63 @@
1.Dd $Mdocdate: November 2 2016 $
2.Dt ERR_GET_LIB 3
3.Os
4.Sh NAME
5.Nm ERR_GET_LIB ,
6.Nm ERR_GET_FUNC ,
7.Nm ERR_GET_REASON
8.Nd get library, function and reason codes for OpenSSL errors
9.Sh SYNOPSIS
10.In openssl/err.h
11.Ft int
12.Fo ERR_GET_LIB
13.Fa "unsigned long e"
14.Fc
15.Ft int
16.Fo ERR_GET_FUNC
17.Fa "unsigned long e"
18.Fc
19.Ft int
20.Fo ERR_GET_REASON
21.Fa "unsigned long e"
22.Fc
23.Sh DESCRIPTION
24The error code returned by
25.Xr ERR_get_error 3
26consists of a library number, function code, and reason code.
27.Fn ERR_GET_LIB ,
28.Fn ERR_GET_FUNC ,
29and
30.Fn ERR_GET_REASON
31can be used to extract these.
32.Pp
33The library number and function code describe where the error occurred,
34the reason code is the information about what went wrong.
35.Pp
36Each sub-library of OpenSSL has a unique library number; function and
37reason codes are unique within each sub-library.
38Note that different libraries may use the same value to signal different
39functions and reasons.
40.Pp
41.Dv ERR_R_*
42reason codes such as
43.Dv ERR_R_MALLOC_FAILURE
44are globally unique.
45However, when checking for sub-library specific reason codes, be sure to
46also compare the library number.
47.Pp
48.Fn ERR_GET_LIB ,
49.Fn ERR_GET_FUNC ,
50and
51.Fn ERR_GET_REASON
52are macros.
53.Sh RETURN VALUES
54The library number, function code, and reason code, respectively.
55.Sh SEE ALSO
56.Xr ERR 3 ,
57.Xr ERR_get_error 3
58.Sh HISTORY
59.Fn ERR_GET_LIB ,
60.Fn ERR_GET_FUNC ,
61and
62.Fn ERR_GET_REASON
63are available in all versions of SSLeay and OpenSSL.