mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-03 23:39:45 +01:00
Fix s_client_options()
This commit fixes an error in s_client_options() when the function is called with an empty "-cipher" list and $OPENSSL supports "@SECLEVEL". This happens, for example, when ciphers_by_strength() is called for TLS 1.3. The call to `openssl s_client` will fail is the cipher option is provided with an empty list or a list that just contains "@SECLEVEL=0". So, "@SECLEVEL=0" should only be added if the "$ciphers" list is non-empty. If "$ciphers" remains empty, then the "-cipher" option will not be added to the command line.
This commit is contained in:
parent
e36cfffb2c
commit
00fb68f47c
@ -2197,7 +2197,7 @@ s_client_options() {
|
||||
if "$HAS_SECLEVEL"; then
|
||||
if [[ "$ciphers" == notpresent ]]; then
|
||||
[[ ! " $options " =~ \ -tls1_3\ ]] && ciphers="@SECLEVEL=0:ALL:COMPLEMENTOFALL"
|
||||
else
|
||||
elif [[ -n "$ciphers" ]]; then
|
||||
ciphers="@SECLEVEL=0:$ciphers"
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user