From 57054bc1495434a88ba8bb5c838216738421bc94 Mon Sep 17 00:00:00 2001 From: Dirk Date: Fri, 22 Feb 2019 15:09:05 +0100 Subject: [PATCH] minor code improvements --- utils/make-openssl.sh | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/utils/make-openssl.sh b/utils/make-openssl.sh index 968233e..931b650 100755 --- a/utils/make-openssl.sh +++ b/utils/make-openssl.sh @@ -1,12 +1,11 @@ #!/bin/sh # -# License GPLv2, see ../LICENSE +# This script compiles the "bad openssl" version, 1.0.2 supporting legacy +# cryptography for Linux, FreeBSD and Darwin. # -# instructions @ https://github.com/drwetter/testssl.sh/tree/2.9dev/bin +# License GPLv2, see ../LICENSE -OPENSSLDIR="/etc/ssl" - STDOPTIONS="--prefix=/usr/ -DOPENSSL_USE_BUILD_DATE enable-zlib \ enable-ssl2 enable-ssl3 enable-ssl-trace enable-rc5 enable-rc2 \ enable-gost enable-cms enable-md2 enable-mdc2 enable-ec enable-ec2m enable-ecdh enable-ecdsa \ @@ -105,20 +104,21 @@ sleep 3 case $(uname) in Linux|FreeBSD) + openssldir_option='--openssldir=/etc/ssl' case $(uname -m) in i686|armv7l) clean if [ "$1" = krb ]; then - ./config --openssldir=$OPENSSLDIR $STDOPTIONS no-ec_nistp_64_gcc_128 --with-krb5-flavor=MIT + ./config $openssldir_option $STDOPTIONS no-ec_nistp_64_gcc_128 --with-krb5-flavor=MIT else - ./config --openssldir=$OPENSSLDIR $STDOPTIONS no-ec_nistp_64_gcc_128 -static + ./config $openssldir_option $STDOPTIONS no-ec_nistp_64_gcc_128 -static fi [ $? -ne 0 ] && error "configuring" ;; x86_64|amd64) clean if [ "$1" = krb ]; then - ./config --openssldir=$OPENSSLDIR $STDOPTIONS enable-ec_nistp_64_gcc_128 --with-krb5-flavor=MIT + ./config $openssldir_option $STDOPTIONS enable-ec_nistp_64_gcc_128 --with-krb5-flavor=MIT else - ./config --openssldir=$OPENSSLDIR $STDOPTIONS enable-ec_nistp_64_gcc_128 -static + ./config $openssldir_option $STDOPTIONS enable-ec_nistp_64_gcc_128 -static fi [ $? -ne 0 ] && error "configuring" ;; @@ -128,14 +128,15 @@ case $(uname) in esac ;; Darwin) + openssldir_option='--openssldir=/private/etc/ssl/' case $(uname -m) in - # No Keberos (yet?) for Darwin + # No Kerberos (yet?) for Darwin. Static doesn't work for Darwin (#1204) x86_64) clean || echo "nothing to clean" - ./Configure --openssldir=/private/etc/ssl/ $STDOPTIONS enable-ec_nistp_64_gcc_128 darwin64-x86_64-cc + ./config $openssldir_option $STDOPTIONS enable-ec_nistp_64_gcc_128 darwin64-x86_64-cc [ $? -ne 0 ] && error "configuring" ;; i386) clean || echo "nothing to clean" - ./config --openssldir=/private/etc/ssl $STDOPTIONS no-ec_nistp_64_gcc_128 darwin64-x86_64-cc + ./config $openssldir_option $STDOPTIONS no-ec_nistp_64_gcc_128 darwin64-x86_64-cc [ $? -ne 0 ] && error "configuring" ;; esac