mod_c2s, mod_s2s: Set session.encrypted as session.secure does not allways mean encry...
[prosody.git] / plugins / mod_c2s.lua
index 1fb8dcf571f8b072fb26dec9a0a632fcc822040a..3bdffc7d5537c0801032e46bb3f3ab97098d2486 100644 (file)
@@ -69,6 +69,7 @@ function stream_callbacks.streamopened(session, attr)
        -- 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 @@ function listener.onconnect(conn)
        -- 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();