diff --git a/codebuild/bin/install_default_dependencies.sh b/codebuild/bin/install_default_dependencies.sh index 72f42593e82..02ed7b75a88 100755 --- a/codebuild/bin/install_default_dependencies.sh +++ b/codebuild/bin/install_default_dependencies.sh @@ -99,18 +99,6 @@ if [[ "$TESTS" == "integrationv2" || "$TESTS" == "ALL" ]]; then fi fi - if [[ ! -x "$OPENSSL_0_9_8_INSTALL_DIR/bin/openssl" ]]; then - # Download and Install Openssl 0.9.8 - mkdir -p "$OPENSSL_0_9_8_INSTALL_DIR"||true - codebuild/bin/install_openssl_0_9_8.sh "$(mktemp -d)" "$OPENSSL_0_9_8_INSTALL_DIR" "$OS_NAME" > /dev/null ; - fi - - if [[ ! -x "$GNUTLS_INSTALL_DIR/bin/gnutls-cli" ]]; then - # Download and Install GnuTLS for integration tests - mkdir -p "$GNUTLS_INSTALL_DIR"||true - codebuild/bin/install_gnutls.sh "$(mktemp -d)" "$GNUTLS_INSTALL_DIR" > /dev/null ; - fi - if [[ ! -x "$GNUTLS37_INSTALL_DIR/bin/gnutls-cli" ]]; then # Download and Install GnuTLS for integration tests mkdir -p "$GNUTLS37_INSTALL_DIR"||true diff --git a/codebuild/bin/install_gnutls.sh b/codebuild/bin/install_gnutls.sh deleted file mode 100755 index c7f0a8a820f..00000000000 --- a/codebuild/bin/install_gnutls.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash -# -# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"). -# You may not use this file except in compliance with the License. -# A copy of the License is located at -# -# http://aws.amazon.com/apache2.0 -# -# or in the "license" file accompanying this file. This file is distributed -# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -# express or implied. See the License for the specific language governing -# permissions and limitations under the License. -# - -set -e -source codebuild/bin/s2n_setup_env.sh - -usage() { - echo "install_gnutls.sh build_dir install_dir os_name" - exit 1 -} - -if [ "$#" -ne "2" ]; then - usage -fi - -GNUTLS_BUILD_DIR=$1 -GNUTLS_INSTALL_DIR=$2 - -source codebuild/bin/jobs.sh - -# libgmp is needed for libnettle -case "$DISTRO" in - "ubuntu") - sudo apt-get -qq install libgmp3-dev -y - ;; - "amazon linux") - sudo yum install -y gmp-devel - ;; -"darwin" ) - # Installing an existing package is a "failure" in brew - brew install gmp || true - ;; -*) - echo "Invalid platform! $OS_NAME" - usage - ;; -esac - -cd "$GNUTLS_BUILD_DIR" - -# libnettle is a dependency of GnuTLS -# Originally from: https://ftp.gnu.org/gnu/nettle/nettle-3.3.tar.gz -curl --retry 3 https://s3-us-west-2.amazonaws.com/s2n-public-test-dependencies/2017-08-29_nettle-3.3.tar.gz --output nettle-3.3.tar.gz -tar -xzf nettle-3.3.tar.gz -cd nettle-3.3 -./configure --prefix="$GNUTLS_INSTALL_DIR"/nettle -make -j $JOBS -make -j $JOBS install -cd .. - -# Install GnuTLS -# Originally from: ftp://ftp.gnutls.org/gcrypt/gnutls/v3.5/gnutls-3.5.5.tar.xz -curl --retry 3 https://s3-us-west-2.amazonaws.com/s2n-public-test-dependencies/2017-08-29_gnutls-3.5.5.tar.xz --output gnutls-3.5.5.tar.xz -tar -xJf gnutls-3.5.5.tar.xz -cd gnutls-3.5.5 -./configure LD_FLAGS="-R$GNUTLS_INSTALL_DIR/nettle/lib -L$GNUTLS_INSTALL_DIR/nettle/lib -lnettle -lhogweed" \ - NETTLE_LIBS="-R$GNUTLS_INSTALL_DIR/nettle/lib -L$GNUTLS_INSTALL_DIR/nettle/lib -lnettle" \ - NETTLE_CFLAGS="-I$GNUTLS_INSTALL_DIR/nettle/include" \ - HOGWEED_LIBS="-R$GNUTLS_INSTALL_DIR/nettle/lib -L$GNUTLS_INSTALL_DIR/nettle/lib -lhogweed" \ - HOGWEED_CFLAGS="-I$GNUTLS_INSTALL_DIR/nettle/include" \ - --without-p11-kit \ - --with-included-libtasn1 \ - --prefix="$GNUTLS_INSTALL_DIR" -make -j $JOBS -make -j $JOBS install diff --git a/codebuild/bin/install_openssl_0_9_8.sh b/codebuild/bin/install_openssl_0_9_8.sh deleted file mode 100755 index 141b21bfad4..00000000000 --- a/codebuild/bin/install_openssl_0_9_8.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash -# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"). -# You may not use this file except in compliance with the License. -# A copy of the License is located at -# -# http://aws.amazon.com/apache2.0 -# -# or in the "license" file accompanying this file. This file is distributed -# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -# express or implied. See the License for the specific language governing -# permissions and limitations under the License. -# - -set -ex -pushd "$(pwd)" - -usage() { - echo "install_openssl_0_9_8.sh build_dir install_dir os_name" - exit 1 -} - -if [ "$#" -ne "3" ]; then - usage -fi - -BUILD_DIR=$1 -INSTALL_DIR=$2 -PLATFORM=$3 - -cd "$BUILD_DIR" -wget https://www.openssl.org/source/old/0.9.x/openssl-0.9.8zh.tar.gz -tar xzvf openssl-0.9.8zh.tar.gz -cd openssl-0.9.8zh - -if [ "$PLATFORM" == "linux" ]; then - CONFIGURE="./config -d" -elif [ "$PLATFORM" == "osx" ]; then - CONFIGURE="./Configure darwin64-x86_64-cc" -else - echo "Invalid platform! $PLATFORM" - usage -fi - -$CONFIGURE --prefix="$INSTALL_DIR" - -make depend -make -j8 -make install - -popd - -exit 0 - diff --git a/codebuild/bin/s2n_override_paths.sh b/codebuild/bin/s2n_override_paths.sh index 456a55666ef..7939dfa6c53 100755 --- a/codebuild/bin/s2n_override_paths.sh +++ b/codebuild/bin/s2n_override_paths.sh @@ -16,6 +16,6 @@ set -ex # Add all of our test dependencies to the PATH. Use Openssl 1.1.1 so the latest openssl is used for s_client # integration tests. -export PATH=$PYTHON_INSTALL_DIR/bin:$OPENSSL_1_1_1_INSTALL_DIR/bin:$GNUTLS_INSTALL_DIR/bin:$SAW_INSTALL_DIR/bin:$Z3_INSTALL_DIR/bin:$SCAN_BUILD_INSTALL_DIR/bin:$PRLIMIT_INSTALL_DIR/bin:$LATEST_CLANG_INSTALL_DIR/bin:`pwd`/codebuild/bin:~/.local/bin:$PATH +export PATH=$PYTHON_INSTALL_DIR/bin:$OPENSSL_1_1_1_INSTALL_DIR/bin:$SAW_INSTALL_DIR/bin:$Z3_INSTALL_DIR/bin:$SCAN_BUILD_INSTALL_DIR/bin:$PRLIMIT_INSTALL_DIR/bin:$LATEST_CLANG_INSTALL_DIR/bin:`pwd`/codebuild/bin:~/.local/bin:$PATH export LD_LIBRARY_PATH=$OPENSSL_1_1_1_INSTALL_DIR/lib:$LD_LIBRARY_PATH; -export DYLD_LIBRARY_PATH=$OPENSSL_1_1_1_INSTALL_DIR/lib:$LD_LIBRARY_PATH; \ No newline at end of file +export DYLD_LIBRARY_PATH=$OPENSSL_1_1_1_INSTALL_DIR/lib:$LD_LIBRARY_PATH; diff --git a/codebuild/bin/s2n_setup_env.sh b/codebuild/bin/s2n_setup_env.sh index c0d3593b326..9f78662db33 100755 --- a/codebuild/bin/s2n_setup_env.sh +++ b/codebuild/bin/s2n_setup_env.sh @@ -31,7 +31,6 @@ source codebuild/bin/s2n_set_build_preset.sh : "${BASE_S2N_DIR:=$(pwd)}" : "${TEST_DEPS_DIR:=$BASE_S2N_DIR/test-deps}" : "${PYTHON_INSTALL_DIR:=$TEST_DEPS_DIR/python}" -: "${GNUTLS_INSTALL_DIR:=$TEST_DEPS_DIR/gnutls}" : "${GNUTLS37_INSTALL_DIR:=$TEST_DEPS_DIR/gnutls37}" : "${PRLIMIT_INSTALL_DIR:=$TEST_DEPS_DIR/prlimit}" : "${SAW_INSTALL_DIR:=$TEST_DEPS_DIR/saw}" @@ -39,7 +38,6 @@ source codebuild/bin/s2n_set_build_preset.sh : "${LIBFUZZER_INSTALL_DIR:=$TEST_DEPS_DIR/libfuzzer}" : "${LATEST_CLANG_INSTALL_DIR:=$TEST_DEPS_DIR/clang}" : "${SCAN_BUILD_INSTALL_DIR:=$TEST_DEPS_DIR/scan-build}" -: "${OPENSSL_0_9_8_INSTALL_DIR:=$TEST_DEPS_DIR/openssl-0.9.8}" : "${OPENSSL_1_1_1_INSTALL_DIR:=$TEST_DEPS_DIR/openssl-1.1.1}" : "${OPENSSL_3_0_INSTALL_DIR:=$TEST_DEPS_DIR/openssl-3.0}" : "${OPENSSL_1_0_2_INSTALL_DIR:=$TEST_DEPS_DIR/openssl-1.0.2}" @@ -91,7 +89,6 @@ export TESTS export BASE_S2N_DIR export TEST_DEPS_DIR export PYTHON_INSTALL_DIR -export GNUTLS_INSTALL_DIR export GNUTLS37_INSTALL_DIR export PRLIMIT_INSTALL_DIR export SAW_INSTALL_DIR @@ -99,7 +96,6 @@ export Z3_INSTALL_DIR export LIBFUZZER_INSTALL_DIR export LATEST_CLANG_INSTALL_DIR export SCAN_BUILD_INSTALL_DIR -export OPENSSL_0_9_8_INSTALL_DIR export OPENSSL_1_1_1_INSTALL_DIR export OPENSSL_3_0_INSTALL_DIR export OPENSSL_1_0_2_INSTALL_DIR @@ -163,7 +159,6 @@ export LIBFUZZER_ROOT=$LIBFUZZER_INSTALL_DIR #check if the path contains test dep X, if not and X exists, add to path path_overrides="$PYTHON_INSTALL_DIR/bin $OPENSSL_1_1_1_INSTALL_DIR/bin -$GNUTLS_INSTALL_DIR/bin $SAW_INSTALL_DIR/bin $Z3_INSTALL_DIR/bin $SCAN_BUILD_INSTALL_DIR/bin diff --git a/nix/openssl_0_9_8.nix b/nix/openssl_0_9_8.nix deleted file mode 100644 index d9869f3bd83..00000000000 --- a/nix/openssl_0_9_8.nix +++ /dev/null @@ -1,27 +0,0 @@ -# Present as a historical record. -# Only needed if https://github.com/aws/s2n-tls/issues/3810 is resolved. -{ pkgs }: -pkgs.stdenv.mkDerivation rec { - pname = "openssl"; - version = "0.9.8"; - - src = fetchTarball { - url = "https://www.openssl.org/source/old/0.9.x/openssl-0.9.8zh.tar.gz"; - sha256 = "sha256:0h451dgk2pws957cjidjhwb2qlr0qx73klzb0n0l3x601jmw27ih"; - }; - - buildInputs = [ pkgs.gnumake pkgs.perl534 ]; - - configurePhase = '' - ./config --prefix=$out - ''; - - buildPhase = '' - make depend -j $(nproc) - make -j $(nproc) - ''; - - installPhase = '' - make install - ''; -}