Changeset

7898:d8029b2e0f43

mod_tls: Log reasons for not being able to do TLS
author Kim Alvefur <zash@zash.se>
date Wed, 15 Feb 2017 23:03:22 +0100
parents 7897:08bde6a6fd56
children 7899:2b3d0ab67f7d
files plugins/mod_tls.lua
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_tls.lua	Wed Feb 15 23:00:03 2017 +0100
+++ b/plugins/mod_tls.lua	Wed Feb 15 23:03:22 2017 +0100
@@ -63,6 +63,7 @@
 
 local function can_do_tls(session)
 	if not session.conn.starttls then
+		session.log("debug", "Underlying connection does not support STARTTLS");
 		return false;
 	elseif session.ssl_ctx ~= nil then
 		return session.ssl_ctx;
@@ -77,6 +78,7 @@
 		session.ssl_ctx = ssl_ctx_s2sout;
 		session.ssl_cfg = ssl_cfg_s2sout;
 	else
+		session.log("debug", "Unknown session type, don't know which TLS context to use");
 		return false;
 	end
 	if not session.ssl_ctx then