Software /
code /
prosody
Changeset
5859:e327f2d4e09f
mod_c2s, mod_s2s: Set session.encrypted as session.secure does not allways mean encrypted (eg consider_bosh_secure)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 07 Oct 2013 12:43:00 +0200 |
parents | 5857:8613888d0f9e |
children | 5860:87e2fafba5df |
files | plugins/mod_c2s.lua plugins/mod_s2s/mod_s2s.lua plugins/mod_s2s/s2sout.lib.lua |
diffstat | 3 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_c2s.lua Sun Oct 06 23:18:54 2013 +0200 +++ b/plugins/mod_c2s.lua Mon Oct 07 12:43:00 2013 +0200 @@ -69,6 +69,7 @@ -- since we now have a new stream header, session is secured if session.secure == false then session.secure = true; + session.encrypted = true; local sock = session.conn:socket(); if sock.info then @@ -209,6 +210,7 @@ -- Client is using legacy SSL (otherwise mod_tls sets this flag) if conn:ssl() then session.secure = true; + session.encrypted = true; -- Check if TLS compression is used local sock = conn:socket();
--- a/plugins/mod_s2s/mod_s2s.lua Sun Oct 06 23:18:54 2013 +0200 +++ b/plugins/mod_s2s/mod_s2s.lua Mon Oct 07 12:43:00 2013 +0200 @@ -283,6 +283,7 @@ -- TODO: Rename session.secure to session.encrypted if session.secure == false then session.secure = true; + session.encrypted = true; local sock = session.conn:socket(); if sock.info then
--- a/plugins/mod_s2s/s2sout.lib.lua Sun Oct 06 23:18:54 2013 +0200 +++ b/plugins/mod_s2s/s2sout.lib.lua Mon Oct 07 12:43:00 2013 +0200 @@ -270,6 +270,7 @@ -- Reset secure flag in case this is another -- connection attempt after a failed STARTTLS host_session.secure = nil; + host_session.encrypted = nil; local conn, handler; local proto = connect_host.proto;