Erlang: fix EC detection

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
This commit is contained in:
Peter Lemenkov 2019-02-04 13:21:00 +03:00
parent 0cc610b48f
commit 4fcc82fa8f
2 changed files with 27 additions and 1 deletions

View File

@ -61,7 +61,7 @@
Name: erlang
Version: 21.2.4
Release: 1%{?dist}
Release: 2%{?dist}
Summary: General-purpose programming language and runtime environment
License: ASL 2.0
@ -102,6 +102,7 @@ Patch7: otp-0007-Add-extra-search-directory.patch
Patch8: otp-0008-Avoid-forking-sed-to-get-basename.patch
Patch9: otp-0009-Load-man-pages-from-system-wide-directory.patch
Patch10: otp-0010-Improve-nodes-querying.patch
Patch11: otp-0011-In-openssl-1.0.1e-EC_GROUP_new_curve_GF2m-function-i.patch
# end of autogenerated patch tag list
BuildRequires: gcc
@ -1944,6 +1945,9 @@ useradd -r -g epmd -d /dev/null -s /sbin/nologin \
%changelog
* Mon Feb 04 2019 Peter Lemenkov <lemenkov@gmail.com> - 21.2.4-2
- Fix EC detection
* Thu Jan 31 2019 Peter Lemenkov <lemenkov@gmail.com> - 21.2.4-1
- Ver. 21.2.4
- Removed cosEvent, cosEventDomain, cosFileTransfer, cosNotification,

View File

@ -0,0 +1,22 @@
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 df607732bf..a1fe05dd41 100644
--- a/lib/crypto/c_src/crypto.c
+++ b/lib/crypto/c_src/crypto.c
@@ -168,7 +168,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