1OPENSSL_INIT_SSL(3ossl) OpenSSL OPENSSL_INIT_SSL(3ossl)
2
3
4
6 OPENSSL_init_ssl - OpenSSL (libssl and libcrypto) initialisation
7
9 #include <openssl/ssl.h>
10
11 int OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
12
14 During normal operation OpenSSL (libssl and libcrypto) will allocate
15 various resources at start up that must, subsequently, be freed on
16 close down of the library. Additionally some resources are allocated on
17 a per thread basis (if the application is multi-threaded), and these
18 resources must be freed prior to the thread closing.
19
20 As of version 1.1.0 OpenSSL will automatically allocate all resources
21 that it needs so no explicit initialisation is required. Similarly it
22 will also automatically deinitialise as required.
23
24 However, there may be situations when explicit initialisation is
25 desirable or needed, for example when some nondefault initialisation is
26 required. The function OPENSSL_init_ssl() can be used for this purpose.
27 Calling this function will explicitly initialise BOTH libcrypto and
28 libssl. To explicitly initialise ONLY libcrypto see the
29 OPENSSL_init_crypto(3) function.
30
31 Numerous internal OpenSSL functions call OPENSSL_init_ssl().
32 Therefore, in order to perform nondefault initialisation,
33 OPENSSL_init_ssl() MUST be called by application code prior to any
34 other OpenSSL function calls.
35
36 The opts parameter specifies which aspects of libssl and libcrypto
37 should be initialised. Valid options for libcrypto are described on the
38 OPENSSL_init_crypto(3) page. In addition to any libcrypto specific
39 option the following libssl options can also be used:
40
41 OPENSSL_INIT_NO_LOAD_SSL_STRINGS
42 Suppress automatic loading of the libssl error strings. This option
43 is not a default option. Once selected subsequent calls to
44 OPENSSL_init_ssl() with the option OPENSSL_INIT_LOAD_SSL_STRINGS
45 will be ignored.
46
47 OPENSSL_INIT_LOAD_SSL_STRINGS
48 Automatic loading of the libssl error strings. This option is a
49 default option. Once selected subsequent calls to
50 OPENSSL_init_ssl() with the option OPENSSL_INIT_LOAD_SSL_STRINGS
51 will be ignored.
52
53 OPENSSL_init_ssl() takes a settings parameter which can be used to set
54 parameter values. See OPENSSL_init_crypto(3) for details.
55
57 The function OPENSSL_init_ssl() returns 1 on success or 0 on error.
58
60 OPENSSL_init_crypto(3)
61
63 The OPENSSL_init_ssl() function was added in OpenSSL 1.1.0.
64
66 Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved.
67
68 Licensed under the Apache License 2.0 (the "License"). You may not use
69 this file except in compliance with the License. You can obtain a copy
70 in the file LICENSE in the source distribution or at
71 <https://www.openssl.org/source/license.html>.
72
73
74
753.0.5 2022-11-01 OPENSSL_INIT_SSL(3ossl)