In OPENSSL_init_ssl(), run the base ssl init before OPENSSL_init_crypto()
authorRichard Levitte <levitte@openssl.org>
Sat, 25 Nov 2017 11:02:58 +0000 (12:02 +0100)
committerRichard Levitte <levitte@openssl.org>
Fri, 8 Dec 2017 15:09:30 +0000 (16:09 +0100)
commitad74ff046bea5b1f77ff7425598802b91924652d
tree1d8f016c0c5a03c901a3ff0084ed87de73004e5d
parentfae00c9321e9d843355b37358a12756634e267e6
In OPENSSL_init_ssl(), run the base ssl init before OPENSSL_init_crypto()

IF OPENSSL_init_ssl() is called with the option flag
OPENSSL_INIT_LOAD_CONFIG, any SSL config will be handled wrongly
(i.e. there will be an attempt to load libssl_conf.so or whatever
corresponds to that on non-Unix platforms).  Therefore, at least
SSL_add_ssl_module() MUST be called before OPENSSL_init_crypto() is
called.  The base ssl init does that, plus adds all kinds of ciphers
and digests, which is harmless.

Fixes #4788

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4792)

(cherry picked from commit 0a90a6831e02e00d9043ada635421cfd3da5ffe2)
ssl/ssl_init.c