aboutsummaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-01-27 16:31:48 -0500
committerNick Mathewson <nickm@torproject.org>2015-01-27 16:31:48 -0500
commit1e61b45251bd2895e0448fcf283e4f7e05355f28 (patch)
tree33ea82d91d659876d2750535b52fc46a041c39b1 /src/or/dirserv.c
parentddfdeb5659be17b3e7a4c34b749207bdeae5124a (diff)
downloadtor-1e61b45251bd2895e0448fcf283e4f7e05355f28.tar.gz
tor-1e61b45251bd2895e0448fcf283e4f7e05355f28.zip
Fixes on prop227 comments, based on comments by mcs on #10395
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index dbdfff1440..4a6c50616c 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -3258,7 +3258,26 @@ connection_dirserv_flushed_some(dir_connection_t *conn)
}
}
-/** Return true iff <b>line</b> is a valid recommened_packages line.
+/** Return true iff <b>line</b> is a valid RecommenedPackages line.
+ */
+/*
+ The grammar is:
+
+ "package" SP PACKAGENAME SP VERSION SP URL SP DIGESTS NL
+
+ PACKAGENAME = NONSPACE
+ VERSION = NONSPACE
+ URL = NONSPACE
+ DIGESTS = DIGEST | DIGESTS SP DIGEST
+ DIGEST = DIGESTTYPE "=" DIGESTVAL
+
+ NONSPACE = one or more non-space printing characters
+
+ DIGESTVAL = any number of non-=, non-" " characters.
+
+ SP = " "
+ NL = a newline
+
*/
int
validate_recommended_package_line(const char *line)