# HG changeset patch # User Florian Zeitz # Date 1311971162 -7200 # Node ID 8cb21ef24e5d6f3da3ef3b5cda1ad7d240718b6e # Parent 77ca0947647bb5ace7035c7ff5f121f16ecfaee7 mod_admin_web: Show S2S certificate validity diff -r 77ca0947647b -r 8cb21ef24e5d mod_admin_web/admin_web/mod_admin_web.lua --- a/mod_admin_web/admin_web/mod_admin_web.lua Tue Jul 26 13:19:09 2011 +0000 +++ b/mod_admin_web/admin_web/mod_admin_web.lua Fri Jul 29 22:26:02 2011 +0200 @@ -10,7 +10,9 @@ -- -- --- +-- +-- / +-- -- -- / -- @@ -86,7 +88,11 @@ local item = st.stanza("item", { id = id }):tag("session", {xmlns = xmlns_s2s_session, jid = name}) :tag(type):up(); if session.secure then - item:tag("encrypted"):up(); + if session.cert_identity_status == "valid" then + item:tag("encrypted"):tag("valid"):up():up(); + else + item:tag("encrypted"):tag("invalid"):up():up(); + end end if session.compressed then item:tag("compressed"):up(); diff -r 77ca0947647b -r 8cb21ef24e5d mod_admin_web/admin_web/www_files/images/secure.png Binary file mod_admin_web/admin_web/www_files/images/secure.png has changed diff -r 77ca0947647b -r 8cb21ef24e5d mod_admin_web/admin_web/www_files/js/main.js --- a/mod_admin_web/admin_web/www_files/js/main.js Tue Jul 26 13:19:09 2011 +0000 +++ b/mod_admin_web/admin_web/www_files/js/main.js Fri Jul 29 22:26:02 2011 +0200 @@ -25,15 +25,19 @@ } function _cbNewS2S(e) { - var items, entry, retract, id, jid; + var items, entry, tmp, retract, id, jid; items = e.getElementsByTagName('item'); for (i = 0; i < items.length; i++) { id = items[i].attributes['id'].value; jid = items[i].getElementsByTagName('session')[0].attributes['jid'].value; entry = $('
  • ' + jid + '
  • '); - if (items[i].getElementsByTagName('encrypted')[0]) { - entry.append(' (encrypted)'); + if (tmp = items[i].getElementsByTagName('encrypted')[0]) { + if (tmp.getElementsByTagName('valid')[0]) { + entry.append(' (secure) (encrypted)'); + } else { + entry.append(' (encrypted)'); + } } if (items[i].getElementsByTagName('compressed')[0]) { entry.append(' (compressed)');