Changeset

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 2031:f21147d56bc4
children 2033:acf86edeb1cc
files mod_s2s_auth_dane/mod_s2s_auth_dane.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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;