Skip to content
Permalink
Browse files

minor code improvements

  • Loading branch information...
drwetter committed Feb 22, 2019
1 parent b42ebc8 commit 57054bc1495434a88ba8bb5c838216738421bc94
Showing with 12 additions and 11 deletions.
  1. +12 −11 utils/make-openssl.sh
@@ -1,11 +1,10 @@
#!/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 \
@@ -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

0 comments on commit 57054bc

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.