Deciding to skip adding those two bytes for the case of N < X-2 is
purely an optimization.* Your implementation is free to make any
optimization that it chooses to do, as long as the result is
indistinguishable from calculating it in the unoptimized way.
I think that where Eric placed these words make it clear that adding the
CRLF is done during the canonicalization phase, and that the l=
truncation is performed off of the canonicalized text.
I'm happy with this last addition, and I think it polishes off the
issue. "Ship it, Dano." (And now I'm off to change my implementation to
match. :-) )
Tony Hansen
[EMAIL PROTECTED]
* where N and X come from l=N and X=length(canonicalized(body))
Hector Santos wrote:
> Eric Allman wrote:
>
>> I've changed the text to read "If there is no body or no trailing CRLF
>> on the message body, a CRLF is added" in order to avoid any confusion.
>
> Eric, this is good. I will comment that the only confusion is there is
> an indirect implication that the final two bytes of the FEED must have a
> <CRLF>.
>
> Which is not true, right?
>
> Because a) A signer can canonicalized the message, including adding a
> <CRLF> if necessary, that yields size X, but B) the signer decides to
> hash only L=N bytes where N < X bytes.
>
> That was the only "scratch head" thought I had about all this - The
> reason to add a <CRLF> if a signer was not going to hash the entire body.
>
> So I guess, if anything, a statement, sentence or comment that states
> "the need to add a <CRLF> is only necessary if the entire body is going
> to be hashed."
_______________________________________________
NOTE WELL: This list operates according to
http://mipassoc.org/dkim/ietf-list-rules.html