mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-03 23:39:45 +01:00
In cases where HTTP/2 was the only ALPN protocol, the JSON output was missing the finding as the additional protocol was empty. This fix tests whether there's an additional protcol and only calls fileout() if there's one.
This commit is contained in:
parent
4eb6ab5976
commit
c91a771465
@ -8104,7 +8104,7 @@ run_alpn() {
|
||||
else
|
||||
out ", "
|
||||
fi
|
||||
# only h2 is what browser need to use HTTP/2.0 and brings a security benefit
|
||||
# only h2 is what browser need to use HTTP/2.0 and brings a security,privacy and performance benefit
|
||||
if [[ "$proto" == "h2" ]]; then
|
||||
pr_svrty_good "$proto"
|
||||
fileout "${jsonID}_HTTP2" "OK" "$proto"
|
||||
@ -8116,7 +8116,8 @@ run_alpn() {
|
||||
done
|
||||
if $has_alpn_proto; then
|
||||
outln " (offered)"
|
||||
fileout "$jsonID" "INFO" "$alpn_finding"
|
||||
# if h2 is not the only protocol:
|
||||
[[ -n "$alpn_finding" ]] && fileout "$jsonID" "INFO" "$alpn_finding"
|
||||
else
|
||||
outln "not offered"
|
||||
fileout "$jsonID" "INFO" "not offered"
|
||||
|
Loading…
Reference in New Issue
Block a user