xref: /openbsd-src/lib/libcrypto/man/ERR_load_crypto_strings.3 (revision 1ad61ae0a79a724d2d3ec69e69c8e1d1ff6b53a0)
1.\" $OpenBSD: ERR_load_crypto_strings.3,v 1.11 2023/07/21 10:45:44 tb Exp $
2.\" full merge up to: OpenSSL f672aee4 Feb 9 11:52:40 2016 -0500
3.\" selective merge up to: OpenSSL b3696a55 Sep 2 09:35:50 2017 -0400
4.\"
5.\" This file is a derived work.
6.\" The changes are covered by the following Copyright and license:
7.\"
8.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
9.\"
10.\" Permission to use, copy, modify, and distribute this software for any
11.\" purpose with or without fee is hereby granted, provided that the above
12.\" copyright notice and this permission notice appear in all copies.
13.\"
14.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
15.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
16.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
17.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
19.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
20.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21.\"
22.\" The original file was written by Ulf Moeller <ulf@openssl.org>.
23.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
24.\"
25.\" Redistribution and use in source and binary forms, with or without
26.\" modification, are permitted provided that the following conditions
27.\" are met:
28.\"
29.\" 1. Redistributions of source code must retain the above copyright
30.\"    notice, this list of conditions and the following disclaimer.
31.\"
32.\" 2. Redistributions in binary form must reproduce the above copyright
33.\"    notice, this list of conditions and the following disclaimer in
34.\"    the documentation and/or other materials provided with the
35.\"    distribution.
36.\"
37.\" 3. All advertising materials mentioning features or use of this
38.\"    software must display the following acknowledgment:
39.\"    "This product includes software developed by the OpenSSL Project
40.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
41.\"
42.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
43.\"    endorse or promote products derived from this software without
44.\"    prior written permission. For written permission, please contact
45.\"    openssl-core@openssl.org.
46.\"
47.\" 5. Products derived from this software may not be called "OpenSSL"
48.\"    nor may "OpenSSL" appear in their names without prior written
49.\"    permission of the OpenSSL Project.
50.\"
51.\" 6. Redistributions of any form whatsoever must retain the following
52.\"    acknowledgment:
53.\"    "This product includes software developed by the OpenSSL Project
54.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
55.\"
56.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
57.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
58.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
59.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
60.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
61.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
62.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
63.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
64.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
65.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
66.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
67.\" OF THE POSSIBILITY OF SUCH DAMAGE.
68.\"
69.Dd $Mdocdate: July 21 2023 $
70.Dt ERR_LOAD_CRYPTO_STRINGS 3
71.Os
72.Sh NAME
73.Nm ERR_load_crypto_strings ,
74.Nm ERR_free_strings ,
75.Nm SSL_load_error_strings
76.Nd load and free OpenSSL error strings
77.\" The following functions are intentionally undocumented
78.\" because they are merely subroutines of ERR_load_crypto_strings(3)
79.\" and should not have been made a part of the API:
80.\" ERR_load_ASN1_strings()
81.\" ERR_load_BIO_strings()
82.\" ERR_load_BN_strings()
83.\" ERR_load_BUF_strings()
84.\" ERR_load_CMS_strings()
85.\" ERR_load_CONF_strings()
86.\" ERR_load_CRYPTO_strings()
87.\" ERR_load_DH_strings()
88.\" ERR_load_DSA_strings()
89.\" ERR_load_EC_strings()
90.\" ERR_load_ERR_strings()
91.\" ERR_load_EVP_strings()
92.\" ERR_load_GOST_strings()
93.\" ERR_load_OBJ_strings()
94.\" ERR_load_OCSP_strings()
95.\" ERR_load_PEM_strings()
96.\" ERR_load_PKCS12_strings()
97.\" ERR_load_PKCS7_strings()
98.\" ERR_load_RAND_strings()
99.\" ERR_load_RSA_strings()
100.\" ERR_load_TS_strings()
101.\" ERR_load_UI_strings()
102.\" ERR_load_X509_strings()
103.\" ERR_load_X509V3_strings()
104.Sh SYNOPSIS
105.In openssl/err.h
106.Ft void
107.Fn ERR_load_crypto_strings void
108.Ft void
109.Fn ERR_free_strings void
110.In openssl/ssl.h
111.Ft void
112.Fn SSL_load_error_strings void
113.Sh DESCRIPTION
114These functions are deprecated.
115It is never useful for any application program to call any of them explicitly.
116The library automatically calls them internally whenever needed.
117.Pp
118.Fn ERR_load_crypto_strings
119registers the error strings for all
120.Xr crypto 3
121functions.
122.Fn SSL_load_error_strings
123does the same, but also registers the
124.Xr ssl 3
125error strings.
126.Pp
127If the error strings were already loaded before, no action occurs.
128.Pp
129.Fn ERR_free_strings
130frees all previously loaded error strings.
131.Sh SEE ALSO
132.Xr ERR 3 ,
133.Xr ERR_error_string 3 ,
134.Xr OPENSSL_config 3
135.Sh HISTORY
136.Fn ERR_load_crypto_strings
137and
138.Fn SSL_load_error_strings
139first appeared in SSLeay 0.4.4.
140.Fn ERR_free_strings
141first appeared in SSLeay 0.5.1.
142These functions been available since
143.Ox 2.4 .
144.Sh BUGS
145Even though the error strings are already compiled into the object
146code of the library as static strings, these functions store them
147again using dynamically allocated memory on the heap.
148That may fail if insufficient memory is available,
149but these functions do not report such errors.
150Instead, they fail silently, possibly having registered none or only
151a part of the strings requested.
152