]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Another compatibility fix
authorVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 24 Sep 2024 08:30:22 +0000 (09:30 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 24 Sep 2024 08:30:22 +0000 (09:30 +0100)
src/lua/lua_cryptobox.c

index 96a8db07473286102b804311d7d03af4625e7243..9600a47327cdbc499dd23b57193f179f51b189e9 100644 (file)
@@ -1438,7 +1438,11 @@ lua_cryptobox_hash_reset(lua_State *L)
                        rspamd_cryptobox_hash_init(h->content.h, NULL, 0);
                        break;
                case LUA_CRYPTOBOX_HASH_SSL:
+#if OPENSSL_VERSION_MAJOR >= 3
                        EVP_DigestInit(h->content.c, EVP_MD_CTX_get0_md(h->content.c));
+#else
+                       EVP_DigestInit(h->content.c, EVP_MD_CTX_md(h->content.c));
+#endif
                        break;
                case LUA_CRYPTOBOX_HASH_HMAC:
 #if OPENSSL_VERSION_NUMBER < 0x10100000L || \