comparison mod_s2s_auth_dane/mod_s2s_auth_dane.lua @ 1329:8d99b9c4cf0c

mod_s2s_auth_dane: Verify that the pubkey method exists when the SPKI selector is used
author Kim Alvefur <zash@zash.se>
date Wed, 05 Mar 2014 17:42:15 +0100
parents 446fcda4ec45
children bb6f3312ab46
comparison
equal deleted inserted replaced
1328:446fcda4ec45 1329:8d99b9c4cf0c
63 -- PKIX-EE or DANE-EE 63 -- PKIX-EE or DANE-EE
64 if use == 1 or use == 3 then 64 if use == 1 or use == 3 then
65 65
66 if select == 0 then 66 if select == 0 then
67 certdata = pem2der(cert:pem()); 67 certdata = pem2der(cert:pem());
68 elseif select == 1 then 68 elseif select == 1 and cert.pubkey then
69 certdata = pem2der(cert:pubkey()); 69 certdata = pem2der(cert:pubkey());
70 else 70 else
71 module:log("warn", "DANE selector %d is unsupported", select); 71 module:log("warn", "DANE selector %d is unsupported", select);
72 end 72 end
73 73