.\" $OpenBSD: ERR_load_crypto_strings.3,v 1.11 2023/07/21 10:45:44 tb Exp $ .\" full merge up to: OpenSSL f672aee4 Feb 9 11:52:40 2016 -0500 .\" selective merge up to: OpenSSL b3696a55 Sep 2 09:35:50 2017 -0400 .\" .\" This file is a derived work. .\" The changes are covered by the following Copyright and license: .\" .\" Copyright (c) 2017 Ingo Schwarze .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .\" The original file was written by Ulf Moeller . .\" Copyright (c) 2000 The OpenSSL Project. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in .\" the documentation and/or other materials provided with the .\" distribution. .\" .\" 3. All advertising materials mentioning features or use of this .\" software must display the following acknowledgment: .\" "This product includes software developed by the OpenSSL Project .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" .\" .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to .\" endorse or promote products derived from this software without .\" prior written permission. For written permission, please contact .\" openssl-core@openssl.org. .\" .\" 5. Products derived from this software may not be called "OpenSSL" .\" nor may "OpenSSL" appear in their names without prior written .\" permission of the OpenSSL Project. .\" .\" 6. Redistributions of any form whatsoever must retain the following .\" acknowledgment: .\" "This product includes software developed by the OpenSSL Project .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" .\" .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd $Mdocdate: July 21 2023 $ .Dt ERR_LOAD_CRYPTO_STRINGS 3 .Os .Sh NAME .Nm ERR_load_crypto_strings , .Nm ERR_free_strings , .Nm SSL_load_error_strings .Nd load and free OpenSSL error strings .\" The following functions are intentionally undocumented .\" because they are merely subroutines of ERR_load_crypto_strings(3) .\" and should not have been made a part of the API: .\" ERR_load_ASN1_strings() .\" ERR_load_BIO_strings() .\" ERR_load_BN_strings() .\" ERR_load_BUF_strings() .\" ERR_load_CMS_strings() .\" ERR_load_CONF_strings() .\" ERR_load_CRYPTO_strings() .\" ERR_load_DH_strings() .\" ERR_load_DSA_strings() .\" ERR_load_EC_strings() .\" ERR_load_ERR_strings() .\" ERR_load_EVP_strings() .\" ERR_load_GOST_strings() .\" ERR_load_OBJ_strings() .\" ERR_load_OCSP_strings() .\" ERR_load_PEM_strings() .\" ERR_load_PKCS12_strings() .\" ERR_load_PKCS7_strings() .\" ERR_load_RAND_strings() .\" ERR_load_RSA_strings() .\" ERR_load_TS_strings() .\" ERR_load_UI_strings() .\" ERR_load_X509_strings() .\" ERR_load_X509V3_strings() .Sh SYNOPSIS .In openssl/err.h .Ft void .Fn ERR_load_crypto_strings void .Ft void .Fn ERR_free_strings void .In openssl/ssl.h .Ft void .Fn SSL_load_error_strings void .Sh DESCRIPTION These functions are deprecated. It is never useful for any application program to call any of them explicitly. The library automatically calls them internally whenever needed. .Pp .Fn ERR_load_crypto_strings registers the error strings for all .Xr crypto 3 functions. .Fn SSL_load_error_strings does the same, but also registers the .Xr ssl 3 error strings. .Pp If the error strings were already loaded before, no action occurs. .Pp .Fn ERR_free_strings frees all previously loaded error strings. .Sh SEE ALSO .Xr ERR 3 , .Xr ERR_error_string 3 , .Xr OPENSSL_config 3 .Sh HISTORY .Fn ERR_load_crypto_strings and .Fn SSL_load_error_strings first appeared in SSLeay 0.4.4. .Fn ERR_free_strings first appeared in SSLeay 0.5.1. These functions been available since .Ox 2.4 . .Sh BUGS Even though the error strings are already compiled into the object code of the library as static strings, these functions store them again using dynamically allocated memory on the heap. That may fail if insufficient memory is available, but these functions do not report such errors. Instead, they fail silently, possibly having registered none or only a part of the strings requested.