Pregunta

I'm trying to build openvpn-2.3.4 with the latest openssl-1.0.1h. I compiled openssl from sources /usr/openssl-1.0.1h with --prefix=/opt/custom-openssl. Then I configured openvpn sources with next line:

./configure --prefix=/opt/custom-openvpn OPENSSL_SSL_LIBS="-L/usr/openssl-1.0.1h/" OPENSSL_SSL_CFLAGS="-I/usr/openssl-1.0.1h/include/openssl/" OPENSSL_CRYPTO_LIBS="-L/usr/openssl-1.0.1h/" OPENSSL_CRYPTO_CFLAGS="-I/usr/openssl-1.0.1h/include/openssl/"

Both make and make install passed with no errors but when I check versions I get

openssl version
OpenSSL 1.0.1h Jun 5 2014 // <-------
openvpn --version
OpenVPN 2.3.4 Jun 4 2014
OpenSSL version 1.0.1f Jan 6 2014 // <------

What am I doing wrong?

¿Fue útil?

Solución

The error was that compiler used Ubuntu's version of the shared object. The reason was some errors in commands above. So, final version of my configure:

./configure --prefix=/opt/custom-openvpn OPENSSL_SSL_LIBS="-L/usr/openssl-1.0.1h/ -lssl" OPENSSL_SSL_CFLAGS="-I/usr/openssl-1.0.1h/include/" OPENSSL_CRYPTO_LIBS="-L/usr/openssl-1.0.1h/ -lcrypto" OPENSSL_CRYPTO_CFLAGS="-I/usr/openssl-1.0.1h/include/"

Thanks to jww and http://comments.gmane.org/gmane.network.openvpn.user/34824

Otros consejos

I have used this:

./configure --prefix=/opt/openvpn-2.3.6 PKG_CONFIG_LIBDIR="/opt/openssl-1.0.2/lib/pkgconfig/"

-- make output snnipet

gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../src/compat    -I/opt/openssl-1.0.2/include   -I/opt/openssl-1.0.2/include      -g -O2 -MT base64.o -MD -MP -MF .deps/base64.Tpo -c -o base64.o base64.c
mv -f .deps/base64.Tpo .deps/base64.Po
gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../src/compat    -I/opt/openssl-1.0.2/include   -I/opt/openssl-1.0.2/include      -g -O2 -MT buffer.o -MD -MP -MF .deps/buffer.Tpo -c -o buffer.o buffer.c
mv -f .deps/buffer.Tpo .deps/buffer.Po
gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../src/compat    -I/opt/openssl-1.0.2/include   -I/opt/openssl-1.0.2/include      -g -O2 -MT clinat.o -MD -MP -MF .deps/clinat.Tpo -c -o clinat.o clinat.c

OpenVPN start output:

$ sudo /opt/openvpn-2.3.6/sbin/openvpn --config server-no-auth.conf 
Wed Feb  4 09:40:23 2015 OpenVPN 2.3.6 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Feb  4 2015
Wed Feb  4 09:40:23 2015 library versions: OpenSSL 1.0.2 22 Jan 2015, LZO 2.08
Wed Feb  4 09:40:23 2015 ******* WARNING *******: all encryption and authentication features disabled -- all data will be tunnelled as cleartext
Wed Feb  4 09:40:23 2015 TUN/TAP device tun0 opened
Wed Feb  4 09:40:23 2015 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Wed Feb  4 09:40:23 2015 /sbin/ifconfig tun0 172.16.1.1 pointopoint 172.16.1.2 mtu 1500
Wed Feb  4 09:40:23 2015 UDPv4 link local (bound): [undef]
Wed Feb  4 09:40:23 2015 UDPv4 link remote: [undef]
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top