diff --git a/testssl.sh b/testssl.sh index 4aa16c9..857371b 100755 --- a/testssl.sh +++ b/testssl.sh @@ -561,18 +561,19 @@ show_rfc_style(){ # header and list for all_ciphers+cipher_per_proto, and PFS+RC4 neat_header(){ - outln " Hexcode Cipher Suite Name (OpenSSL) KeyExch. Encryption Bits${MAP_RFC_FNAME:+ Cipher Suite Name (RFC)}" - outln "-------------------------------------------------------------------------${MAP_RFC_FNAME:+------------------------------------------------}" + outln "Hexcode Cipher Suite Name (OpenSSL) KeyExch. Encryption Bits${MAP_RFC_FNAME:+ Cipher Suite Name (RFC)}" + outln "-------------------------------------------------------------------------${MAP_RFC_FNAME:+----------------------------------------------}" } neat_list(){ + hexc=`echo $1 | sed 's/0x/x/'` kx=`echo $3 | sed 's/Kx=//g'` enc=`echo $4 | sed 's/Enc=//g'` strength=`echo $enc | sed -e 's/.*(//' -e 's/)//'` # strength = encryption bits strength=`echo $strength | sed -e 's/ChaCha20-Poly1305/ly1305/g'` # workaround for empty bits ChaCha20-Poly1305 enc=`echo $enc | sed -e 's/(.*)//g' -e 's/ChaCha20-Poly1305/ChaCha20-Po/g'` # workaround for empty bits ChaCha20-Poly1305 echo "$export" | grep -iq export && strength="$strength,export" - $ECHO " %-8s %-29s %-10s %-11s%-11s${MAP_RFC_FNAME:+ %-48s}${SHOW_EACH_C:+ }" "$1" "$2" "$kx" "$enc" "$strength" "$(show_rfc_style $HEXC)" + $ECHO " %-7s %-30s %-10s %-11s%-11s${MAP_RFC_FNAME:+ %-48s}${SHOW_EACH_C:+ }" "$hexc" "$2" "$kx" "$enc" "$strength" "$(show_rfc_style $HEXC)" } test_just_one(){ @@ -1481,39 +1482,41 @@ help() { PRG=`basename $0` cat << EOF +$PRG + + <-h|--help> what you're looking at + <-b|--banner> displays banner + version + <-v|--version> same as above + <-V|--local> pretty print all local ciphers + <-V|--local> what cipher is ? + $PRG URI -where is *one* of + <-e|--each-cipher> check each local ciphers remotely + <-E|-ee|--cipher-per-proto> check those per protocol + <-f|--ciphers> check cipher suites + <-p|--protocols> check TLS/SSL protocols only + <-P|--preference> displays the servers picks: protocol+cipher + <-y|--spdy> checks for SPDY/NPN + <-x|--single-ciphers-test> tests matched of cipher + <-B|--heartbleed> tests only for heartbleed vulnerability + <-I|--ccs|--ccs_injection> tests only for CCS injection vulnerability + <-R|--renegotiation> tests only for renegotiation vulnerability + <-C|--compression|--crime> tests only for CRIME vulnerability + <-T|--breach> tests only for BREACH vulnerability + <-0|--poodle> tests only for POODLE vulnerability + <-s|--pfs|--fs|--nsa> checks (perfect) forward secrecy settings + <-4|--rc4|--appelbaum> which RC4 ciphers are being offered? + <-H|--header|--headers> check for HSTS, HPKP and server/application banner string - <-h|--help> what you're looking at - <-b|--banner> displays banner + version - <-v|--version> same as above - <-V|--local> pretty print all local ciphers - <-V|--local> what cipher is ? - - <-e|--each-cipher> check each local ciphers remotely - <-E|-ee|--cipher-per-proto> check those per protocol - <-f|--ciphers> check cipher suites - <-p|--protocols> check TLS/SSL protocols only - <-P|--preference> displays the servers picks: protocol+cipher - <-y|--spdy> checks for SPDY/NPN - <-B|--heartbleed> tests only for heartbleed vulnerability - <-I|--ccs|--ccs_injection> tests only for CCS injection vulnerability - <-R|--renegotiation> tests only for renegotiation vulnerability - <-C|--compression|--crime> tests only for CRIME vulnerability - <-T|--breach> tests only for BREACH vulnerability - <-0|--poodle> tests only for POODLE vulnerability - <-s|--pfs|--fs|--nsa> checks (perfect) forward secrecy settings - <-4|--rc4|--appelbaum> which RC4 ciphers are being offered? - <-H|--header|--headers> check for HSTS and server banner string - -URI is host|host:port|URL|URL:port - (port 443 is assumed unless otherwise specified) - - <-t|--starttls> host:port *) + <-t|--starttls> host:port *) -*) for telnet STARTTLS support you need a/my patched openssl version + is host|host:port|URL|URL:port + (port 443 is assumed unless otherwise specified) + + +*) for telnet STARTTLS support you need the supplied patched openssl version EOF @@ -1526,7 +1529,7 @@ mybanner() { osslver=`$OPENSSL version` osslpath=`which $OPENSSL` hn=`hostname` - #poor man's ident (nowadays not neccessarily installed) + #poor man's ident (nowadays ident not neccessarily installed) idtag=`grep '\$Id' $0 | grep -w Exp | grep -v grep | sed -e 's/^# //' -e 's/\$ $/\$/'` [ "$COLOR" != 0 ] && idtag="\033[1;30m$idtag\033[m\033[1m" bb=`cat <