mod_s2s_auth_dane/mod_s2s_auth_dane.lua
changeset 1352 b0f780d3a24e
parent 1351 a052740bbf48
child 1353 a17c2c4043e5
--- a/mod_s2s_auth_dane/mod_s2s_auth_dane.lua	Tue Mar 18 15:12:11 2014 +0100
+++ b/mod_s2s_auth_dane/mod_s2s_auth_dane.lua	Tue Mar 18 15:20:28 2014 +0100
@@ -141,9 +141,9 @@
 					end
 
 					if match == 1 then
-						certdata = hashes.sha256(certdata);
+						certdata = certdata and hashes.sha256(certdata);
 					elseif match == 2 then
-						certdata = hashes.sha512(certdata);
+						certdata = certdata and hashes.sha512(certdata);
 					elseif match ~= 0 then
 						module:log("warn", "DANE match rule %s is unsupported", tlsa:getMatchType() or match);
 						certdata = nil;