Changeset

1358:497e1df4b7ee

mod_s2s_auth_dane: Abort module loading if luaunbound is unavailable
author Kim Alvefur <zash@zash.se>
date Wed, 19 Mar 2014 14:04:09 +0100
parents 1357:67990f8d8228
children 1359:74769c0c79f8
files mod_s2s_auth_dane/mod_s2s_auth_dane.lua
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_s2s_auth_dane/mod_s2s_auth_dane.lua	Wed Mar 19 14:03:46 2014 +0100
+++ b/mod_s2s_auth_dane/mod_s2s_auth_dane.lua	Wed Mar 19 14:04:09 2014 +0100
@@ -26,6 +26,11 @@
 local base64 = require"util.encodings".base64;
 local idna_to_ascii = require "util.encodings".idna.to_ascii;
 
+if not dns_lookup.types or not dns_lookup.types.TLSA then
+	module:log("error", "No TLSA support available, DANE will not be supported");
+	return
+end
+
 local s2sout = module:depends"s2s".route_to_new_session.s2sout;
 
 local pat = "%-%-%-%-%-BEGIN ([A-Z ]+)%-%-%-%-%-\r?\n"..