Software /
code /
prosody-modules
Changeset
4674:1b701f208b1b
mod_tls_policy: Switch method of checking for TLS-encrypted connection
Might deprecate 'session.encrypted', not sure if it's used anywhere
else. This is likely more compatible anyhow.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 09 Sep 2021 20:27:14 +0200 |
parents | 4673:eee7ef8eb0a2 |
children | 4675:c9397cd5cfe6 |
files | mod_tls_policy/mod_tls_policy.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_tls_policy/mod_tls_policy.lua Thu Sep 09 14:39:13 2021 +0100 +++ b/mod_tls_policy/mod_tls_policy.lua Thu Sep 09 20:27:14 2021 +0200 @@ -11,7 +11,7 @@ module:hook(event_name, function (event) local origin = event.origin; - if origin.encrypted then + if origin.conn and origin.conn:ssl() then local info = origin.conn:socket():info(); for key, what in pairs(policy) do module:log("debug", "Does info[%q] = %s match %s ?", key, tostring(info[key]), tostring(what));