Subject: [ietf-dkim] Base-04 // ABNF cruft & errors

From: Douglas Otis <[email-masked]>
Date: Fri, 21 Jul 2006 12:21:31 -0700

2.3  White Space

ALPHA, DIGIT, SP, CRLF, HTAB, WSP are defined in RFC4234.

There is no reason to reference the WSP definition in RFC2822.

The RFC2822 FWS ABNF definition carries some cruft.

obs-FWS         =       1*WSP *(CRLF 1*WSP)	; obsolete RFC822 text
FWS             =       ([*WSP CRLF] 1*WSP) / obs-FWS

Is there a reason to permit multiple CRLFs? To obsolete support, the  
definition should be removed after 5 years of being declared obsolete.

FWS should be redefined as Revised FWS such as:

R-FWS		=	([*WSP CRLF] 1*WSP)	; revised

3.4.6  Canonicalization Examples (INFORMATIVE)

This uses an undefined value TAB.  HTAB for horizontal as opposed to  
vertical tab is defined in RFC4234.
substitute TAB with HTAB for the value to be defined in the ABNF  
reference.

After all the concern about isolated CR and LF, this definition  
stands out as being wrong.

SWSP =   CR / LF / WSP   ; streaming white space

Define as:

SWSP	= 	WSP / CRLF

Also previously noted, the ABNF for sub-domain referenced from  
RFC2821 is insufficient.  This definition does not limit the length  
of the label.

hyphen = %x2D ; "-"
ldh = ALPHA | DIGIT | hyphen
let-dig = ALPHA | DIGIT
sub-domain =  let-dig [*61(ldh) let-dig]

The definition found in STD13 excludes an email-address such as  
[email-masked] based upon the recommended ABNF for a label.  The  
best solution is to repair the ABNF for sub-domain.

-Doug

_______________________________________________
NOTE WELL: This list operates according to 
http://mipassoc.org/dkim/ietf-list-rules.html

---

From: Barry Leiba <[email-masked]>
Date: Sat, 22 Jul 2006 11:21:25 -0400

All of these in Doug's latest note seem like reasonable changes.  Only 

> R-FWS        =    ([*WSP CRLF] 1*WSP)    ; revised

I'd rather leave the FWS definition in RFC2822, rather than putting in 
our own.  Is there a way to say something that means "FWS from RFC2822, 
but NOT obs-FWS"?

Barry

--
Barry Leiba, Internet Messaging Technology  ([email-masked])
http://www.research.ibm.com/people/l/leiba
http://www.research.ibm.com/spam

---

From: Tony Hansen <[email-masked]>
Date: Sat, 22 Jul 2006 13:43:05 -0400

> our own.  Is there a way to say something that means "FWS from RFC2822,

No, you either get all or none.

I personally have no problem with pulling in the full definition of FWS
from 2822. As long as there are 822 producers out there, we should be
able to accept their headers.

	Tony Hansen
	[email-masked]

---

From: Douglas Otis <[email-masked]>
Date: Sat, 22 Jul 2006 20:26:09 -0700

> able to accept their headers.

This definition will not affect the handling of other headers.  This
definition is limited to the creation and parsing of headers associated
with DKIM.

Oddly, FWS also affects the parsing of the key as well, as the general
template was used to define the key.  Simpler seems like the better
choice.  There does not seem to be a valid reason to permit the use of
the obs-FWS definition. 

-Doug