Skip to content

Commit 7f49af1

Browse files
authored
Merge pull request #2367 from drwetter/Improve_ServerHello_ErrorMessage
Make clear where the parsing error comes from: SSL or TLS
2 parents 00b510d + 858f003 commit 7f49af1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

testssl.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12126,7 +12126,7 @@ parse_sslv2_serverhello() {
1212612126
[[ "$DEBUG" -ge 5 ]] && echo "$v2_hello_ascii"
1212712127
if [[ -z "$v2_hello_ascii" ]]; then
1212812128
ret=0 # 1 line without any blanks: no server hello received
12129-
debugme echo "server hello empty"
12129+
debugme echo "(SSLv2) ServerHello empty"
1213012130
else
1213112131
# now scrape two bytes out of the reply per byte
1213212132
v2_hello_initbyte="${v2_hello_ascii:0:1}" # normally this belongs to the next, should be 8!
@@ -12156,7 +12156,7 @@ parse_sslv2_serverhello() {
1215612156
elif [[ $v2_hello_initbyte != "8" ]] || [[ $v2_hello_handshake != "04" ]]; then
1215712157
ret=1
1215812158
if [[ $DEBUG -ge 2 ]]; then
12159-
echo "no correct server hello"
12159+
echo "no correct (SSLv2) ServerHello"
1216012160
echo "SSLv2 server init byte: 0x0$v2_hello_initbyte"
1216112161
echo "SSLv2 hello handshake : 0x$v2_hello_handshake"
1216212162
fi
@@ -14179,7 +14179,7 @@ parse_tls_serverhello() {
1417914179
done
1418014180

1418114181
if [[ $tls_serverhello_ascii_len -eq 0 ]]; then
14182-
debugme echo "server hello empty, TCP connection closed"
14182+
debugme echo "(TLS) ServerHello empty, TCP connection closed"
1418314183
DETECTED_TLS_VERSION="closed TCP connection "
1418414184
[[ $DEBUG -ge 1 ]] && tmpfile_handle ${FUNCNAME[0]}.txt
1418514185
return 1 # no server hello received

0 commit comments

Comments
 (0)