mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-03 23:39:45 +01:00
Merge pull request #674 from dcooper16/fix_client_simulation
Fix client simulation
This commit is contained in:
commit
edaffc85ec
@ -3394,12 +3394,13 @@ create_client_simulation_tls_clienthello() {
|
||||
|
||||
if [[ "$extension_type" != "0000" ]]; then
|
||||
# The extension will just be copied into the revised ClientHello
|
||||
sni_extension_found=true
|
||||
offset=$offset-4
|
||||
len=$len_extension+8
|
||||
tls_extensions+="${tls_handshake_ascii:$offset:$len}"
|
||||
offset=$offset+$len
|
||||
elif [[ -n "$SNI" ]]; then
|
||||
else
|
||||
sni_extension_found=true
|
||||
if [[ -n "$SNI" ]]; then
|
||||
# Create a server name extension that corresponds to $SNI
|
||||
len_servername=${#NODE}
|
||||
hexdump_format_str="$len_servername/1 \"%02x\""
|
||||
@ -3411,6 +3412,7 @@ create_client_simulation_tls_clienthello() {
|
||||
tls_extensions+="000000${len_sni_ext}00${len_sni_listlen}0000${len_servername_hex}${servername_hexstr}"
|
||||
offset=$offset+$len_extension+4
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if ! $sni_extension_found; then
|
||||
|
Loading…
Reference in New Issue
Block a user