OPENSSL_INIT_CRYPTO(3)
π NAME π
okay bestie, welcome to the OPENSSL_INIT_CRYPTO(3) page β yes, itβs a Library Functions Manual situation. The stars are OPENSSL_init_crypto and OPENSSL_init, and their whole thing is βinitialise the crypto library.β π«Ά
β¨ SYNOPSIS β¨
#include <openssl/crypto.h>
int
OPENSSL_init_crypto(uint64_t options, const void *dummy);
void
OPENSSL_init(void);
πΈ DESCRIPTION πΈ
Okay so these functions are deprecated, and no cap: it is never useful for an application program to call either of them explicitly. Like, not even a little. π
The library automatically calls OPENSSL_init_crypto() internally with an options argument of 0 whenever needed. It is safest to assume that any function may do so. π
To enable or disable the standard configuration file, instead use OPENSSL_config(3) or OPENSSL_no_config(3), respectively. To load a non-standard configuration file, refer to CONF_modules_load_file(3). π¦
If OPENSSL_init_crypto() is called before any other crypto or ssl functions, the crypto library is initialised by allocating various internal resources β in particular calling ERR_load_crypto_strings(3), OpenSSL_add_all_ciphers(3), and OpenSSL_add_all_digests(3). β¨
π The options, bestie π
The following options are supported:
OPENSSL_INIT_LOAD_CONFIGβ at the end of the initialization, callOPENSSL_config(3)with aNULLargument, loading the default configuration file. πOPENSSL_INIT_NO_LOAD_CONFIGβ ignore any later calls toOPENSSL_config(3). π
The other options flags defined by OpenSSL are all ignored by LibreSSL. The dummy argument has no effect. π
If this function is called more than once, none of the calls except the first one have any effect. β
OPENSSL_init() has no effect at all. literally none. π«
π RETURN VALUES π
OPENSSL_init_crypto() is intended to return 1 on success or 0 on error. π
π¦ SEE ALSO π¦
π HISTORY π
OPENSSL_init()first appeared in OpenSSL 1.0.0e and has been available since OpenBSD 5.3. It stopped having any effect in OpenSSL 1.1.1 and in OpenBSD 5.6. π°οΈOPENSSL_init_crypto()first appeared in OpenSSL 1.1.0 and has been available since OpenBSD 6.3. β¨
π BUGS π
okay this part is giving messy, bestie. π
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 initialisation is actually complete, nor to get back to a consistent state if it isnβt. π
thatβs the whole page, bestie β from the Debian build, dated May 24, 2020. xoxo, your Unix bestie πππ¦
π¦ where this page comes from
- opensuse-leap 16.0: libressl-devel-doc 4.1.0-bp160.1.1 Β· OpenSSL
- Copyright (c) 2018, 2020 Ingo Schwarze <schwarze@openbsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms