From 41839ab221f53ccc68a3f5f98fee768c47956890 Mon Sep 17 00:00:00 2001 From: David Cooper Date: Thu, 15 Feb 2018 14:13:04 -0500 Subject: [PATCH] Bugfix for extra extensions If extra extensions are provided to socksend_tls_clienthello(), the socksend_tls_clienthello() needs to determine what extensions were provided so that it doesn't add any of these extensions a second time. The code that was looping through the extra extensions to get the extension IDs was using the value for the length of the string. This commit fixes the error. --- testssl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testssl.sh b/testssl.sh index 3c62d75..48c6fe9 100755 --- a/testssl.sh +++ b/testssl.sh @@ -10965,7 +10965,7 @@ socksend_tls_clienthello() { # the provided values for those extensions. extra_extensions="$(tolower "$4")" code2network "$extra_extensions" - len_all=${#extra_extensions} + len_all=${#NW_STR} for (( i=0; i < len_all; i=i+16+4*0x$len_extension_hex )); do part2=$i+4 extn_type="${NW_STR:i:2}${NW_STR:part2:2}"