mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-01 06:19:44 +01:00
minor code improvements
This commit is contained in:
parent
b42ebc883e
commit
57054bc149
@ -1,12 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/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 \
|
STDOPTIONS="--prefix=/usr/ -DOPENSSL_USE_BUILD_DATE enable-zlib \
|
||||||
enable-ssl2 enable-ssl3 enable-ssl-trace enable-rc5 enable-rc2 \
|
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 \
|
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
|
case $(uname) in
|
||||||
Linux|FreeBSD)
|
Linux|FreeBSD)
|
||||||
|
openssldir_option='--openssldir=/etc/ssl'
|
||||||
case $(uname -m) in
|
case $(uname -m) in
|
||||||
i686|armv7l) clean
|
i686|armv7l) clean
|
||||||
if [ "$1" = krb ]; then
|
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
|
else
|
||||||
./config --openssldir=$OPENSSLDIR $STDOPTIONS no-ec_nistp_64_gcc_128 -static
|
./config $openssldir_option $STDOPTIONS no-ec_nistp_64_gcc_128 -static
|
||||||
fi
|
fi
|
||||||
[ $? -ne 0 ] && error "configuring"
|
[ $? -ne 0 ] && error "configuring"
|
||||||
;;
|
;;
|
||||||
x86_64|amd64) clean
|
x86_64|amd64) clean
|
||||||
if [ "$1" = krb ]; then
|
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
|
else
|
||||||
./config --openssldir=$OPENSSLDIR $STDOPTIONS enable-ec_nistp_64_gcc_128 -static
|
./config $openssldir_option $STDOPTIONS enable-ec_nistp_64_gcc_128 -static
|
||||||
fi
|
fi
|
||||||
[ $? -ne 0 ] && error "configuring"
|
[ $? -ne 0 ] && error "configuring"
|
||||||
;;
|
;;
|
||||||
@ -128,14 +128,15 @@ case $(uname) in
|
|||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
Darwin)
|
Darwin)
|
||||||
|
openssldir_option='--openssldir=/private/etc/ssl/'
|
||||||
case $(uname -m) in
|
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"
|
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"
|
[ $? -ne 0 ] && error "configuring"
|
||||||
;;
|
;;
|
||||||
i386) clean || echo "nothing to clean"
|
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"
|
[ $? -ne 0 ] && error "configuring"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user