From f30d7568e7a07d45eac2f704fc57bb4c5df742ed Mon Sep 17 00:00:00 2001 From: Dirk Date: Wed, 4 Feb 2015 09:48:34 +0100 Subject: [PATCH 1/2] - checking protoype of tls sockets but not called/working yet - small fixes $DEBUG --- testssl.sh | 274 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 264 insertions(+), 10 deletions(-) diff --git a/testssl.sh b/testssl.sh index 7528182..cc52e45 100755 --- a/testssl.sh +++ b/testssl.sh @@ -620,7 +620,7 @@ std_cipherlists() { [ $SHOW_LOC_CIPH = "1" ] && out "local ciphers are: " && cat $TMPFILE | sed 's/:/, /g' $OPENSSL s_client -cipher "$1" $STARTTLS -connect $NODEIP:$PORT $SNI 2>$TMPFILE >/dev/null /dev/null >$TMPFILE @@ -980,7 +980,7 @@ server_preference() { proto[i]=`grep -w "Protocol" $TMPFILE | sed -e 's/^ \+Protocol \+://' -e 's/ //g'` cipher[i]=`grep -w "Cipher" $TMPFILE | egrep -vw "New|is" | sed -e 's/^ \+Cipher \+://' -e 's/ //g'` [[ ${cipher[i]} == "0000" ]] && cipher[i]="" # Hack! - [[ $DEBUG -eq 2 ]] && outln "Default cipher for ${proto[i]}: ${cipher[i]}" + [[ $DEBUG -ge 2 ]] && outln "Default cipher for ${proto[i]}: ${cipher[i]}" else proto[i]="" cipher[i]="" @@ -996,7 +996,7 @@ server_preference() { cipher[i]="" else cipher[i]=`grep -aw "Cipher" $TMPFILE | egrep -vw "New|is" | sed -e 's/^ \+Cipher \+://' -e 's/ //g'` - [[ $DEBUG -eq 2 ]] && outln "Default cipher for ${proto[i]}: ${cipher[i]}" + [[ $DEBUG -ge 2 ]] && outln "Default cipher for ${proto[i]}: ${cipher[i]}" fi fi fi @@ -1089,7 +1089,7 @@ server_defaults() { CN_nosni=`$OPENSSL s_client $STARTTLS -connect $NODEIP:$PORT 2>/dev/null /dev/null | hexdump -C | wc -l` + [[ "$DEBUG" -ge 2 ]] && out " (returned $lines lines) " + +# case $tls_low_byte in +# 00) tls_str="SSLv3" ;; +# 01) tls_str="TLS 1" ;; +# 02) tls_str="TLS 1.1" ;; +# 03) tls_str="TLS 1.2" ;; +# esac + +# printf "Protokoll "; tput bold; printf "$tls_low_byte = $tls_str"; tput sgr0; printf ": " + + if [[ $ret -eq 1 ]] || [[ $lines -eq 1 ]] ; then + outln "NOT available" + ret=1 + else + if [[ 03$tls_low_byte -eq $DETECTED_TLS_VERSION ]]; then + outln "available" + ret=0 + else + out "NOT available " + [[ $DEBUG -ge 2 ]] && echo -n "send: 0x03$tls_low_byte, returned: 0x$DETECTED_TLS_VERSION" + echo + fi + fi + + + close_socket + TMPFILE=$SOCK_REPLY_FILE + tmpfile_handle $FUNCNAME.dd + return $ret +} + + ok_ids(){ greenln "\n ok -- something resetted our ccs packets" @@ -2223,7 +2478,6 @@ ignore_no_or_lame() { default) ;; esac - return 1 } @@ -2277,7 +2531,7 @@ parse_hn_port() { fi datebanner "Testing" - [[ -z "$2" ]] && runs_HTTP # for starttls all is clear + [[ -z "$2" ]] && runs_HTTP # for starttls we don't check the protocol as it is supplied on the cmd line initialize_engine } @@ -2558,6 +2812,6 @@ case "$1" in exit $ret ;; esac -# $Id: testssl.sh,v 1.180 2015/02/03 22:46:46 dirkw Exp $ +# $Id: testssl.sh,v 1.181 2015/02/04 08:48:33 dirkw Exp $ # vim:ts=5:sw=5 From e0429cc3feddbb1ec3c7a64dda15355e14d943fc Mon Sep 17 00:00:00 2001 From: Dirk Wetter Date: Thu, 5 Feb 2015 09:22:01 +0100 Subject: [PATCH 2/2] Update Readme.md new stable 1.0.2 branch, also with 4 more ciphers --- .../openssl-1.0.2-chacha.pm/Readme.md | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/openssl-bins/openssl-1.0.2-chacha.pm/Readme.md b/openssl-bins/openssl-1.0.2-chacha.pm/Readme.md index 16f15a1..acd1ed5 100644 --- a/openssl-bins/openssl-1.0.2-chacha.pm/Readme.md +++ b/openssl-bins/openssl-1.0.2-chacha.pm/Readme.md @@ -19,8 +19,7 @@ work for me work correctly, it's also likely they'll disappear shortly General ------- -* 64 bit versions were compiled under Opensuse 12.3 -* 32 bit versions were compiled under Ubuntu 12.04 LTS +* 64+32 bit versions were compiled under Ubuntu 12.04 LTS Likely you cannot use older distributions, younger should work. I provide for each distributions two sets of binaries: @@ -47,23 +46,37 @@ If you want to compile OpenSSL yourself, here are the instructions: 2.) configure the damned thing. Options I used: -**for 64Bit:** +**for 64Bit including Kerberos ciphers:** ./config --prefix=/usr/ --openssldir=/etc/ssl enable-zlib enable-ssl2 enable-rc5 enable-rc2 \ enable-GOST enable-cms enable-md2 enable-mdc2 enable-ec enable-ec2m enable-ecdh enable-ecdsa \ enable-seed enable-camellia enable-idea enable-rfc3779 enable-ec_nistp_64_gcc_128 \ --with-krb5-flavor=MIT experimental-jpake + +**for 64Bit, static binaries:** -**for 32 Bit:** + ./config --prefix=/usr/ --openssldir=/etc/ssl enable-zlib enable-ssl2 enable-rc5 enable-rc2 \ + enable-GOST enable-cms enable-md2 enable-mdc2 enable-ec enable-ec2m enable-ecdh enable-ecdsa \ + enable-seed enable-camellia enable-idea enable-rfc3779 enable-ec_nistp_64_gcc_128 \ + -static experimental-jpake + +**for 32 Bit including Kerberos ciphers:** ./config --prefix=/usr/ --openssldir=/etc/ssl enable-zlib enable-ssl2 enable-rc5 enable-rc2 \ enable-GOST enable-cms enable-md2 enable-mdc2 enable-ec enable-ec2m enable-ecdh enable-ecdsa \ enable-seed enable-camellia enable-idea enable-rfc3779 no-ec_nistp_64_gcc_128 \ --with-krb5-flavor=MIT experimental-jpake + + **for 32 Bit, static binaries:** + + ./config --prefix=/usr/ --openssldir=/etc/ssl enable-zlib enable-ssl2 enable-rc5 enable-rc2 \ + enable-GOST enable-cms enable-md2 enable-mdc2 enable-ec enable-ec2m enable-ecdh enable-ecdsa \ + enable-seed enable-camellia enable-idea enable-rfc3779 no-ec_nistp_64_gcc_128 \ + -static experimental-jpake Don't use -DTEMP_GOST_TLS, it currently breaks things and it is not needed for general GOST [1] support. -If you don't have / don't want Kerberos libraries and devel rpms/debs, omit "--with-krb5-flavor=MIT". If you have other Kerberos flavors you need to figure out by yourself. +If you don't have / don't want Kerberos libraries and devel rpms/debs, omit "--with-krb5-flavor=MIT" (see examples). If you have other Kerberos flavors you need to figure out by yourself. 3.) make depend @@ -72,8 +85,8 @@ If you don't have / don't want Kerberos libraries and devel rpms/debs, omit "--w 5.) make report (check whether it runs ok) 6.) "./apps/openssl ciphers -V 'ALL:COMPLEMENTOFALL' | wc -l" lists now for me -* 187(+4 GOST) ciphers -- including kerberos -* 173(+4 GOST) ciphers without kerberos +* 191(+4 GOST) ciphers -- including kerberos +* 177(+4 GOST) ciphers without kerberos as opposed to 111/109 from Ubuntu or Opensuse.