Merge pull request #674 from dcooper16/fix_client_simulation

Fix client simulation
This commit is contained in:
Dirk Wetter 2017-03-24 18:45:40 +01:00 committed by GitHub
commit edaffc85ec

View File

@ -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