comparison 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
comparison
equal deleted inserted replaced
2031:f21147d56bc4 2032:6645838c6475
56 -- Need cert:issued() for these 56 -- Need cert:issued() for these
57 implemented_uses:add("DANE-TA"); 57 implemented_uses:add("DANE-TA");
58 implemented_uses:add("PKIX-CA"); 58 implemented_uses:add("PKIX-CA");
59 else 59 else
60 module:log("debug", "The cert:issued() method is unavailable, DANE-TA and PKIX-CA can't be enabled"); 60 module:log("debug", "The cert:issued() method is unavailable, DANE-TA and PKIX-CA can't be enabled");
61 end
62 if not cert_mt.__index.pubkey then
63 module:log("debug", "The cert:issued() method is unavailable, the SPKI usage can't be supported");
61 end 64 end
62 end 65 end
63 local configured_uses = module:get_option_set("dane_uses", { "DANE-EE", "DANE-TA" }); 66 local configured_uses = module:get_option_set("dane_uses", { "DANE-EE", "DANE-TA" });
64 local enabled_uses = set.intersection(implemented_uses, configured_uses) / function(use) return use_map[use] end; 67 local enabled_uses = set.intersection(implemented_uses, configured_uses) / function(use) return use_map[use] end;
65 local unsupported = configured_uses - implemented_uses; 68 local unsupported = configured_uses - implemented_uses;