From: Vsevolod Stakhov Date: Fri, 18 Nov 2016 10:51:56 +0000 (+0000) Subject: [Minor] More fixes for bloody openssl 1.1 X-Git-Tag: 1.4.0~25 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f77a42d79e636b1c08b31a99d32d92e7aad88bda;p=rspamd.git [Minor] More fixes for bloody openssl 1.1 --- diff --git a/src/libutil/util.c b/src/libutil/util.c index 2538fb57a..080cbd142 100644 --- a/src/libutil/util.c +++ b/src/libutil/util.c @@ -2070,7 +2070,9 @@ rspamd_init_libs (void) OPENSSL_init_ssl (0, NULL); #endif +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) OPENSSL_config (NULL); +#endif if (RAND_poll () == 0) { guchar seed[128]; diff --git a/src/lua/lua_cryptobox.c b/src/lua/lua_cryptobox.c index c4b90af45..94dec34f5 100644 --- a/src/lua/lua_cryptobox.c +++ b/src/lua/lua_cryptobox.c @@ -1025,7 +1025,11 @@ lua_cryptobox_hash_gc (lua_State *L) struct rspamd_lua_cryptobox_hash *h = lua_check_cryptobox_hash (L, 1); if (h->is_ssl) { +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) EVP_MD_CTX_cleanup (h->c); +#else + EVP_MD_CTX_reset (h->c); +#endif EVP_MD_CTX_destroy (h->c); } else {