From da26a7a197be71952e4f1ef956a7b0ec1baa88b0 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Wed, 4 Aug 2004 01:17:21 +0000 Subject: [PATCH] log a warning if you're running an unverified server, to let you know you might want to get it verified also, moved that whole block below the check-signature logic, so we don't execute it if the directory is a fake. (the recommended-versions logic is still executed before the signature is checked; we should fix that.) svn:r2131 --- src/or/routerparse.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/or/routerparse.c b/src/or/routerparse.c index b0bca530af..60dc8683e9 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -390,14 +390,6 @@ router_parse_routerlist_from_directory(const char *str, } tok->n_args = 0; /* Don't free the strings in good_nickname_lst yet. */ - /* Determine if my routerinfo is considered verified. */ - { - routerinfo_t *me = router_get_my_routerinfo(); - if(me) - router_update_status_from_smartlist(me, published_on, - good_nickname_list); - } - /* Read the router list from s, advancing s up past the end of the last * router. */ str = end; @@ -427,6 +419,21 @@ router_parse_routerlist_from_directory(const char *str, goto err; } + /* Determine if my routerinfo is considered verified. */ + { + static int have_warned_about_unverified_status = 0; + routerinfo_t *me = router_get_my_routerinfo(); + if(me) { + router_update_status_from_smartlist(me, published_on, + good_nickname_list); + if(me->is_verified == 0 && !have_warned_about_unverified_status) { + log_fn(LOG_WARN,"Dirserver %s lists your server as unverified. Please consider sending your identity fingerprint to the tor-ops.", ""); + /* XXX008 can we print the name of the dirserver above? how to get it */ + have_warned_about_unverified_status = 1; + } + } + } + if (*dest) routerlist_free(*dest); *dest = new_dir;