diff --git a/polarssl/build-polarssl b/polarssl/build-polarssl index 3f5f9462..9aa10664 100755 --- a/polarssl/build-polarssl +++ b/polarssl/build-polarssl @@ -41,7 +41,8 @@ if [ "$NO_WIPE" = "1" ]; then else echo WIPE and reunzip source rm -rf $POLARSSL_VERSION - tar xfz ~/Downloads/$POLARSSL_VERSION-gpl.tgz + [ -z "$DL" ] && DL=~/Downloads + tar xfz $DL/$POLARSSL_VERSION-gpl.tgz cd $POLARSSL_VERSION @@ -112,6 +113,9 @@ if [ "$ENABLE_SERVER" = "1" ]; then OPT="$OPT -DENABLE_SERVER=1" fi +# Build shared library (fixme) +OPT="$OPT -DUSE_SHARED_POLARSSL_LIBRARY=1" + # echo options echo OPTIONS $OPT diff --git a/scripts/build b/scripts/build index 5bb803ac..eee798d8 100755 --- a/scripts/build +++ b/scripts/build @@ -105,7 +105,9 @@ if [ "$APPLE_FAMILY" = "1" ]; then fi LIBS="$LIBS -framework Security" else - if [ "$NOSSL" != "1" ]; then + if [ "$OPENSSL_LINK" = "1" ]; then + LIBS="$LIBS -lcrypto -lssl" + elif [ "$NOSSL" != "1" ]; then CPPFLAGS="$CPPFLAGS -DUSE_OPENSSL" LIBS="$LIBS -lssl -lcrypto -ldl" fi diff --git a/scripts/linux/build-polarssl b/scripts/linux/build-polarssl new file mode 100755 index 00000000..b5e86f8b --- /dev/null +++ b/scripts/linux/build-polarssl @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +rm -rf polarssl +mkdir polarssl +VERBOSE=1 TARGET=linux USE_MINICRYPTO=1 ENABLE_SERVER=1 SHARED=1 $O3/polarssl/build-polarssl +mv polarssl-linux polarssl diff --git a/scripts/linux/consolidate-so b/scripts/linux/consolidate-so index 3b8dbffb..5da6f22b 100755 --- a/scripts/linux/consolidate-so +++ b/scripts/linux/consolidate-so @@ -1,7 +1,9 @@ #!/usr/bin/env bash rm -rf so mkdir so -cp boost/stage-linux/lib/lib* so/ -cp lzo/lzo-linux/lib/lib* so/ -cp openssl/openssl-linux/lib/lib* so/ -cp snappy/snappy-linux/lib/lib* so/ +OPT=-d +cp $OPT boost/stage-linux/lib/lib* so/ +cp $OPT lzo/lzo-linux/lib/lib* so/ +cp $OPT openssl/openssl-linux/lib/lib* so/ +cp $OPT snappy/snappy-linux/lib/lib* so/ +cp $OPT polarssl/polarssl-linux/library/lib* so/ diff --git a/test/ovpncli/README.txt b/test/ovpncli/README.txt index bd935314..fae1b400 100644 --- a/test/ovpncli/README.txt +++ b/test/ovpncli/README.txt @@ -4,4 +4,8 @@ Build on Mac: Build on Linux: - STRIP=1 SNAP=1 build cli + With OpenSSL: + STRIP=1 SNAP=1 build cli + + With PolarSSL: + STRIP=1 SNAP=1 PSSL=1 OPENSSL_LINK=1 build cli