Changeset

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 1328:446fcda4ec45
children 1330:bb6f3312ab46
files mod_s2s_auth_dane/mod_s2s_auth_dane.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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);