Skip to content

Commit 911f1b0

Browse files
authored
Fix GitHub download URL for newer versions (#70)
1 parent c1a5ade commit 911f1b0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

build-libssl.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,13 @@ if [ ! -e ${OPENSSL_ARCHIVE_FILE_NAME} ]; then
490490
# -s be silent, -f return non-zero exit status on failure, -I get header (do not download)
491491
curl ${CURL_OPTIONS} -sfIL "${OPENSSL_ARCHIVE_URL}" > /dev/null
492492
493+
# If unsuccessful, use the GitHub URL for newer versions and try again.
494+
if [ $? -ne 0 ]; then
495+
OPENSSL_ARCHIVE_URL="https://github.com/openssl/openssl/releases/download/${OPENSSL_ARCHIVE_BASE_NAME}/${OPENSSL_ARCHIVE_FILE_NAME}"
496+
497+
curl ${CURL_OPTIONS} -sfIL "${OPENSSL_ARCHIVE_URL}" > /dev/null
498+
fi
499+
493500
# If unsuccessful, update the URL for older versions and try again.
494501
if [ $? -ne 0 ]; then
495502
BRANCH=$(echo "${VERSION}" | grep -Eo '^[0-9]\.[0-9]\.[0-9]')

0 commit comments

Comments
 (0)