[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r15296: Allow spaces to be omitted in approved-router file fingerpri (in tor/trunk: . doc src/or)
Author: nickm
Date: 2008-06-15 22:08:30 -0400 (Sun, 15 Jun 2008)
New Revision: 15296
Modified:
tor/trunk/
tor/trunk/ChangeLog
tor/trunk/doc/TODO
tor/trunk/src/or/dirserv.c
Log:
r16341@tombo: nickm | 2008-06-15 22:04:25 -0400
Allow spaces to be omitted in approved-router file fingerprints. Requested by arma.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r16341] on 49666b30-7950-49c5-bedf-9dc8f3168102
Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog 2008-06-16 01:48:02 UTC (rev 15295)
+++ tor/trunk/ChangeLog 2008-06-16 02:08:30 UTC (rev 15296)
@@ -9,6 +9,8 @@
- When building a consensus do not include routers that are down.
This will cut down 30% to 40% on consensus size. Implements
proposal 138.
+ - In directory authorities' approved-routers files, allow
+ fingerprints with or without space.
o Bugfixes:
- Asking for a conditional consensus at .../consensus/<fingerprints>
Modified: tor/trunk/doc/TODO
===================================================================
--- tor/trunk/doc/TODO 2008-06-16 01:48:02 UTC (rev 15295)
+++ tor/trunk/doc/TODO 2008-06-16 02:08:30 UTC (rev 15296)
@@ -186,13 +186,13 @@
Nick
o Send or-dev email about proposal statuses.
- - Send or-dev email about window for new proposals, once arma and
+ o Send or-dev email about window for new proposals, once arma and
nick agree.
- Finish buffer stuff in libevent; start using it in Tor.
- Tors start believing the contents of NETINFO cells.
- - Work with Steven and Roger to decide which parts of Paul's project
+ . Work with Steven and Roger to decide which parts of Paul's project
he wants to work on.
- - let approved-routers lines omit spaces in fingerprint.
+ o let approved-routers lines omit spaces in fingerprint.
Matt
- Fit Vidalia in 640x480 again.
Modified: tor/trunk/src/or/dirserv.c
===================================================================
--- tor/trunk/src/or/dirserv.c 2008-06-16 01:48:02 UTC (rev 15295)
+++ tor/trunk/src/or/dirserv.c 2008-06-16 02:08:30 UTC (rev 15296)
@@ -221,6 +221,7 @@
fingerprint_list_new = authdir_config_new();
for (list=front; list; list=list->next) {
+ char digest_tmp[DIGEST_LEN];
nickname = list->key; fingerprint = list->value;
if (strlen(nickname) > MAX_NICKNAME_LEN) {
log_notice(LD_CONFIG,
@@ -237,8 +238,10 @@
nickname);
continue;
}
- if (strlen(fingerprint) != FINGERPRINT_LEN ||
- !crypto_pk_check_fingerprint_syntax(fingerprint)) {
+ tor_strstrip(fingerprint, " "); /* remove spaces */
+ if (strlen(fingerprint) != HEX_DIGEST_LEN ||
+ base16_decode(digest_tmp, sizeof(digest_tmp),
+ fingerprint, HEX_DIGEST_LEN) < 0) {
log_notice(LD_CONFIG,
"Invalid fingerprint (nickname '%s', "
"fingerprint %s). Skipping.",