diff 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
line wrap: on
line diff
--- a/mod_s2s_auth_dane/mod_s2s_auth_dane.lua	Wed Mar 05 17:40:44 2014 +0100
+++ b/mod_s2s_auth_dane/mod_s2s_auth_dane.lua	Wed Mar 05 17:42:15 2014 +0100
@@ -65,7 +65,7 @@
 
 				if select == 0 then
 					certdata = pem2der(cert:pem());
-				elseif select == 1 then
+				elseif select == 1 and cert.pubkey then
 					certdata = pem2der(cert:pubkey());
 				else
 					module:log("warn", "DANE selector %d is unsupported", select);