Comparison

plugins/mod_s2s.lua @ 11623:cce5191a65a7

mod_s2s: Guard against LuaSec not returning TLS info here too See previous commit to mod_c2s: a62146353528
author Kim Alvefur <zash@zash.se>
date Mon, 21 Jun 2021 13:43:40 +0200
parent 11609:6dcc45a2e3bc
child 11624:1b7669c49459
comparison
equal deleted inserted replaced
11622:a62146353528 11623:cce5191a65a7
383 if session.secure == false then 383 if session.secure == false then
384 session.secure = true; 384 session.secure = true;
385 session.encrypted = true; 385 session.encrypted = true;
386 386
387 local sock = session.conn:socket(); 387 local sock = session.conn:socket();
388 if sock.info then 388 local info = sock.info and sock:info();
389 if type(info) == "table" then
389 local info = sock:info(); 390 local info = sock:info();
390 (session.log or log)("info", "Stream encrypted (%s with %s)", info.protocol, info.cipher); 391 (session.log or log)("info", "Stream encrypted (%s with %s)", info.protocol, info.cipher);
391 session.compressed = info.compression; 392 session.compressed = info.compression;
392 m_tls_params:with_labels(info.protocol, info.cipher):add(1) 393 m_tls_params:with_labels(info.protocol, info.cipher):add(1)
393 else 394 else