diff --git a/scripts/tls-nextprotoneg.nse b/scripts/tls-nextprotoneg.nse index 5fc974c79..4664dd626 100644 --- a/scripts/tls-nextprotoneg.nse +++ b/scripts/tls-nextprotoneg.nse @@ -116,7 +116,12 @@ local check_npn = function(response) table.insert(results, protocol) end - return results + if next(results) then + return results + else + stdnse.debug1("Server supports TLS NPN extension, but no protocols were offered.") + return "" + end else stdnse.debug1("Server response was not server_hello") return nil