From b5ab5cd4a9a90324727c961e53e39d703d7ac4c9 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 17 Sep 2020 10:45:10 -0400 Subject: dir-spec: Correct description for keyword, beginline, endline. A keyword may not begin with '-'. Otherwise, "-----BEGIN" would be a keyword, and the grammar would be ambiguous. A beginline or endline may have multiple words in its tag. --- dir-spec.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'dir-spec.txt') diff --git a/dir-spec.txt b/dir-spec.txt index 7ae5acd..2314974 100644 --- a/dir-spec.txt +++ b/dir-spec.txt @@ -200,7 +200,8 @@ Items. Every Item begins with a KeywordLine, followed by zero or more Objects. A KeywordLine begins with a Keyword, optionally followed by whitespace and more non-newline characters, and ends with a newline. A - Keyword is a sequence of one or more characters in the set [A-Za-z0-9-]. + Keyword is a sequence of one or more characters in the set [A-Za-z0-9-], + but may not start with -. An Object is a block of encoded data in pseudo-Privacy-Enhanced-Mail (PEM) style format: that is, lines of encoded data MAY be wrapped by inserting an ascii linefeed ("LF", also called newline, or "NL" here) character @@ -214,13 +215,14 @@ Document ::= (Item | NL)+ Item ::= KeywordLine Object* KeywordLine ::= Keyword NL | Keyword WS ArgumentChar+ NL - Keyword = KeywordChar+ - KeywordChar ::= 'A' ... 'Z' | 'a' ... 'z' | '0' ... '9' | '-' + Keyword = KeywordStart KeywordChar* + KeywordStart ::= 'A' ... 'Z' | 'a' ... 'z' | '0' ... '9' + KeywordChar ::= KeywordStart | '-' ArgumentChar ::= any printing ASCII character except NL. WS = (SP | TAB)+ Object ::= BeginLine Base64-encoded-data EndLine - BeginLine ::= "-----BEGIN " Keyword "-----" NL - EndLine ::= "-----END " Keyword "-----" NL + BeginLine ::= "-----BEGIN " Keyword (" " Keyword)* "-----" NL + EndLine ::= "-----END " Keyword (" " Keyword)* "-----" NL A Keyword may not be "-----BEGIN". -- cgit v1.2.3-54-g00ecf