Blame doc/man3/OPENSSL_init_ssl.pod

Packit c4476c
=pod
Packit c4476c
Packit c4476c
=head1 NAME
Packit c4476c
Packit c4476c
OPENSSL_init_ssl - OpenSSL (libssl and libcrypto) initialisation
Packit c4476c
Packit c4476c
=head1 SYNOPSIS
Packit c4476c
Packit c4476c
 #include <openssl/ssl.h>
Packit c4476c
Packit c4476c
 int OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
Packit c4476c
Packit c4476c
=head1 DESCRIPTION
Packit c4476c
Packit c4476c
During normal operation OpenSSL (libssl and libcrypto) will allocate various
Packit c4476c
resources at start up that must, subsequently, be freed on close down of the
Packit c4476c
library. Additionally some resources are allocated on a per thread basis (if the
Packit c4476c
application is multi-threaded), and these resources must be freed prior to the
Packit c4476c
thread closing.
Packit c4476c
Packit c4476c
As of version 1.1.0 OpenSSL will automatically allocate all resources that it
Packit c4476c
needs so no explicit initialisation is required. Similarly it will also
Packit c4476c
automatically deinitialise as required.
Packit c4476c
Packit c4476c
However, there may be situations when explicit initialisation is desirable or
Packit c4476c
needed, for example when some non-default initialisation is required. The
Packit c4476c
function OPENSSL_init_ssl() can be used for this purpose. Calling
Packit c4476c
this function will explicitly initialise BOTH libcrypto and libssl. To
Packit c4476c
explicitly initialise ONLY libcrypto see the
Packit c4476c
L<OPENSSL_init_crypto(3)> function.
Packit c4476c
Packit c4476c
Numerous internal OpenSSL functions call OPENSSL_init_ssl().
Packit c4476c
Therefore, in order to perform non-default initialisation,
Packit c4476c
OPENSSL_init_ssl() MUST be called by application code prior to
Packit c4476c
any other OpenSSL function calls.
Packit c4476c
Packit c4476c
The B<opts> parameter specifies which aspects of libssl and libcrypto should be
Packit c4476c
initialised. Valid options for libcrypto are described on the
Packit c4476c
L<OPENSSL_init_crypto(3)> page. In addition to any libcrypto
Packit c4476c
specific option the following libssl options can also be used:
Packit c4476c
Packit c4476c
=over 4
Packit c4476c
Packit c4476c
=item OPENSSL_INIT_NO_LOAD_SSL_STRINGS
Packit c4476c
Packit c4476c
Suppress automatic loading of the libssl error strings. This option is
Packit c4476c
not a default option. Once selected subsequent calls to
Packit c4476c
OPENSSL_init_ssl() with the option
Packit c4476c
B<OPENSSL_INIT_LOAD_SSL_STRINGS> will be ignored.
Packit c4476c
Packit c4476c
=item OPENSSL_INIT_LOAD_SSL_STRINGS
Packit c4476c
Packit c4476c
Automatic loading of the libssl error strings. This option is a
Packit c4476c
default option. Once selected subsequent calls to
Packit c4476c
OPENSSL_init_ssl() with the option
Packit c4476c
B<OPENSSL_INIT_LOAD_SSL_STRINGS> will be ignored.
Packit c4476c
Packit c4476c
=back
Packit c4476c
Packit c4476c
OPENSSL_init_ssl() takes a B<settings> parameter which can be used to
Packit c4476c
set parameter values.  See L<OPENSSL_init_crypto(3)> for details.
Packit c4476c
Packit c4476c
=head1 RETURN VALUES
Packit c4476c
Packit c4476c
The function OPENSSL_init_ssl() returns 1 on success or 0 on error.
Packit c4476c
Packit c4476c
=head1 SEE ALSO
Packit c4476c
Packit c4476c
L<OPENSSL_init_crypto(3)>
Packit c4476c
Packit c4476c
=head1 HISTORY
Packit c4476c
Packit c4476c
The OPENSSL_init_ssl() function was added in OpenSSL 1.1.0.
Packit c4476c
Packit c4476c
=head1 COPYRIGHT
Packit c4476c
Packit c4476c
Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
Packit c4476c
Packit c4476c
Licensed under the OpenSSL license (the "License").  You may not use
Packit c4476c
this file except in compliance with the License.  You can obtain a copy
Packit c4476c
in the file LICENSE in the source distribution or at
Packit c4476c
L<https://www.openssl.org/source/license.html>.
Packit c4476c
Packit c4476c
=cut