Comparison

plugins/mod_c2s.lua @ 11619:d629135450ec

mod_c2s: Log the same messages for Direct TLS as with starttls ^C^V
author Kim Alvefur <zash@zash.se>
date Sun, 20 Jun 2021 18:15:59 +0200
parent 11618:8f0fe74ede94
child 11622:a62146353528
comparison
equal deleted inserted replaced
11618:8f0fe74ede94 11619:d629135450ec
293 session.encrypted = true; 293 session.encrypted = true;
294 294
295 -- Check if TLS compression is used 295 -- Check if TLS compression is used
296 local sock = conn:socket(); 296 local sock = conn:socket();
297 if sock.info then 297 if sock.info then
298 session.compressed = sock:info"compression"; 298 local info = sock:info();
299 (session.log or log)("info", "Stream encrypted (%s with %s)", info.protocol, info.cipher);
300 session.compressed = info.compression;
301 m_tls_params:with_labels(info.protocol, info.cipher):add(1)
302 else
303 (session.log or log)("info", "Stream encrypted");
299 end 304 end
300 end 305 end
301 306
302 if opt_keepalives then 307 if opt_keepalives then
303 conn:setoption("keepalive", opt_keepalives); 308 conn:setoption("keepalive", opt_keepalives);