Move the loading of the ssl_conf module to libcrypto
authorMatt Caswell <matt@openssl.org>
Fri, 30 Mar 2018 18:19:56 +0000 (19:19 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 5 Apr 2018 14:34:41 +0000 (15:34 +0100)
commit23dec58b9c2e36311208a90efb3d56818a9ed6fd
treec6a295c72a52815d051f84c39e77586e1abcba6e
parentbd90e98e149532aac345080905603f98af3d3350
Move the loading of the ssl_conf module to libcrypto

The GOST engine needs to be loaded before we initialise libssl. Otherwise
the GOST ciphersuites are not enabled. However the SSL conf module must
be loaded before we initialise libcrypto. Otherwise we will fail to read
the SSL config from a config file properly.

Another problem is that an application may make use of both libcrypto and
libssl. If it performs libcrypto stuff first and OPENSSL_init_crypto()
is called and loads a config file it will fail if that config file has
any libssl stuff in it.

This commit separates out the loading of the SSL conf module from the
interpretation of its contents. The loading piece doesn't know anything
about SSL so this can be moved to libcrypto. The interpretation of what it
means remains in libssl. This means we can load the SSL conf data before
libssl is there and interpret it when it later becomes available.

Fixes #5809

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5879)
crypto/conf/build.info
crypto/conf/conf_err.c
crypto/conf/conf_lcl.h [new file with mode: 0644]
crypto/conf/conf_mall.c
crypto/conf/conf_ssl.c [new file with mode: 0644]
include/internal/sslconf.h [new file with mode: 0644]
include/openssl/conf.h
ssl/ssl_init.c
ssl/ssl_mcnf.c
util/libcrypto.num
util/mkdef.pl