Software /
code /
prosody-modules
Diff
mod_admin_web/admin_web/mod_admin_web.lua @ 396:8cb21ef24e5d
mod_admin_web: Show S2S certificate validity
author | Florian Zeitz <florob@babelmonkeys.de> |
---|---|
date | Fri, 29 Jul 2011 22:26:02 +0200 |
parent | 328:73001ddff453 |
child | 549:fc5df35a3fe4 |
line wrap: on
line diff
--- 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 @@ -- </session> -- <session xmlns="http://prosody.im/streams/s2s" jid="example.com"> --- <encrypted/> +-- <encrypted> +-- <valid/> / <invalid/> +-- </encrypted> -- <compressed/> -- <in/> / <out/> -- </session> @@ -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();