mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-03 23:39:45 +01:00
includes IPv6 check and is ready for other uname's
This commit is contained in:
parent
02e9f5cd23
commit
6efc3e90f5
@ -13,7 +13,7 @@ sleep 3
|
|||||||
STDOPTIONS="--prefix=/usr/ --openssldir=/etc/ssl -DOPENSSL_USE_BUILD_DATE enable-zlib \
|
STDOPTIONS="--prefix=/usr/ --openssldir=/etc/ssl -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 -DTEMP_GOST_TLS"
|
enable-seed enable-camellia enable-idea enable-rfc3779 experimental-jpake"
|
||||||
|
|
||||||
clean() {
|
clean() {
|
||||||
case $NOCLEAN in
|
case $NOCLEAN in
|
||||||
@ -42,48 +42,76 @@ makeall() {
|
|||||||
|
|
||||||
copyfiles() {
|
copyfiles() {
|
||||||
echo; apps/openssl version -a; echo
|
echo; apps/openssl version -a; echo
|
||||||
cp -p apps/openssl ../openssl.$(uname).$(uname -m).$1
|
if grep static <<< "$1"; then
|
||||||
echo
|
cp -p apps/openssl ../openssl.$(uname).$(uname -m)
|
||||||
|
else
|
||||||
|
cp -p apps/openssl ../openssl.$(uname).$(uname -m).krb5
|
||||||
|
fi
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
case $(uname -m) in
|
testv6_patch() {
|
||||||
"i686") clean
|
if grep -q 'ending bracket for IPv6' apps/s_socket.c; then
|
||||||
if [[ "$1" = krb ]]; then
|
STDOPTIONS += "-DOPENSSL_USE_IPV6"
|
||||||
name2add=krb
|
else
|
||||||
./config $STDOPTIONS no-ec_nistp_64_gcc_128 --with-krb5-flavor=MIT
|
|
||||||
else
|
|
||||||
name2add=static
|
|
||||||
./config $STDOPTIONS no-ec_nistp_64_gcc_128 -static
|
|
||||||
fi
|
|
||||||
[ $? -ne 0 ] && error "configuring"
|
|
||||||
makeall && copyfiles "$name2add"
|
|
||||||
[ $? -ne 0 ] && error "copying files"
|
|
||||||
apps/openssl ciphers -V 'ALL:COMPLEMENTOFALL' | wc -l
|
|
||||||
echo
|
|
||||||
echo "------------ all ok ------------"
|
|
||||||
echo
|
echo
|
||||||
;;
|
echo "no IPv6 patch (Fedora) detected!! -- Press ^C and dl & apply from"
|
||||||
"x86_64") clean
|
echo "https://github.com/drwetter/testssl.sh/blob/master/bin/fedora-dirk-ipv6.diff"
|
||||||
if [[ "$1" = krb ]]; then
|
echo "or press any key to ignore"
|
||||||
name2add=krb
|
|
||||||
./config $STDOPTIONS enable-ec_nistp_64_gcc_128 --with-krb5-flavor=MIT
|
|
||||||
else
|
|
||||||
name2add=static
|
|
||||||
./config $STDOPTIONS enable-ec_nistp_64_gcc_128 -static
|
|
||||||
fi
|
|
||||||
[ $? -ne 0 ] && error "configuring"
|
|
||||||
makeall && copyfiles "$name2add"
|
|
||||||
[ $? -ne 0 ] && error "copying files"
|
|
||||||
apps/openssl ciphers -V 'ALL:COMPLEMENTOFALL' | wc -l
|
|
||||||
echo
|
echo
|
||||||
echo "------------ all ok ------------"
|
read a
|
||||||
echo
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
testv6_patch
|
||||||
|
|
||||||
|
|
||||||
|
case $(uname) in
|
||||||
|
Linux|FreeBSD)
|
||||||
|
case $(uname -m) in
|
||||||
|
"i686") clean
|
||||||
|
if [[ "$1" = krb ]]; then
|
||||||
|
name2add=krb
|
||||||
|
./config $STDOPTIONS no-ec_nistp_64_gcc_128 --with-krb5-flavor=MIT
|
||||||
|
else
|
||||||
|
name2add=static
|
||||||
|
./config $STDOPTIONS no-ec_nistp_64_gcc_128 -static
|
||||||
|
fi
|
||||||
|
[ $? -ne 0 ] && error "configuring"
|
||||||
|
makeall && copyfiles "$name2add"
|
||||||
|
[ $? -ne 0 ] && error "copying files"
|
||||||
|
apps/openssl ciphers -V 'ALL:COMPLEMENTOFALL' | wc -l
|
||||||
|
echo
|
||||||
|
echo "------------ all ok ------------"
|
||||||
|
echo
|
||||||
|
;;
|
||||||
|
"x86_64") clean
|
||||||
|
if [[ "$1" = krb ]]; then
|
||||||
|
name2add=krb
|
||||||
|
./config $STDOPTIONS enable-ec_nistp_64_gcc_128 --with-krb5-flavor=MIT
|
||||||
|
else
|
||||||
|
name2add=static
|
||||||
|
./config $STDOPTIONS enable-ec_nistp_64_gcc_128 -static
|
||||||
|
fi
|
||||||
|
[ $? -ne 0 ] && error "configuring"
|
||||||
|
makeall && copyfiles "$name2add"
|
||||||
|
[ $? -ne 0 ] && error "copying files"
|
||||||
|
apps/openssl ciphers -V 'ALL:COMPLEMENTOFALL' | wc -l
|
||||||
|
echo
|
||||||
|
echo "------------ all ok ------------"
|
||||||
|
echo
|
||||||
|
;;
|
||||||
|
*) echo " Sorry, don't know this architecture $(uname -m)"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
*) echo " Sorry, don't know this architecture $(uname -m)"
|
Darwin)
|
||||||
exit 1
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
# vim:tw=90:ts=5:sw=5
|
# vim:tw=90:ts=5:sw=5
|
||||||
# $Id: make-openssl.sh,v 1.14 2015/07/20 19:40:54 dirkw Exp $
|
# $Id: make-openssl.sh,v 1.14 2015/07/20 19:40:54 dirkw Exp $
|
||||||
|
Loading…
Reference in New Issue
Block a user