comparison plugins/mod_console.lua @ 3652:8ae10787272a

mod_console: Denote services whose identity matches their (valid/trusted) certificate as 'secure'
author Paul Aurich <paul@darkrain42.org>
date Sun, 21 Nov 2010 21:10:46 -0800
parents 8b436cc88c0e
children 4b56cd1302d4
comparison
equal deleted inserted replaced
3651:337391d34b70 3652:8ae10787272a
496 for host, host_session in pairs(hosts) do 496 for host, host_session in pairs(hosts) do
497 print = function (...) _print(host); _print(...); print = _print; end 497 print = function (...) _print(host); _print(...); print = _print; end
498 for remotehost, session in pairs(host_session.s2sout) do 498 for remotehost, session in pairs(host_session.s2sout) do
499 if (not match_jid) or remotehost:match(match_jid) or host:match(match_jid) then 499 if (not match_jid) or remotehost:match(match_jid) or host:match(match_jid) then
500 count_out = count_out + 1; 500 count_out = count_out + 1;
501 print(" "..host.." -> "..remotehost..(session.secure and " (encrypted)" or "")..(session.compressed and " (compressed)" or "")); 501 print(" "..host.." -> "..remotehost..(session.cert_identity_status == "valid" and " (secure)" or "")..(session.secure and " (encrypted)" or "")..(session.compressed and " (compressed)" or ""));
502 if session.sendq then 502 if session.sendq then
503 print(" There are "..#session.sendq.." queued outgoing stanzas for this connection"); 503 print(" There are "..#session.sendq.." queued outgoing stanzas for this connection");
504 end 504 end
505 if session.type == "s2sout_unauthed" then 505 if session.type == "s2sout_unauthed" then
506 if session.connecting then 506 if session.connecting then
533 if session.to_host == host and ((not match_jid) or host:match(match_jid) 533 if session.to_host == host and ((not match_jid) or host:match(match_jid)
534 or (session.from_host and session.from_host:match(match_jid)) 534 or (session.from_host and session.from_host:match(match_jid))
535 -- Pft! is what I say to list comprehensions 535 -- Pft! is what I say to list comprehensions
536 or (session.hosts and #array.collect(keys(session.hosts)):filter(subhost_filter)>0)) then 536 or (session.hosts and #array.collect(keys(session.hosts)):filter(subhost_filter)>0)) then
537 count_in = count_in + 1; 537 count_in = count_in + 1;
538 print(" "..host.." <- "..(session.from_host or "(unknown)")..(session.secure and " (encrypted)" or "")..(session.compressed and " (compressed)" or "")); 538 print(" "..host.." <- "..(session.from_host or "(unknown)")..(session.cert_identity_status == "valid" and " (secure)" or "")..(session.secure and " (encrypted)" or "")..(session.compressed and " (compressed)" or ""));
539 if session.type == "s2sin_unauthed" then 539 if session.type == "s2sin_unauthed" then
540 print(" Connection not yet authenticated"); 540 print(" Connection not yet authenticated");
541 end 541 end
542 for name in pairs(session.hosts) do 542 for name in pairs(session.hosts) do
543 if name ~= session.from_host then 543 if name ~= session.from_host then