- check whether openssl is executable

- spaces to tabs
- adding hint to "aha" in help
This commit is contained in:
Dirk 2015-03-17 15:14:58 +01:00
parent 263535520f
commit c159af7f42

View File

@ -2366,6 +2366,12 @@ find_openssl_binary() {
fi fi
fi fi
if ! $OPENSSL version -a 2>&1 >/dev/null; then
outln
pr_magentaln "FATAL: cannot exec $OPENSSL"
exit -1
fi
# http://www.openssl.org/news/openssl-notes.html # http://www.openssl.org/news/openssl-notes.html
OSSL_VER=$($OPENSSL version | awk -F' ' '{ print $2 }') OSSL_VER=$($OPENSSL version | awk -F' ' '{ print $2 }')
OSSL_VER_MAJOR=$(echo "$OSSL_VER" | sed 's/\..*$//') OSSL_VER_MAJOR=$(echo "$OSSL_VER" | sed 's/\..*$//')
@ -2489,6 +2495,11 @@ partly mandatory parameters:
protocol is one of ftp,smtp,pop3,imap,xmpp,telnet,ldap (for the latter two you need e.g. the supplied openssl) protocol is one of ftp,smtp,pop3,imap,xmpp,telnet,ldap (for the latter two you need e.g. the supplied openssl)
For HTML output you need to pipe through "aha" (Ansi HTML Adapter: github.com/theZiz/aha) like
"$PRG <options> <URI> | aha >output.html"
EOF EOF
return $? return $?
} }
@ -2835,7 +2846,7 @@ PATH_TO_TESTSSL=$(readlink "$BASH_SOURCE") 2>/dev/null
#FIXME: I know this sucks and getoptS is better #FIXME: I know this sucks and getoptS is better
case "$1" in case "$1" in
-b|--banner|-banner|-v|--version|-version) -b|--banner|-banner|-v|--version|-version)
exit 0 exit 0
;; ;;
--mx) --mx)
@ -2877,12 +2888,12 @@ case "$1" in
parse_hn_port "$2" parse_hn_port "$2"
run_std_cipherlists run_std_cipherlists
exit $? ;; exit $? ;;
-S|--server_defaults) -S|--server_defaults)
maketempf maketempf
parse_hn_port "$2" parse_hn_port "$2"
server_defaults server_defaults
exit $? ;; exit $? ;;
-P|--server_preference) -P|--server_preference)
maketempf maketempf
parse_hn_port "$2" parse_hn_port "$2"
server_preference server_preference
@ -3014,6 +3025,6 @@ case "$1" in
exit $ret ;; exit $ret ;;
esac esac
# $Id: testssl.sh,v 1.210 2015/03/17 11:22:20 dirkw Exp $
# vim:ts=5:sw=5
# $Id: testssl.sh,v 1.211 2015/03/17 14:14:57 dirkw Exp $
# vim:ts=5:sw=5