summaryrefslogtreecommitdiff
path: root/buildscripts/fetch_and_build_openssl.sh
diff options
context:
space:
mode:
Diffstat (limited to 'buildscripts/fetch_and_build_openssl.sh')
-rwxr-xr-x[-rw-r--r--]buildscripts/fetch_and_build_openssl.sh38
1 files changed, 23 insertions, 15 deletions
diff --git a/buildscripts/fetch_and_build_openssl.sh b/buildscripts/fetch_and_build_openssl.sh
index 14b60806ecc..09c1924fc55 100644..100755
--- a/buildscripts/fetch_and_build_openssl.sh
+++ b/buildscripts/fetch_and_build_openssl.sh
@@ -1,31 +1,39 @@
#!/bin/bash
set -o errexit
-set -o verbose
+#set -o verbose
if [ $# -ne 3 ]; then
- echo "Arguments: <python command> <make flags> <config flags>"
+ echo "Arguments: <python command> <make flags> <config flags>" >&2
exit 3
fi
-PYTHON=$1
-OPENSSL_MAKE_FLAGS=$2
-OPENSSL_CONFIG_FLAGS=$3
+PYTHON="$1" # not needed anymore
+OPENSSL_MAKE_FLAGS="$2"
+OPENSSL_CONFIG_FLAGS="$3"
OPENSSL_VERSION=1.1.0i
OPENSSL_NAME=openssl-${OPENSSL_VERSION}
OPENSSL_TARBALL=${OPENSSL_NAME}.tar.gz
+
+basedir="$(pwd)"
+
mkdir -p openssl
-curl -L -o openssl/${OPENSSL_TARBALL} https://s3.amazonaws.com/boxes.10gen.com/build/${OPENSSL_TARBALL}
-LOCAL_HASH="$(${PYTHON} buildscripts/sha256sum.py openssl/${OPENSSL_TARBALL})"
-echo ${LOCAL_HASH}
+pushd openssl
+curl -L -o ${OPENSSL_TARBALL} \
+ "https://s3.amazonaws.com/boxes.10gen.com/build/${OPENSSL_TARBALL}"
-if [ "$LOCAL_HASH" != "ebbfc844a8c8cc0ea5dc10b86c9ce97f401837f3fa08c17b2cdadc118253cf99" ]
-then
- exit 3
-fi
+# To regenerate: shasum -a 256 -b $OPENSSL_TARBALL
+shasum -c /dev/fd/0 <<EOF || exit 3
+ebbfc844a8c8cc0ea5dc10b86c9ce97f401837f3fa08c17b2cdadc118253cf99 *$OPENSSL_TARBALL
+EOF
+
+tar -xzf ${OPENSSL_TARBALL}
-cd openssl
-tar -xvzf ${OPENSSL_TARBALL} --strip-components 1
-./config no-shared --prefix=${PWD}/../openssl_install_dir ${OPENSSL_CONFIG_FLAGS}
+mkdir -p build
+pushd build
+../$OPENSSL_NAME/config no-shared --prefix="$basedir/openssl_install_dir" ${OPENSSL_CONFIG_FLAGS}
make ${OPENSSL_MAKE_FLAGS}
make install_sw
+popd # build
+
+popd # openssl