]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] More fixes for bloody openssl 1.1
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 18 Nov 2016 10:51:56 +0000 (10:51 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 18 Nov 2016 10:51:56 +0000 (10:51 +0000)
src/libutil/util.c
src/lua/lua_cryptobox.c

index 2538fb57ad8f8ea541d24c82130bd03e10f38990..080cbd1424983ce0af9d4d91f26f41f2c01e6848 100644 (file)
@@ -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];
index c4b90af455f43fc10a1658df47e2e457bc0fd937..94dec34f5fbe73aa0023e1e1b62fd0e528d50d47 100644 (file)
@@ -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 {