From 97f7ec78811d32b538ebc172a8ee3a85a6e8fd4b Mon Sep 17 00:00:00 2001 From: Anton Tieleman Date: Wed, 1 Feb 2017 19:23:30 +0100 Subject: [PATCH] Also determine latest version in a branch over https --- build-libssl.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build-libssl.sh b/build-libssl.sh index 9e9dc4f..0890169 100755 --- a/build-libssl.sh +++ b/build-libssl.sh @@ -267,14 +267,14 @@ elif [ -n "${BRANCH}" ]; then # Valid version number, determine latest version else - echo "Checking latest version of ${BRANCH} branch on ftp.openssl.org..." - # Get directory content of /source/ (only contains latest version per branch), limit list to archives (so one archive per branch), + echo "Checking latest version of ${BRANCH} branch on openssl.org..." + # Get directory content listing of /source/ (only contains latest version per branch), limit list to archives (so one archive per branch), # filter for the requested branch, sort the list and get the last item (last two steps to ensure there is always 1 result) - VERSION=$(curl ${CURL_OPTIONS} -ls ftp://ftp.openssl.org/source/ | grep -Eo '^openssl-[0-9]\.[0-9]\.[0-9][a-z]*\.tar\.gz$' | grep -Eo "${BRANCH//./\.}[a-z]*" | sort | tail -1) + VERSION=$(curl ${CURL_OPTIONS} -s https://ftp.openssl.org/source/ | grep -Eo '>openssl-[0-9]\.[0-9]\.[0-9][a-z]*\.tar\.gz<' | grep -Eo "${BRANCH//./\.}[a-z]*" | sort | tail -1) # Verify result if [ -z "${VERSION}" ]; then - echo "Could not determine latest version, please check https://openssl.org/source/ and use --version option" + echo "Could not determine latest version, please check https://www.openssl.org/source/ and use --version option" exit 1 fi fi