Commit 35d8fa56 authored by Matt Caswell's avatar Matt Caswell
Browse files

Updates for auto init/deinit review comments



Fixes for the auto-init/deinit code based on review comments

Reviewed-by: default avatarRichard Levitte <levitte@openssl.org>
parent 722cba23
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -340,7 +340,7 @@
 you can still use "no-threads" to suppress an annoying warning message
 from the Configure script.)

 OpenSSL provides in built support for two threading models: pthreads (found on
 OpenSSL provides built-in support for two threading models: pthreads (found on
 most UNIX/Linux systems), and Windows threads. No other threading models are
 supported. If your platform does not provide pthreads or Windows threads then
 you should Configure with the "no-threads" option.
+0 −16
Original line number Diff line number Diff line
@@ -190,19 +190,3 @@
 your application code small "shim" snippet, which provides glue between
 OpenSSL BIO layer and your compiler run-time. See the OPENSSL_Applink
 manual page for further details.

 Support for older Windows platforms
 -----------------------------------

 By default OpenSSL will use functions and capabilities of the Windows platform
 only available in Windows Vista, Windows Server 2008 or later. It is possible
 to enable support for older platforms by defining _WIN32_WINNT at Configure
 time.

  > perl Configure VC-WIN32 --prefix=c:\some\openssl\dir -D_WIN32_WINNT=0x0501

 The value 0x0501 above corresponds to Windows XP which is the oldest supported
 platform. The value 0x0600 corresponds to Windows Vista and Windows Server
 2008. Refer to the Windows documentation for other possible values. Note that
 by forcing support for an older OpenSSL version this may mean less optimal
 approaches are used instead.
+1 −2
Original line number Diff line number Diff line
@@ -81,8 +81,7 @@ void OPENSSL_config(const char *config_name)
        { OPENSSL_INIT_SET_CONF_FILENAME, .value.type_string = config_name },
        { OPENSSL_INIT_SET_END, .value.type_int = 0 }
    };
    OPENSSL_INIT_crypto_library_start(OPENSSL_INIT_LOAD_CONFIG,
                                      (const OPENSSL_INIT_SETTINGS *)&settings);
    OPENSSL_INIT_crypto_library_start(OPENSSL_INIT_LOAD_CONFIG, settings);
}

void openssl_config_internal(const char *config_name)
+0 −11
Original line number Diff line number Diff line
@@ -55,17 +55,6 @@
 *
 */

#include <openssl/e_os2.h>

#if defined(OPENSSL_SYS_WINDOWS) && !defined(_WIN32_WINNT)
/*
 * We default to requiring Windows Vista, Windows Server 2008 or later. We can
 * support lower versions if _WIN32_WINNT is explicity defined to something
 * less
 */
# define _WIN32_WINNT 0x0600
#endif

#include <internal/cryptlib_int.h>
#include <openssl/err.h>
#include <openssl/evp.h>
+9 −8
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@

=head1 NAME

OPENSSL_INIT_library_stop, OPENSSL_INIT_crypto_library_start,
OPENSSL_INIT_crypto_library_start, OPENSSL_INIT_library_stop,
OPENSSL_INIT_register_stop_handler, OPENSSL_INIT_thread_stop - OpenSSL
initialisation and deinitialisation functions

@@ -32,10 +32,12 @@ However, there way be situations when explicit initialisation is desirable or
needed, for example when some non-default initialisation is required. The
function OPENSSL_INIT_crypto_library_start() can be used for this purpose for
libcrypto (see also L<OPENSSL_INIT_ssl_library_start(3)> for the libssl
equivalent). In order to perform non-default initialisation it MUST be called
prior to any other calls of this function. As numerous internal OpenSSL
functions also call this, this usually means you should call it prior to ANY
other OpenSSL function calls.
equivalent).

Numerous internal OpenSSL functions call OPENSSL_INIT_crypto_library_start().
Therefore, in order to perform non-default initialisation,
OPENSSL_INIT_crypto_library_start() MUST be called by application code prior to
any other OpenSSL function calls.

The B<opts> parameter specifies which aspects of libcrypto should be
initialised. Valid options are:
@@ -166,8 +168,7 @@ configuration file is assumed. For example
     { OPENSSL_INIT_SET_CONF_FILENAME, .value.type_string = "myconf.cnf" },
     { OPENSSL_INIT_SET_END, .value.type_int = 0 }
 };
 OPENSSL_INIT_crypto_library_start(OPENSSL_INIT_LOAD_CONFIG,
                                   (const OPENSSL_INIT_SETTINGS *)&settings);
 OPENSSL_INIT_crypto_library_start(OPENSSL_INIT_LOAD_CONFIG, settings);

The B<settings> parameter must be an array of OPENSSL_INIT_SETTINGS values
terminated with an OPENSSL_INIT_SET_END entry.
@@ -221,6 +222,6 @@ L<OPENSSL_INIT_ssl_library_start(3)>

The OPENSSL_INIT_library_stop, OPENSSL_INIT_crypto_library_start,
OPENSSL_INIT_register_stop_handler and OPENSSL_INIT_thread_stop functions were
first added in OpenSSL 1.1.0.
added in OpenSSL 1.1.0.

=cut
Loading