diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-09-17 10:45:10 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-09-17 10:45:10 -0400 |
commit | b5ab5cd4a9a90324727c961e53e39d703d7ac4c9 (patch) | |
tree | 262a72146e2339c20f8375c4feb8f3edd60f38ed /dir-spec.txt | |
parent | 121ccea1b8bc7fac20ff68af22cb2270550839cc (diff) | |
download | torspec-b5ab5cd4a9a90324727c961e53e39d703d7ac4c9.tar.gz torspec-b5ab5cd4a9a90324727c961e53e39d703d7ac4c9.zip |
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.
Diffstat (limited to 'dir-spec.txt')
-rw-r--r-- | dir-spec.txt | 12 |
1 files changed, 7 insertions, 5 deletions
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". |