]>
Commit | Line | Data |
---|---|---|
388f2f56 UM |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
4d524e10 | 5 | ERR_load_strings, ERR_PACK, ERR_get_next_error_library - load |
388f2f56 UM |
6 | arbitrary error strings |
7 | ||
8 | =head1 SYNOPSIS | |
9 | ||
10 | #include <openssl/err.h> | |
11 | ||
12 | void ERR_load_strings(int lib, ERR_STRING_DATA str[]); | |
13 | ||
14 | int ERR_get_next_error_library(void); | |
15 | ||
16 | unsigned long ERR_PACK(int lib, int func, int reason); | |
17 | ||
18 | =head1 DESCRIPTION | |
19 | ||
20 | ERR_load_strings() registers error strings for library number B<lib>. | |
21 | ||
22 | B<str> is an array of error string data: | |
23 | ||
24 | typedef struct ERR_string_data_st | |
25 | { | |
2947af32 BB |
26 | unsigned long error; |
27 | char *string; | |
388f2f56 UM |
28 | } ERR_STRING_DATA; |
29 | ||
30 | The error code is generated from the library number and a function and | |
31 | reason code: B<error> = ERR_PACK(B<lib>, B<func>, B<reason>). | |
32 | ERR_PACK() is a macro. | |
33 | ||
34 | The last entry in the array is {0,0}. | |
35 | ||
36 | ERR_get_next_error_library() can be used to assign library numbers | |
37 | to user libraries at runtime. | |
38 | ||
1f13ad31 | 39 | =head1 RETURN VALUES |
388f2f56 UM |
40 | |
41 | ERR_load_strings() returns no value. ERR_PACK() return the error code. | |
c1c26660 RL |
42 | ERR_get_next_error_library() returns zero on failure, otherwise a new |
43 | library number. | |
388f2f56 UM |
44 | |
45 | =head1 SEE ALSO | |
46 | ||
73fb82b7 | 47 | L<ERR_load_strings(3)> |
388f2f56 | 48 | |
e2f92610 RS |
49 | =head1 COPYRIGHT |
50 | ||
61f805c1 | 51 | Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. |
e2f92610 | 52 | |
4746f25a | 53 | Licensed under the Apache License 2.0 (the "License"). You may not use |
e2f92610 RS |
54 | this file except in compliance with the License. You can obtain a copy |
55 | in the file LICENSE in the source distribution or at | |
56 | L<https://www.openssl.org/source/license.html>. | |
57 | ||
58 | =cut |