ietf-dkim
[Top] [All Lists]

Re: [Fwd: Re: [ietf-dkim] canonicalized null body and dkim]

2006-12-21 04:24:03
On Wed, 20 Dec 2006 14:29:24 -0000, Michael Thomas <mike(_at_)mtcc(_dot_)com> 
wrote:


There is a perfectly good reason: some things in the mail path strip trailing CRLF from the body. We've experienced it firsthand and it's not uncommon, and would reduce the survival
rate if changed.

But nobody is proposing any such thing. What stripping are you talking about? If it is stripping a CRLF from an otherwise non-empty last line, then ALL the rules under discussion require you to put it back, so that what you are being asked to hash always has a CRLF at the end of any last line that actually has real text in it. But if there is no real text anywhere, then you canonicalize into an empty file.

So you start with

------------------
Last-Header: foobarCRLF
CRLF
barbazCRLF
CRLF
------------------

and some stupid system en route strips it down to

Last-Header: foobarCRLF
CRLF
barbaz

so in that case you put back the CRLF, and what you hash is:

------------------
barbazCRLF
------------------

And that is also what you would have hashed if it arrived exactly as originally sent, or even if a few more CRLF-only lines had been picked up somewhere.

BUT, if you started with

------------------
Last-Header: foobarCRLF
CRLF
------------------

or with

------------------
Last-Header: foobarCRLF
------------------

Then certinaly nothing will be stripped en route (there is nothing to strip), but some CRLF-only lines might get added, but nevertheless what you hash is still the empty file

------------------
------------------

And, in all those cases, the wording I suggested gives exactly that.

--
Charles H. Lindsey ---------At Home, doing my own thing------------------------
Tel: +44 161 436 6131     Web: http://www.cs.man.ac.uk/~chl
Email: chl(_at_)clerew(_dot_)man(_dot_)ac(_dot_)uk      Snail: 5 Clerewood Ave, CHEADLE, SK8 3JU, U.K.
PGP: 2C15F1A9      Fingerprint: 73 6D C2 51 93 A0 01 E7 65 E8 64 7E 14 A4 AB A5
_______________________________________________
NOTE WELL: This list operates according to http://mipassoc.org/dkim/ietf-list-rules.html