4bfa664
Patch suggestion by Robert Scheck <robert@fedoraproject.org> for lua-sec < 0.4.2 to avoid build failures like
4bfa664
"context.c:255:1: error: unknown type name 'EC_KEY'" on Fedora and Red Hat Linux Enterprise based distributions
4bfa664
which do not just disable EC support in OpenSSL but completely rip it out on the source code level already. The
4bfa664
patch re-uses the previously (by upstream) introduced OPENSSL_NO_ECDH definement.
4bfa664
4bfa664
--- luasec-063e8a8a5c57858cdc845f8d51b994426edd37ab/src/context.c		2013-06-20 18:03:58.000000000 +0200
4bfa664
+++ luasec-063e8a8a5c57858cdc845f8d51b994426edd37ab/src/context.c.no_ecdh	2013-09-08 14:12:52.000000000 +0200
4bfa664
@@ -252,6 +252,7 @@
4bfa664
   return (verify & LSEC_VERIFY_CONTINUE ? 1 : preverify_ok);
4bfa664
 }
4bfa664
 
4bfa664
+#ifndef OPENSSL_NO_ECDH
4bfa664
 static EC_KEY *find_ec_key(const char *str)
4bfa664
 {
4bfa664
   p_ec ptr;
4bfa664
@@ -261,6 +262,7 @@
4bfa664
   }
4bfa664
   return NULL;
4bfa664
 }
4bfa664
+#endif
4bfa664
 
4bfa664
 /*------------------------------ Lua Functions -------------------------------*/
4bfa664