diff mod_s2s_auth_dane/mod_s2s_auth_dane.lua @ 1410:f4e497a53c6e

mod_s2s_auth_dane: Change how TLSA support is detected
author Kim Alvefur <zash@zash.se>
date Wed, 07 May 2014 17:08:47 +0200
parents 151aa00559d1
children 8626abe100e2
line wrap: on
line diff
--- a/mod_s2s_auth_dane/mod_s2s_auth_dane.lua	Wed May 07 17:07:10 2014 +0200
+++ b/mod_s2s_auth_dane/mod_s2s_auth_dane.lua	Wed May 07 17:08:47 2014 +0200
@@ -28,9 +28,12 @@
 local cert_verify_identity = require "util.x509".verify_identity;
 local pem2der = require"util.x509".pem2der;
 
-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
+do
+	local net_dns = require"net.dns";
+	if not net_dns.types or not net_dns.types[52] then
+		module:log("error", "No TLSA support available, DANE will not be supported");
+		return
+	end
 end
 
 local use_map = { ["DANE-EE"] = 3; ["DANE-TA"] = 2; ["PKIX-EE"] = 1; ["PKIX-CA"] = 0 }