- Correct dkim.verify processing to avoid errors when verifying messages
with no DKIM signatures
This commit is contained in:
+5
-2
@@ -934,8 +934,11 @@ class DKIM(DomainSigner):
|
||||
#: @return: True if signature verifies or False otherwise
|
||||
#: @raise DKIMException: when the message, signature, or key are badly formed
|
||||
def verify(self,idx=0,dnsfunc=get_txt):
|
||||
sig, include_headers, sigheaders = self.verify_headerprep(idx)
|
||||
return self.verify_sig(sig, include_headers, sigheaders[idx], dnsfunc)
|
||||
prep = self.verify_headerprep(idx)
|
||||
if prep:
|
||||
sig, include_headers, sigheaders = prep
|
||||
return self.verify_sig(sig, include_headers, sigheaders[idx], dnsfunc)
|
||||
return False # No signature
|
||||
|
||||
|
||||
#: Hold messages and options during ARC signing and verification.
|
||||
|
||||
Reference in New Issue
Block a user