libc: make stdio_impl.h an internal libc header
[unleashed/tickless.git] / lib / libcrypto / man / ERR_load_crypto_strings.3
blob812258f60af1a43db181c6110eb27a87828d0eaa
1 .\"     $OpenBSD: ERR_load_crypto_strings.3,v 1.5 2017/01/26 04:37:08 schwarze Exp $
2 .\"     OpenSSL a528d4f0 Oct 27 13:40:11 2015 -0400
3 .\"
4 .\" This file is a derived work.
5 .\" The changes are covered by the following Copyright and license:
6 .\"
7 .\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
8 .\"
9 .\" Permission to use, copy, modify, and distribute this software for any
10 .\" purpose with or without fee is hereby granted, provided that the above
11 .\" copyright notice and this permission notice appear in all copies.
12 .\"
13 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
16 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 .\"
21 .\" The original file was written by Ulf Moeller <ulf@openssl.org>.
22 .\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
23 .\"
24 .\" Redistribution and use in source and binary forms, with or without
25 .\" modification, are permitted provided that the following conditions
26 .\" are met:
27 .\"
28 .\" 1. Redistributions of source code must retain the above copyright
29 .\"    notice, this list of conditions and the following disclaimer.
30 .\"
31 .\" 2. Redistributions in binary form must reproduce the above copyright
32 .\"    notice, this list of conditions and the following disclaimer in
33 .\"    the documentation and/or other materials provided with the
34 .\"    distribution.
35 .\"
36 .\" 3. All advertising materials mentioning features or use of this
37 .\"    software must display the following acknowledgment:
38 .\"    "This product includes software developed by the OpenSSL Project
39 .\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
40 .\"
41 .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
42 .\"    endorse or promote products derived from this software without
43 .\"    prior written permission. For written permission, please contact
44 .\"    openssl-core@openssl.org.
45 .\"
46 .\" 5. Products derived from this software may not be called "OpenSSL"
47 .\"    nor may "OpenSSL" appear in their names without prior written
48 .\"    permission of the OpenSSL Project.
49 .\"
50 .\" 6. Redistributions of any form whatsoever must retain the following
51 .\"    acknowledgment:
52 .\"    "This product includes software developed by the OpenSSL Project
53 .\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
54 .\"
55 .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
56 .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
57 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
58 .\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
59 .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
60 .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
61 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
62 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
63 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
64 .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
65 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
66 .\" OF THE POSSIBILITY OF SUCH DAMAGE.
67 .\"
68 .Dd $Mdocdate: January 26 2017 $
69 .Dt ERR_LOAD_CRYPTO_STRINGS 3
70 .Os
71 .Sh NAME
72 .Nm ERR_load_crypto_strings ,
73 .Nm ERR_free_strings ,
74 .Nm ERR_load_BN_strings ,
75 .Nm SSL_load_error_strings
76 .Nd load and free OpenSSL error strings
77 .Sh SYNOPSIS
78 .In openssl/err.h
79 .Ft void
80 .Fn ERR_load_crypto_strings void
81 .Ft void
82 .Fn ERR_free_strings void
83 .In openssl/bn.h
84 .Ft void
85 .Fn ERR_load_BN_strings void
86 .In openssl/ssl.h
87 .Ft void
88 .Fn SSL_load_error_strings void
89 .Sh DESCRIPTION
90 .Fn ERR_load_crypto_strings
91 registers the error strings for all
92 .Xr crypto 3
93 functions.
94 .Fn SSL_load_error_strings
95 does the same, but also registers the
96 .Xr ssl 3
97 error strings.
98 .Pp
99 .Fn ERR_load_BN_strings
100 only registers the error strings for the
101 .Vt BIGNUM
102 part of the library, i.e. the functions documented in
103 .Xr BN_new 3
104 and in the manual pages referenced from there.
105 That may be useful if no other parts of the crypto library
106 are used by the program.
107 Similar functions exist for other parts of the crypto library,
108 but they are not yet documented.
110 If the error strings were already loaded before, no action occurs.
112 One of these functions should be called before generating textual error
113 messages.
114 However, this is not required when memory usage is an issue.
116 .Fn ERR_free_strings
117 frees all previously loaded error strings.
118 .Sh SEE ALSO
119 .Xr ERR 3 ,
120 .Xr ERR_error_string 3
121 .Sh HISTORY
122 .Fn ERR_load_crypto_strings ,
123 .Fn SSL_load_error_strings ,
125 .Fn ERR_free_strings
126 are available in all versions of SSLeay and OpenSSL.
127 .Sh BUGS
128 Even though the error strings are already compiled into the object
129 code of the library as static strings, these functions store them
130 again using dynamically allocated memory on the heap.
131 That may fail if insufficient memory is available,
132 but these functions do not report such errors.
133 Instead, they fail silently, possibly having registered none or only
134 a part of the strings requested.