Mercurial > prosody-hg
comparison plugins/mod_c2s.lua @ 5861:c3ee62b3bdfe
Merge 0.10->trunk
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Mon, 07 Oct 2013 12:56:53 +0200 |
| parents | e327f2d4e09f |
| children | 98b768a41c9d |
comparison
equal
deleted
inserted
replaced
| 5858:89b16a160cbc | 5861:c3ee62b3bdfe |
|---|---|
| 67 | 67 |
| 68 -- If session.secure is *false* (not nil) then it means we /were/ encrypting | 68 -- If session.secure is *false* (not nil) then it means we /were/ encrypting |
| 69 -- since we now have a new stream header, session is secured | 69 -- since we now have a new stream header, session is secured |
| 70 if session.secure == false then | 70 if session.secure == false then |
| 71 session.secure = true; | 71 session.secure = true; |
| 72 session.encrypted = true; | |
| 72 | 73 |
| 73 local sock = session.conn:socket(); | 74 local sock = session.conn:socket(); |
| 74 if sock.info then | 75 if sock.info then |
| 75 local info = sock:info(); | 76 local info = sock:info(); |
| 76 (session.log or log)("info", "Stream encrypted (%s with %s)", info.protocol, info.cipher); | 77 (session.log or log)("info", "Stream encrypted (%s with %s)", info.protocol, info.cipher); |
| 207 session.log("info", "Client connected"); | 208 session.log("info", "Client connected"); |
| 208 | 209 |
| 209 -- Client is using legacy SSL (otherwise mod_tls sets this flag) | 210 -- Client is using legacy SSL (otherwise mod_tls sets this flag) |
| 210 if conn:ssl() then | 211 if conn:ssl() then |
| 211 session.secure = true; | 212 session.secure = true; |
| 213 session.encrypted = true; | |
| 212 | 214 |
| 213 -- Check if TLS compression is used | 215 -- Check if TLS compression is used |
| 214 local sock = conn:socket(); | 216 local sock = conn:socket(); |
| 215 if sock.info then | 217 if sock.info then |
| 216 session.compressed = sock:info"compression"; | 218 session.compressed = sock:info"compression"; |
