From 49726aa38bd62497c3ef6f1f696c4ad751e76458 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 25 Sep 2024 20:05:15 +0100 Subject: [PATCH] Another fix for OpenSSL 3.0+ Should rewrite this module to use libsodium instead. --- libraries/liblmdb/crypto.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/liblmdb/crypto.c b/libraries/liblmdb/crypto.c index fe98d3b979..a1e635d61d 100644 --- a/libraries/liblmdb/crypto.c +++ b/libraries/liblmdb/crypto.c @@ -77,6 +77,9 @@ typedef struct evp_cipher_head { int key_len; int iv_len; unsigned long flags; +#if OPENSSL_VERSION_NUMBER >= 0x30000000 + int origin; +#endif int (*init)(EVP_CIPHER_CTX *ctx, const unsigned char *key, const unsigned char *iv, int enc); } evp_cipher_head; @@ -129,7 +132,7 @@ static int mcf_encfunc(const MDB_val *src, MDB_val *dst, const MDB_val *key, int mdb_size_t *ptr; MY_CIPHER_CTX myctx = {0}; EVP_CIPHER_CTX *ctx = (EVP_CIPHER_CTX *)&myctx; - my_cipherdata cactx; + my_cipherdata cactx = {0}; evp_cipher_head *eh = (evp_cipher_head *)cipher; ptr = key[1].mv_data; -- 2.47.2