From 7444a19c5d7c9f09efd2b4f29a2299f92015b458 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 12 Oct 2018 17:43:49 +0100 Subject: [PATCH] [Minor] Do not call legacy API in modern OpenSSL Issue: #2587 Closes: #2587 --- src/libcryptobox/cryptobox.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libcryptobox/cryptobox.c b/src/libcryptobox/cryptobox.c index 99c91e3dd3..d8f5459d38 100644 --- a/src/libcryptobox/cryptobox.c +++ b/src/libcryptobox/cryptobox.c @@ -374,7 +374,8 @@ rspamd_cryptobox_init (void) ctx->blake2_impl = blake2b_load (); ctx->ed25519_impl = ed25519_load (); ctx->base64_impl = base64_load (); -#ifdef HAVE_USABLE_OPENSSL +#if defined(HAVE_USABLE_OPENSSL) && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)) + /* Needed for old openssl api, not sure about LibreSSL */ ERR_load_EC_strings (); ERR_load_RAND_strings (); ERR_load_EVP_strings (); -- 2.47.3