DragonFly On-Line Manual Pages

Search: Section:  


OPENSSL_INIT_CRYPT... DragonFly Library Functions Manual OPENSSL_INIT_CRYPT...

NAME

OPENSSL_init_crypto -- initialise the crypto library

SYNOPSIS

#include <openssl/crypto.h> int OPENSSL_init_crypto(uint64_t options, const void *dummy);

DESCRIPTION

If OPENSSL_init_crypto() is called before any other crypto or ssl func- tions, the crypto library is initialised by allocating various internal resources. The following options are supported: OPENSSL_INIT_LOAD_CONFIG At the end of the initialization, call OPENSSL_config(3) with a NULL argument, loading the default configuration file. OPENSSL_INIT_NO_LOAD_CONFIG Ignore any later calls to OPENSSL_config(3). The other options flags defined by OpenSSL are all ignored by LibreSSL. The dummy argument has no effect. Calling this function is almost never useful because it is internally called with an options argument of 0 by those functions in the crypto and ssl libraries that require it. It is safest to assume that any function may do so. If this function is called more than once, none of the calls except the first one have any effect.

RETURN VALUES

OPENSSL_init_crypto() is intended to return 1 on success or 0 on error.

SEE ALSO

CONF_modules_load_file(3), OPENSSL_config(3), OPENSSL_init_ssl(3), OPENSSL_load_builtin_modules(3), openssl.cnf(5)

HISTORY

OPENSSL_init_crypto() first appeared in OpenSSL 1.1.0 and has been avail- able since OpenBSD 6.3.

BUGS

OPENSSL_init_crypto() silently ignores almost all kinds of errors. In particular, if memory allocation fails, initialisation is likely to remain incomplete, the library may be in an inconsistent internal state, but the return value will usually indicate success anyway. There is no way for the application program to find out whether library initialisa- tion is actually complete, nor to get back to a consistent state if it isn't. DragonFly 5.5 March 23, 2018 DragonFly 5.5

Search: Section: