summaryrefslogtreecommitdiff
path: root/src/network.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2016-12-04 23:07:43 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2016-12-05 02:40:12 -0500
commit88b1f3994f4c67ac60c037365d7920843a0baa8a (patch)
tree1ad522b725af840de3b54de4cfd6f873f7f89d67 /src/network.c
parent64a7b64c2b1b9d55df1c39fc2c4bcf67edb966a6 (diff)
downloadlighttpd1.4-88b1f3994f4c67ac60c037365d7920843a0baa8a.tar.gz
lighttpd1.4-88b1f3994f4c67ac60c037365d7920843a0baa8a.zip
openssl 1.1.0 init and cleanup
Diffstat (limited to 'src/network.c')
-rw-r--r--src/network.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/network.c b/src/network.c
index fa06d6a7..6bd5a08b 100644
--- a/src/network.c
+++ b/src/network.c
@@ -770,9 +770,18 @@ int network_init(server *srv) {
if (buffer_string_is_empty(s->ssl_pemfile) && buffer_string_is_empty(s->ssl_ca_file)) continue;
if (srv->ssl_is_init == 0) {
+ #if OPENSSL_VERSION_NUMBER >= 0x10100000L \
+ && !defined(LIBRESSL_VERSION_NUMBER)
+ OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS
+ |OPENSSL_INIT_LOAD_CRYPTO_STRINGS,NULL);
+ OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS
+ |OPENSSL_INIT_ADD_ALL_DIGESTS
+ |OPENSSL_INIT_LOAD_CONFIG, NULL);
+ #else
SSL_load_error_strings();
SSL_library_init();
OpenSSL_add_all_algorithms();
+ #endif
srv->ssl_is_init = 1;
if (0 == RAND_status()) {