From e21db577b48d5d08c5caf841aed8ce405f30577d Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Wed, 18 May 2022 17:56:48 +0200 Subject: [PATCH] Update openssl version Signed-off-by: Bensuperpc --- common/common.docker | 2 ++ imagefiles/build-and-install-openssl.sh | 14 +++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/common/common.docker b/common/common.docker index 07f2a20..0158b10 100644 --- a/common/common.docker +++ b/common/common.docker @@ -4,6 +4,8 @@ ARG GIT_VERSION=2.36.1 ARG CMAKE_VERSION=3.23.1 ARG NINJA_VERSION=1.11.0 ARG FLATCC_VERSION=d90ed18ad09824297ffd5fbc578ccb1666d13890 +ARG OPENSSL_VERSION=openssl-1.1.1o +ARG OPENSSL_HASH=9384a2b0570dd80358841464677115df785edb941c71211f75076d72fe6b438f # Image build scripts COPY \ diff --git a/imagefiles/build-and-install-openssl.sh b/imagefiles/build-and-install-openssl.sh index 5d6a705..adad2fb 100755 --- a/imagefiles/build-and-install-openssl.sh +++ b/imagefiles/build-and-install-openssl.sh @@ -47,9 +47,17 @@ source $MY_DIR/utils.sh # copied from https://github.com/pypa/manylinux/tree/master/docker/build_scripts # -OPENSSL_ROOT=openssl-1.1.1l +if [[ -z "${OPENSSL_VERSION}" ]]; then + echo >&2 'error: OPENSSL_VERSION env. variable must be set to a non-empty value' + exit 1 +fi + +if [[ -z "${OPENSSL_HASH}" ]]; then + echo >&2 'error: OPENSSL_HASH env. variable must be set to a non-empty value' + exit 1 +fi + # Hash from https://www.openssl.org/source/openssl-1.1.1l.tar.gz.sha256 -OPENSSL_HASH=0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1 OPENSSL_DOWNLOAD_URL=http://www.openssl.org/source/ # a recent enough perl is needed to build openssl @@ -111,7 +119,7 @@ function build_openssl { cd /usr/src build_perl $PERL_ROOT $PERL_HASH -build_openssl $OPENSSL_ROOT $OPENSSL_HASH +build_openssl "${OPENSSL_VERSION}" "${OPENSSL_HASH}" # Delete PERL rm -rf /opt/perl