diff mod_s2s_auth_dane/mod_s2s_auth_dane.lua @ 2032:6645838c6475

mod_s2s_auth_dane: Check if cert:pubkey() is available
author Kim Alvefur <zash@zash.se>
date Sat, 23 Jan 2016 20:34:26 +0100
parents 8ccf347c7753
children 39774b078dde
line wrap: on
line diff
--- a/mod_s2s_auth_dane/mod_s2s_auth_dane.lua	Fri Jan 22 16:05:22 2016 +0100
+++ b/mod_s2s_auth_dane/mod_s2s_auth_dane.lua	Sat Jan 23 20:34:26 2016 +0100
@@ -59,6 +59,9 @@
 	else
 		module:log("debug", "The cert:issued() method is unavailable, DANE-TA and PKIX-CA can't be enabled");
 	end
+	if not cert_mt.__index.pubkey then
+		module:log("debug", "The cert:issued() method is unavailable, the SPKI usage can't be supported");
+	end
 end
 local configured_uses = module:get_option_set("dane_uses", { "DANE-EE", "DANE-TA" });
 local enabled_uses = set.intersection(implemented_uses, configured_uses) / function(use) return use_map[use] end;