[Compile error] network.c: In function 'network_init': network.c:483: error: 'EC_KEY' undeclared
Added by PrivL over 13 years ago
Hello, i'm not pro in compiling, i have been able to compile successfully from svn a lot of times before, but this time i get this error:
network.c: In function 'network_init':
network.c:483: error: 'EC_KEY' undeclared (first use in this function)
network.c:483: error: (Each undeclared identifier is reported only once
network.c:483: error: for each function it appears in.)
network.c:483: error: 'ecdh' undeclared (first use in this function)
network.c:484: warning: unused variable 'nid'
I'm supposed to set the value of EC_KEY somewhere? What's EC_KEY?
If someone can give me a hint on how to fix this it could be great, thanks.
(Centos 5.6 2.6.18-194.8.1.el5.028stab070.2, gcc 4.1.2-50, openssl 0.9.8e-12, with ./configure --with-openssl --with-openssl-libs=/usr/lib, lighty 1.4.x)
Replies (5)
RE: [Compile error] network.c: In function 'network_init': network.c:483: error: 'EC_KEY' undeclared - Added by XVilka over 13 years ago
EC - Elliptic Curve. Try newer version of OpenSSL, which support Elliptic Curve Cryptography. 1.0 or later
RE: [Compile error] network.c: In function 'network_init': network.c:483: error: 'EC_KEY' undeclared - Added by 1lnxraider over 13 years ago
Having the same issue as reported by PrivL
OS: CentOS release 5.6 (Final)
kernel: 2.6.18-238.12.1.el5
openssl: OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
lighttpd: 1.4.29
gcc: (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50)
The only work around I've tried is to place a check for OPENSSL_NO_ECDH, like it is used for the object creation for ecdh near line 654.
#if OPENSSL_VERSION_NUMBER >= 0x0090800fL
#ifndef OPENSSL_NO_ECDH
EC_KEY *ecdh;
int nid;
#endif
#endif
This will at least allow the code to compile using the configure options listed above. This is by no means a fix. What is the correct fix for this?
RE: [Compile error] network.c: In function 'network_init': network.c:483: error: 'EC_KEY' undeclared - Added by matthias over 13 years ago
Same here too when trying to rebuild on RHEL6 but also Fedora 15.
RE: [Compile error] network.c: In function 'network_init': network.c:483: error: 'EC_KEY' undeclared - Added by rayhoffman over 13 years ago
It is a lot easier to solve this problem than it seems.
You need to get the latest OpenSSL release from here: http://www.openssl.org/source/
Version 1.0.0d is the latest release at this time. Unpack and build it with:
./config --openssldir=/usr/local/ssl
make
make install
(replace /usr/local/ssl with another directory for OpenSSL if you prefer)
Then configure the build of lighttpd as usual, with the OpenSSL directory specified in the --with-openssl= paramter. Like this:
./configure --prefix=/usr/local/lighttpd-1.4.29 --with-fam --with-openssl=/usr/local/ssl
RE: [Compile error] network.c: In function 'network_init': network.c:483: error: 'EC_KEY' undeclared - Added by lvs over 13 years ago
I think the check for OPENSSL_NO_ECDH should be included to allow lighttpd to compile on systems like Fedora/RHEL where EC support was removed from openssl due to patent issues. I therefore filed a bug and attached a patch here: http://redmine.lighttpd.net/issues/2335
Bests, Lars