Comparison

plugins/mod_c2s.lua @ 5801:224644752bf4

mod_c2s, mod_s2s: Log cipher and encryption info in a more compact and (hopefully) less confusing way
author Kim Alvefur <zash@zash.se>
date Wed, 14 Aug 2013 15:00:36 +0200
parent 5789:3b05a86631b9
child 5802:5b79710dd5a1
comparison
equal deleted inserted replaced
5800:3a48acbcb7f3 5801:224644752bf4
71 session.secure = true; 71 session.secure = true;
72 72
73 local sock = session.conn:socket(); 73 local sock = session.conn:socket();
74 if sock.info then 74 if sock.info then
75 local info = sock:info(); 75 local info = sock:info();
76 (session.log or log)("info", "Stream encrypted (%s) with %s, authenticated with %s and exchanged keys with %s", 76 (session.log or log)("info", "Stream encrypted (%s with %s)", info.protocol, info.cipher);
77 info.protocol, info.encryption, info.authentication, info.key);
78 session.compressed = info.compression; 77 session.compressed = info.compression;
79 else 78 else
80 (session.log or log)("info", "Stream encrypted"); 79 (session.log or log)("info", "Stream encrypted");
81 session.compressed = sock.compression and sock:compression(); --COMPAT mw/luasec-hg 80 session.compressed = sock.compression and sock:compression(); --COMPAT mw/luasec-hg
82 end 81 end