erlang/otp-0012-In-openssl-1.0.1e-EC_GROUP_new_curve_GF2m-function-i.patch
Peter Lemenkov 8b984b11a7 Erlang: fix EC detection
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2019-02-04 13:13:52 +03:00

23 lines
784 B
Diff

From: "Matwey V. Kornilov" <matwey.kornilov@gmail.com>
Date: Sat, 21 Dec 2013 00:13:35 +0400
Subject: [PATCH] In openssl 1.0.1e EC_GROUP_new_curve_GF2m function is wrapped
by #ifndef OPENSSL_NO_EC2M. We have to check whether OPENSSL_NO_EC2M is set,
and if it is, then we do not have EC_GROUP_new_curve_GF2m function and do not
HAVE_EC.
diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c
index 6dd263adb2..cc1bcc1fb3 100644
--- a/lib/crypto/c_src/crypto.c
+++ b/lib/crypto/c_src/crypto.c
@@ -151,7 +151,8 @@
#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION(0,9,8,'o') \
&& !defined(OPENSSL_NO_EC) \
&& !defined(OPENSSL_NO_ECDH) \
- && !defined(OPENSSL_NO_ECDSA)
+ && !defined(OPENSSL_NO_ECDSA) \
+ && !defined(OPENSSL_NO_EC2M)
# define HAVE_EC
#endif