mirror of
https://github.com/drwetter/testssl.sh.git
synced 2024-12-31 22:09:44 +01:00
Merge pull request #1120 from dcooper16/avoid_clienthello_size_bug
Avoid ClientHello size bug
This commit is contained in:
commit
d7e9794062
@ -11860,6 +11860,13 @@ socksend_tls_clienthello() {
|
||||
done
|
||||
len_extension=$len_extension+$len_padding_extension+0x4
|
||||
len_extension_hex=$(printf "%02x\n" $len_extension)
|
||||
elif [[ ! "$extra_extensions_list" =~ " 0015 " ]] && ( [[ $((len_all%256)) -eq 10 ]] || [[ $((len_all%256)) -eq 14 ]] ); then
|
||||
# Some servers fail if the length of the ClientHello is 522, 778, 1034, 1290, ... bytes.
|
||||
# A few servers also fail if the length is 526, 782, 1038, 1294, ... bytes.
|
||||
# So, if the ClientHello would be one of these length, add a 5-byte padding extension.
|
||||
all_extensions="$all_extensions\\x00\\x15\\x00\\x01\\x00"
|
||||
len_extension+=5
|
||||
len_extension_hex=$(printf "%02x\n" $len_extension)
|
||||
fi
|
||||
len2twobytes "$len_extension_hex"
|
||||
all_extensions="
|
||||
|
Loading…
Reference in New Issue
Block a user