# HG changeset patch # User Kim Alvefur # Date 1395152428 -3600 # Node ID b0f780d3a24ebced5fe984089c1ed4b67426fc8d # Parent a052740bbf48ddc3e9738b44a5e0165141a43d7d mod_s2s_auth_dane: Don't pass nil to hash functions in case of unsupported selectors diff -r a052740bbf48 -r b0f780d3a24e mod_s2s_auth_dane/mod_s2s_auth_dane.lua --- 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;