Comment 3 for bug 939128

Revision history for this message
Rob Nichols (0x2jjt-rob-0tlbog) wrote : Re: validation by yahoo fails because of whitespace in h=

See related question for a little discussion. It's the folding that seems to bother yahoo, and not the space. Here's a patch of what I mean. I've asked the yahoo feedback loop for input, and will report back if/when they reply.

--- dkim/__init__.py 2012-02-22 21:56:26.000000000 -0600
+++ dkim/__init__.py 2012-02-22 21:19:23.000000000 -0600
@@ -441,7 +441,8 @@
     # record what verify should extract
     self.include_headers = tuple(include_headers)

- sig_value = fold(b"; ".join(b"=".join(x) for x in sigfields))
+ sig_value = b"; ".join(b"=".join(x) for x in sigfields)
     dkim_header = (b'DKIM-Signature', b' ' + sig_value)
     h = hashlib.sha256()
     sig = dict(sigfields)