File 0517-crypto-Set-flag-to-disable-EVP-for-DH-if-historic-cr.patch of Package erlang
From 1f53d97897e118744b00a64d540e9cbf91af1cee Mon Sep 17 00:00:00 2001 From: Hans Nilsson <hans@erlang.org> Date: Tue, 1 Sep 2020 14:35:46 +0200 Subject: [PATCH] crypto: Set flag to disable EVP for DH if historic crypto libs --- lib/crypto/c_src/openssl_config.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/crypto/c_src/openssl_config.h b/lib/crypto/c_src/openssl_config.h index 5acec53996..ee9a99297b 100644 --- a/lib/crypto/c_src/openssl_config.h +++ b/lib/crypto/c_src/openssl_config.h @@ -108,6 +108,14 @@ #ifndef HAS_LIBRESSL # if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0) # define HAS_EVP_PKEY_CTX +# if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION_PLAIN(1,0,2) \ + && (! DISABLE_EVP_DH) + /* Diffie-Hellman EVP is slow on antique crypto libs + * DISABLE_EVP_DH is 0 or 1 from the configure script + */ +# undef DISABLE_EVP_DH +# define DISABLE_EVP_DH 1 +# endif # define HAVE_EVP_CIPHER_CTX_COPY # endif -- 2.26.2