Software / code / prosody
Comparison
core/sessionmanager.lua @ 1213:de66fa750daf
sessionmanager, mod_tls: Mark a session as secure when TLS is active
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 29 May 2009 14:28:53 +0100 |
| parent | 1076:ba3639692493 |
| child | 1222:dd1616a81c49 |
comparison
equal
deleted
inserted
replaced
| 1212:3be23cf5a659 | 1213:de66fa750daf |
|---|---|
| 169 if not hosts[session.host] then | 169 if not hosts[session.host] then |
| 170 -- We don't serve this host... | 170 -- We don't serve this host... |
| 171 session:close{ condition = "host-unknown", text = "This server does not serve "..tostring(session.host)}; | 171 session:close{ condition = "host-unknown", text = "This server does not serve "..tostring(session.host)}; |
| 172 return; | 172 return; |
| 173 end | 173 end |
| 174 | |
| 175 -- If session.secure is *false* (not nil) then it means we /were/ encrypting | |
| 176 -- since we now have a new stream header, session is secured | |
| 177 if session.secure == false then | |
| 178 session.secure = true; | |
| 179 end | |
| 174 | 180 |
| 175 local features = st.stanza("stream:features"); | 181 local features = st.stanza("stream:features"); |
| 176 fire_event("stream-features", session, features); | 182 fire_event("stream-features", session, features); |
| 177 | 183 |
| 178 send(features); | 184 send(features); |