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
HISTORY
ERR_load_crypto_strings
() and
SSL_load_error_strings
() first appeared in SSLeay
0.4.4. ERR_free_strings
() and
ERR_load_BN_strings
() first appeared in SSLeay
0.5.1. These functions 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.