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