ietf-dkim
[Top] [All Lists]

Re: [ietf-dkim] Seeking Clarification of the l= Tag

2013-08-04 18:49:31
On Sun, Aug 4, 2013 at 1:35 PM, Pawel Lesnikowski
<lesnikowski(_at_)limilabs(_dot_)com>wrote:

There are few details I'd like to clarify.

Body hash for this message is correctly computed by the sender.
Entire signature of this message in fact valid - this is why Port25,
Gmail, and Mail.dll validate DKIM signature with 'pass' result.

The only problem is the value of l= parameter of DKIM-Signature header
(l=2).
The value is greater than total number of bytes after body
canonicalization (0 bytes).
This is easy to spot and all parsers simply ignore incorrect l= value.
Hash is computed for entire canonicalized body (of length 0).

Now the question is should the validation fail or pass in such case?


It's an error.  The RFC says this pretty clearly:

      This value MUST NOT be
      larger than the actual number of octets in the canonicalized
      message body.


You're probably right that most (if not all) parsers simply interpret "l=2"
as "don't feed more than 2 bytes to the hash", but the fewer case gets
silently ignored.  They are wrong.

I'll make sure OpenDKIM has this right and fix it in the next release if
not.

-MSK
_______________________________________________
NOTE WELL: This list operates according to 
http://mipassoc.org/dkim/ietf-list-rules.html
<Prev in Thread] Current Thread [Next in Thread>