From dc10d6f541a52409fe905370343272fa4b2033aa Mon Sep 17 00:00:00 2001 From: James Yonan Date: Tue, 11 Jun 2013 05:46:58 +0000 Subject: [PATCH] Added scripts/linux/build-polarssl-ovpn2 to build OpenVPN 2.x with PolarSSL. --- polarssl/build-polarssl | 10 ++++++---- scripts/linux/build-polarssl-ovpn2 | 10 ++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100755 scripts/linux/build-polarssl-ovpn2 diff --git a/polarssl/build-polarssl b/polarssl/build-polarssl index 9f9c32ea..aa721b0a 100755 --- a/polarssl/build-polarssl +++ b/polarssl/build-polarssl @@ -7,13 +7,10 @@ # ENABLE_TESTING=1 -- run PolarSSL test scripts after build # DEBUG_BUILD=1 -- enable minimal testing on target # ENABLE_SERVER=1 -- enable SSL/TLS server code +# ENABLE_FS_IO=1 -- enable PolarSSL file I/O # VERBOSE=1 -- see build commands # USE_MINICRYPTO=1 -- use minicrypto library # NO_WIPE=1 -- don't wipe source tree and reunzip tarball -# -# Examples: -# AES_NI=1 $O3/polarssl/build-polarssl -# AES_NI=1 ENABLE_TESTING=1 VERBOSE=1 $O3/polarssl/build-polarssl set -e if [ -z "$O3" ]; then @@ -120,6 +117,11 @@ if [ "$ENABLE_SERVER" = "1" ]; then echo "#define POLARSSL_SSL_SRV_C" >>$OPC fi +# enable PolarSSL file I/O +if [ "$ENABLE_FS_IO" = "1" ]; then + echo "#define POLARSSL_FS_IO" >>$OPC +fi + # Build shared library if [ "$SHARED" = "1" ]; then OPT="$OPT -DUSE_SHARED_POLARSSL_LIBRARY=1" diff --git a/scripts/linux/build-polarssl-ovpn2 b/scripts/linux/build-polarssl-ovpn2 new file mode 100755 index 00000000..86dd5821 --- /dev/null +++ b/scripts/linux/build-polarssl-ovpn2 @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# When running OpenVPN 2.x ./configure script, use the following command: +# +# POLARSSL_CFLAGS="-I$HOME/linux/polarssl/polarssl-linux/include" POLARSSL_LIBS="-L$HOME/linux/polarssl/polarssl-linux/library -lpolarssl" ./configure --with-crypto-library=polarssl + +rm -rf polarssl +mkdir polarssl +VERBOSE=1 TARGET=linux ENABLE_SERVER=1 ENABLE_FS_IO=1 $O3/polarssl/build-polarssl +mv polarssl-linux polarssl