ERR_LOAD_CRYPTO_STRINGS(3)

NAME
ERR_load_crypto_strings, ERR_free_strings, ERR_load_BN_strings, SSL_load_error_strings - load and free OpenSSL error strings

SYNOPSIS
#include <openssl/err.h>
void
ERR_load_crypto_strings(void);
void
ERR_free_strings(void);
#include <openssl/bn.h>
void
ERR_load_BN_strings(void);
#include <openssl/ssl.h>
void
SSL_load_error_strings(void);

DESCRIPTION
ERR_load_crypto_strings() registers the error strings for all crypto(3) functions. SSL_load_error_strings() does the same, but also registers the ssl(3) error strings.

ERR_load_BN_strings() only registers the error strings for the BIGNUM part of the library, i.e. the functions documented in BN_new(3) and in the manual pages referenced from there. That may be useful if no other parts of the crypto library are used by the program. Similar functions exist for other parts of the crypto library, but they are not yet documented.

If the error strings were already loaded before, no action occurs.

One of these functions should be called before generating textual error messages. However, this is not required when memory usage is an issue.

ERR_free_strings() frees all previously loaded error strings.

SEE ALSO
ERR(3), ERR_error_string(3)

HISTORY
ERR_load_crypto_strings(), ERR_free_strings(), ERR_load_BN_strings(), and SSL_load_error_strings() appeared before SSLeay 0.8 and have been available since OpenBSD 2.4.

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.