summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-12-23 15:47:15 +0000
committerNick Mathewson <nickm@torproject.org>2005-12-23 15:47:15 +0000
commit4417017197b3523ead180728b3a91638bf17863f (patch)
tree956f8c2c1fd962b5ce18730a82f87c31a8974c8e /doc
parent9afeacac3b8742c75e36a8b68a9f93ac8c292c07 (diff)
downloadtor-4417017197b3523ead180728b3a91638bf17863f.tar.gz
tor-4417017197b3523ead180728b3a91638bf17863f.zip
Comments from cat: "space" should include or exclude tabs. We include tabs, so specify that.
svn:r5635
Diffstat (limited to 'doc')
-rw-r--r--doc/dir-spec.txt12
-rw-r--r--doc/tor-spec.txt17
2 files changed, 17 insertions, 12 deletions
diff --git a/doc/dir-spec.txt b/doc/dir-spec.txt
index 65b2ddb878..999b53b90d 100644
--- a/doc/dir-spec.txt
+++ b/doc/dir-spec.txt
@@ -117,12 +117,15 @@ $Id$
for clarity between sections; these blank lines are ignored.
Implementations MUST NOT depend on blank lines in any particular location.
+ As used here, "whitespace" is a sequence of 1 or more tab or space
+ characters.
+
The preamble contains:
"network-status-version" -- A document format version. For this
specification, the version is "2".
"dir-source" -- The authority's hostname, current IP address, and
- directory port, all separated by spaces.
+ directory port, all separated by whitespace.
"fingerprint" -- A base16-encoded hash of the signing key's
fingerprint, with no additional spaces added.
"contact" -- An arbitrary string describing how to contact the
@@ -134,7 +137,7 @@ $Id$
"server-versions" -- A comma-separated list of recommended server
versions.
"published" -- The publication time for this network-status object.
- "dir-options" -- A set of flags separated by spaces:
+ "dir-options" -- A set of flags, in any order, separated by whitespace:
"Names" if this directory authority performs name bindings.
"Versions" if this directory authority recommends software versions.
@@ -148,7 +151,8 @@ $Id$
For each router, the router entry contains: (This format is designed for
conciseness.)
- "r" -- followed by the following elements, separated by spaces:
+ "r" -- followed by the following elements, in order, separated by
+ whitespace:
- The OR's nickname,
- A hash of its identity key, encoded in base64, with trailing =
signs removed.
@@ -160,7 +164,7 @@ $Id$
- An IP address
- An OR port
- A directory port (or "0" for none")
- "s" -- A series of space-separated status flags:
+ "s" -- A series of whitespace-separated status flags, in any order:
"Authority" if the router is a directory authority.
"Exit" if the router is useful for building general-purpose exit
circuits.
diff --git a/doc/tor-spec.txt b/doc/tor-spec.txt
index 4bb12a7121..997f236659 100644
--- a/doc/tor-spec.txt
+++ b/doc/tor-spec.txt
@@ -675,7 +675,7 @@ extensible information format.
The highest level object is a Document, which consists of one or more Items.
Every Item begins with a KeywordLine, followed by one or more Objects. A
-KeywordLine begins with a Keyword, optionally followed by a space and more
+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-]. An Object is a block of
encoded data in pseudo-Open-PGP-style armor. (cf. RFC 2440)
@@ -684,10 +684,11 @@ More formally:
Document ::= (Item | NL)+
Item ::= KeywordLine Object*
- KeywordLine ::= Keyword NL | Keyword SP ArgumentsChar+ NL
+ KeywordLine ::= Keyword NL | Keyword WS ArgumentsChar+ NL
Keyword = KeywordChar+
KeywordChar ::= 'A' ... 'Z' | 'a' ... 'z' | '0' ... '9' | '-'
ArgumentChar ::= any printing ASCII character except NL.
+ WS = (SP | TAB)+
Object ::= BeginLine Base-64-encoded-data EndLine
BeginLine ::= "-----BEGIN " Keyword "-----" NL
EndLine ::= "-----END " Keyword "-----" NL
@@ -748,7 +749,7 @@ The items' formats are as follows:
"fingerprint"
A fingerprint (20 byte SHA1 hash of asn1 encoded public key, encoded
- in hex, with spaces after every 4 characters) for this router's
+ in hex, with a single space after every 4 characters) for this router's
identity key.
[We didn't start parsing this line until Tor 0.1.0.6-rc; it should
@@ -798,9 +799,9 @@ The items' formats are as follows:
"family" names NL
- 'Names' is a space-separated list of server nicknames. If two ORs
- list one another in their "family" entries, then OPs should treat
- them as a single OR for the purpose of path selection.
+ 'Names' is a whitespace-separated list of server nicknames. If two ORs
+ list one another in their "family" entries, then OPs should treat them
+ as a single OR for the purpose of path selection.
For example, if node A's descriptor contains "family B", and node B's
descriptor contains "family A", then node A and node B should never
@@ -859,7 +860,7 @@ descriptors, and a single "directory-signature" item.
A list of which versions of which implementations are currently
believed to be secure and compatible with the network.
- "running-routers" space-separated-list
+ "running-routers" whitespace-separated-list
A description of which routers are currently believed to be up or
down. Every entry consists of an optional "!", followed by either an
@@ -873,7 +874,7 @@ descriptors, and a single "directory-signature" item.
backward compatibility. New code should parse 'router-status'
instead.]
- "router-status" space-separated-list
+ "router-status" whitespace-separated-list
A description of which routers are currently believed to be up or
down, and which are verified or unverified. Contains one entry for