diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-10-19 18:19:59 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-10-19 18:19:59 +0000 |
commit | e5049d5aa32574ad6f5a1a73151e80b0db606237 (patch) | |
tree | 4244a3d0f28bd2b4e2d07bb745df5f08a5cd8544 /src/or/router.c | |
parent | 62094ebd32c61421a24982c88b767826cdae75db (diff) | |
download | tor-e5049d5aa32574ad6f5a1a73151e80b0db606237.tar.gz tor-e5049d5aa32574ad6f5a1a73151e80b0db606237.zip |
Remove routerinfo_t->is_trusted_dir, and all the twisted machinery used to
maintain it.
Have clients default to the nickname "client" in their certificates.
Give a less frightening warning on obsolete (pre-0.0.8) routerinfo_t's.
svn:r2568
Diffstat (limited to 'src/or/router.c')
-rw-r--r-- | src/or/router.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/router.c b/src/or/router.c index cb1f5b3169..3475882cc8 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -242,8 +242,10 @@ int init_keys(void) { if (crypto_pk_generate_key(prkey)) return -1; set_identity_key(prkey); -/* XXX NM: do we have a convention for what client's Nickname is? */ - if (tor_tls_context_new(get_identity_key(), 1, options.Nickname, + /* XXX NM: do we have a convention for what client's Nickname is? + * No. Let me propose one: */ + if (tor_tls_context_new(get_identity_key(), 1, + options.Nickname ? options.Nickname : "client", MAX_SSL_KEY_LIFETIME) < 0) { log_fn(LOG_ERR, "Error creating TLS context for OP."); return -1; @@ -398,7 +400,7 @@ void router_retry_connections(void) { } int router_is_clique_mode(routerinfo_t *router) { - if(router->is_trusted_dir) + if(router_digest_is_trusted_dir(router->identity_digest)) return 1; return 0; } @@ -541,7 +543,6 @@ int router_rebuild_descriptor(void) { ri->bandwidthburst = options.BandwidthBurst; ri->bandwidthcapacity = router_get_bandwidth_capacity(); router_add_exit_policy_from_config(ri); - ri->is_trusted_dir = authdir_mode(); if(desc_routerinfo) /* inherit values */ ri->is_verified = desc_routerinfo->is_verified; if (options.MyFamily) { |