mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-01 06:19:44 +01:00
Fix #2502
This commit fixes #2502 in the 3.2 branch by checking that the key_share extension is at least 4 bytes long (8 in ASCII-HEX). These 4 bytes encode the group value (2 bytes) and the length of the key (2 bytes).
This commit is contained in:
parent
c2a322419c
commit
c72f4061b4
@ -14455,7 +14455,7 @@ parse_tls_serverhello() {
|
|||||||
tls_extensions+=" (id=51), len=$extension_len\n"
|
tls_extensions+=" (id=51), len=$extension_len\n"
|
||||||
fi
|
fi
|
||||||
if [[ "$process_full" =~ all ]] || [[ "$process_full" == ephemeralkey ]]; then
|
if [[ "$process_full" =~ all ]] || [[ "$process_full" == ephemeralkey ]]; then
|
||||||
if [[ $extension_len -lt 4 ]]; then
|
if [[ $extension_len -lt 8 ]]; then
|
||||||
debugme tmln_warning "Malformed key share extension."
|
debugme tmln_warning "Malformed key share extension."
|
||||||
[[ $DEBUG -ge 1 ]] && tmpfile_handle ${FUNCNAME[0]}.txt
|
[[ $DEBUG -ge 1 ]] && tmpfile_handle ${FUNCNAME[0]}.txt
|
||||||
return 1
|
return 1
|
||||||
|
Loading…
Reference in New Issue
Block a user