mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-01 06:19:44 +01:00
Update make-openssl.sh: Darwin compatibility
- Darwin doesn't build with -static (removed; file name suffix changed to "dynamic" in this case) - Darwin has a different openssldir (/private/etc/ssl) - script doesn't fail any more at make clean step in case there is no Makefile yet - Darwin 64 bit compilation needs ./Configure instead of ./config and an explicit reference to darwin64-x86_64-cc
This commit is contained in:
parent
ed7e7d8d50
commit
9d26b86030
@ -5,7 +5,9 @@
|
|||||||
# instructions @ https://github.com/drwetter/testssl.sh/tree/2.9dev/bin
|
# instructions @ https://github.com/drwetter/testssl.sh/tree/2.9dev/bin
|
||||||
|
|
||||||
|
|
||||||
STDOPTIONS="--prefix=/usr/ --openssldir=/etc/ssl -DOPENSSL_USE_BUILD_DATE enable-zlib \
|
OPENSSLDIR="/etc/ssl"
|
||||||
|
|
||||||
|
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 \
|
||||||
enable-seed enable-camellia enable-idea enable-rfc3779 experimental-jpake"
|
enable-seed enable-camellia enable-idea enable-rfc3779 experimental-jpake"
|
||||||
@ -21,8 +23,11 @@ error() {
|
|||||||
clean() {
|
clean() {
|
||||||
case $NOCLEAN in
|
case $NOCLEAN in
|
||||||
yes|Y|YES) ;;
|
yes|Y|YES) ;;
|
||||||
*) make clean
|
*)
|
||||||
[ $? -ne 0 ] && error "no openssl directory"
|
if [ -e "Makefile" ]; then
|
||||||
|
make clean
|
||||||
|
[ $? -ne 0 ] && error "no openssl directory"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
return 0
|
return 0
|
||||||
@ -86,7 +91,11 @@ testv6_patch
|
|||||||
if [ "$1" = krb ]; then
|
if [ "$1" = krb ]; then
|
||||||
name2add=krb
|
name2add=krb
|
||||||
else
|
else
|
||||||
name2add=static
|
if [ $(uname) != "Darwin" ]; then
|
||||||
|
name2add=static
|
||||||
|
else
|
||||||
|
name2add=dynamic
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "doing a build for $(uname).$(uname -m)".$name2add
|
echo "doing a build for $(uname).$(uname -m)".$name2add
|
||||||
@ -99,17 +108,17 @@ case $(uname) in
|
|||||||
case $(uname -m) in
|
case $(uname -m) in
|
||||||
i686|armv7l) clean
|
i686|armv7l) clean
|
||||||
if [ "$1" = krb ]; then
|
if [ "$1" = krb ]; then
|
||||||
./config $STDOPTIONS no-ec_nistp_64_gcc_128 --with-krb5-flavor=MIT
|
./config --openssldir=$OPENSSLDIR $STDOPTIONS no-ec_nistp_64_gcc_128 --with-krb5-flavor=MIT
|
||||||
else
|
else
|
||||||
./config $STDOPTIONS no-ec_nistp_64_gcc_128 -static
|
./config --openssldir=$OPENSSLDIR $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 $STDOPTIONS enable-ec_nistp_64_gcc_128 --with-krb5-flavor=MIT
|
./config --openssldir=$OPENSSLDIR $STDOPTIONS enable-ec_nistp_64_gcc_128 --with-krb5-flavor=MIT
|
||||||
else
|
else
|
||||||
./config $STDOPTIONS enable-ec_nistp_64_gcc_128 -static
|
./config --openssldir=$OPENSSLDIR $STDOPTIONS enable-ec_nistp_64_gcc_128 -static
|
||||||
fi
|
fi
|
||||||
[ $? -ne 0 ] && error "configuring"
|
[ $? -ne 0 ] && error "configuring"
|
||||||
;;
|
;;
|
||||||
@ -121,12 +130,12 @@ case $(uname) in
|
|||||||
Darwin)
|
Darwin)
|
||||||
case $(uname -m) in
|
case $(uname -m) in
|
||||||
# No Keberos (yet?) for Darwin
|
# No Keberos (yet?) for Darwin
|
||||||
x86_64) clean
|
x86_64) clean || echo "nothing to clean"
|
||||||
./config $STDOPTIONS enable-ec_nistp_64_gcc_128 -static
|
./Configure --openssldir=/private/etc/ssl/ $STDOPTIONS enable-ec_nistp_64_gcc_128 darwin64-x86_64-cc
|
||||||
[ $? -ne 0 ] && error "configuring"
|
[ $? -ne 0 ] && error "configuring"
|
||||||
;;
|
;;
|
||||||
i386) clean
|
i386) clean || echo "nothing to clean"
|
||||||
./config $STDOPTIONS no-ec_nistp_64_gcc_128 -static
|
./config --openssldir=/private/etc/ssl $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