ietf-822
[Top] [All Lists]

Re: ABNF experts sought for OpenPGP header definition

2005-05-23 09:16:57

In <ilud5rly9el(_dot_)fsf(_at_)latte(_dot_)josefsson(_dot_)org> Simon Josefsson 
<jas(_at_)extundo(_dot_)com> writes:

Dear all,

We would like help with improving the ABNF for our OpenPGP mail/news
header.  The document and some more info is available from
<http://josefsson.org/openpgp-header/>.  FYI, version -01 was just
submitted.

The ABNF section currently reads:


  openpgp   :=  "OpenPGP:" id-or-url /
                           (openpgp-parameter *(";" openpgp-parameter))
                           CRLF

  id-or-url := id / url

  openpgp-parameter
             := ("id" "=" id) /
                ("url" "=" url) /
                parameter   ; See RFC 2045 for definition of parameter.

This is rather incomplete; for one it doesn't include CFWS at the
necessary spots.  Further, it doesn't permit quoting, such as:


You have esentially two problems:

A. To establish exactly what the syntax of parameter is.

B. To specify the syntax of openpgp-parameter or whatever.

Regarding A, the syntax of parameter actually now comes from RFC 2231, and
it is not the world's clearest piece of syntax (moreover, it has a bug
documented in the RFC errata). But it is still based on RFC 822 rather
than RFC 2822, and so inherits the RFC 822 folding/comments rules.

So you need to do some handwaving to explain this. Alternatively, you
could recast the whole syntax in RFC 2822 style, but if you do that make
it in the form of an explanation "for convenience" and not normative. The
overall result should be that [CFWS] is allowed at either end, plus on
either side of the '='.

Regarding B, you have two choices:

B1. Give the syntax as you have shown, and then write some more textual
handwaving to explain that it is really more complicated than it looks.

B2. Write the syntax in the following form:

openpgp-parameter = id-param / url-param ; etc. etc.
id-param  = <a <parameter> with attribute "id" and some <id> as its value>
url-param = <a <parameter> with attribute "url" and some <url> as its value>
id        = .....
url       = .....

That makes use of <parameter> as already defined by your handwaving under
A. Maybe the nested '<...>' is not such a good idea, and might be avoided.

And finally, out of kindness to your reader, a NOTE explaining that this
makes quoting available, and even necessary in some cases.

And may I support Frank's suggestion that you should include [FWS] at
suitable places within your syntax for <url>, so that is can be folded
without the necessity of invoking the gibbous multiline conventions from
RFC 2231 (which you should probably then deprecate). That practice is
indeed recommended in RFC 3986 (STD 66), which also recommends enclosing
the complete urls within "<...>".

And, to be very pedantic, it should be <uri> rather than <url>.

-- 
Charles H. Lindsey ---------At Home, doing my own thing------------------------
Tel: +44 161 436 6131 Fax: +44 161 436 6133   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


<Prev in Thread] Current Thread [Next in Thread>