summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/ERR_load_strings.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/man/ERR_load_strings.3')
-rw-r--r--src/lib/libcrypto/man/ERR_load_strings.366
1 files changed, 66 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/ERR_load_strings.3 b/src/lib/libcrypto/man/ERR_load_strings.3
new file mode 100644
index 0000000000..691a4067d3
--- /dev/null
+++ b/src/lib/libcrypto/man/ERR_load_strings.3
@@ -0,0 +1,66 @@
1.Dd $Mdocdate: November 2 2016 $
2.Dt ERR_LOAD_STRINGS 3
3.Os
4.Sh NAME
5.Nm ERR_load_strings ,
6.Nm ERR_PACK ,
7.Nm ERR_get_next_error_library
8.Nd load arbitrary OpenSSL error strings
9.Sh SYNOPSIS
10.In openssl/err.h
11.Ft void
12.Fo ERR_load_strings
13.Fa "int lib"
14.Fa "ERR_STRING_DATA str[]"
15.Fc
16.Ft int
17.Fn ERR_get_next_error_library void
18.Ft unsigned long
19.Fo ERR_PACK
20.Fa "int lib"
21.Fa "int func"
22.Fa "int reason"
23.Fc
24.Sh DESCRIPTION
25.Fn ERR_load_strings
26registers error strings for library number
27.Fa lib .
28.Pp
29.Fa str
30is an array of error string data:
31.Bd -literal -offset indent
32typedef struct ERR_string_data_st
33{
34 unsigned long error;
35 char *string;
36} ERR_STRING_DATA;
37.Ed
38.Pp
39The error code is generated from the library number and a function and
40reason code:
41.Pp
42.Dl error = ERR_PACK(lib, func, reason)
43.Pp
44.Fn ERR_PACK
45is a macro.
46.Pp
47The last entry in the array is
48.Brq 0 , Dv NULL .
49.Pp
50.Fn ERR_get_next_error_library
51can be used to assign library numbers to user libraries at runtime.
52.Sh RETURN VALUE
53.Fn ERR_PACK
54returns the error code.
55.Fn ERR_get_next_error_library
56returns a new library number.
57.Sh SEE ALSO
58.Xr ERR 3 ,
59.Xr ERR_load_strings 3
60.Sh HISTORY
61.Xr ERR_load_error_strings 3
62and
63.Fn ERR_PACK
64are available in all versions of SSLeay and OpenSSL.
65.Fn ERR_get_next_error_library
66was added in SSLeay 0.9.0.