1 .\" $OpenBSD: OPENSSL_init_crypto.3,v 1.3 2018/03/23 23:18:17 schwarze Exp $
2 .\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
4 .\" Permission to use, copy, modify, and distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 .Dd $Mdocdate: March 23 2018 $
17 .Dt OPENSSL_INIT_CRYPTO 3
20 .Nm OPENSSL_init_crypto
21 .Nd initialise the crypto library
25 .Fo OPENSSL_init_crypto
26 .Fa "uint64_t options"
27 .Fa "const void *dummy"
31 .Fn OPENSSL_init_crypto
32 is called before any other crypto or ssl functions, the crypto
33 library is initialised by allocating various internal resources.
39 .It Dv OPENSSL_INIT_LOAD_CONFIG
40 At the end of the initialization, call
44 argument, loading the default configuration file.
45 .It Dv OPENSSL_INIT_NO_LOAD_CONFIG
46 Ignore any later calls to
47 .Xr OPENSSL_config 3 .
52 flags defined by OpenSSL are all ignored by LibreSSL.
55 argument has no effect.
57 Calling this function is almost never useful because it is internally
60 argument of 0 by those functions in the crypto and ssl libraries
62 It is safest to assume that any function may do so.
64 If this function is called more than once, none of the calls except
65 the first one have any effect.
67 .Fn OPENSSL_init_crypto
68 is intended to return 1 on success or 0 on error.
70 .Xr CONF_modules_load_file 3 ,
71 .Xr OPENSSL_config 3 ,
72 .Xr OPENSSL_init_ssl 3 ,
73 .Xr OPENSSL_load_builtin_modules 3 ,
76 .Fn OPENSSL_init_crypto
77 first appeared in OpenSSL 1.1.0 and has been available since
80 .Fn OPENSSL_init_crypto
81 silently ignores almost all kinds of errors.
82 In particular, if memory allocation fails, initialisation is likely
83 to remain incomplete, the library may be in an inconsistent internal
84 state, but the return value will usually indicate success anyway.
85 There is no way for the application program to find out whether
86 library initialisation is actually complete, nor to get back to a
87 consistent state if it isn't.