aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-06-20 18:15:59 +0200
committerKim Alvefur <zash@zash.se>2021-06-20 18:15:59 +0200
commit0acd505f2ecea86ba8dc71fbfc565edf5c497081 (patch)
tree03ed083557d3aa0a8d616616d87161e46b3ebe9b /plugins
parent807c78400ffc15c65b8908041193c8178296c409 (diff)
downloadprosody-0acd505f2ecea86ba8dc71fbfc565edf5c497081.tar.gz
prosody-0acd505f2ecea86ba8dc71fbfc565edf5c497081.zip
mod_c2s: Log the same messages for Direct TLS as with starttls
^C^V
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_c2s.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua
index 38553011..35ec201a 100644
--- a/plugins/mod_c2s.lua
+++ b/plugins/mod_c2s.lua
@@ -295,7 +295,12 @@ function listener.onconnect(conn)
-- Check if TLS compression is used
local sock = conn:socket();
if sock.info then
- session.compressed = sock:info"compression";
+ local info = sock:info();
+ (session.log or log)("info", "Stream encrypted (%s with %s)", info.protocol, info.cipher);
+ session.compressed = info.compression;
+ m_tls_params:with_labels(info.protocol, info.cipher):add(1)
+ else
+ (session.log or log)("info", "Stream encrypted");
end
end