diff options
author | Robert Ransom <rransom.8774@gmail.com> | 2010-10-03 22:38:53 -0700 |
---|---|---|
committer | Robert Ransom <rransom.8774@gmail.com> | 2010-10-04 21:51:53 -0700 |
commit | a2bb0bfdd5731ef3cebf6e14fa7bebb98d5f2d8f (patch) | |
tree | 79ff1358306000c378f020da4bdb3a0483e38bb1 /src/or/dirserv.c | |
parent | 17efbe031d4b96d872b2e0bdf3785b232f49bf44 (diff) | |
download | tor-a2bb0bfdd5731ef3cebf6e14fa7bebb98d5f2d8f.tar.gz tor-a2bb0bfdd5731ef3cebf6e14fa7bebb98d5f2d8f.zip |
Maintain separate server and client identity keys when appropriate.
Fixes a bug described in ticket #988.
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 8ae03424a2..d436b6e597 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -1552,7 +1552,8 @@ dirserv_regenerate_directory(void) { char *new_directory=NULL; - if (dirserv_dump_directory_to_string(&new_directory, get_identity_key())) { + if (dirserv_dump_directory_to_string(&new_directory, + get_server_identity_key())) { log_warn(LD_BUG, "Error creating directory."); tor_free(new_directory); return NULL; @@ -1582,7 +1583,7 @@ generate_runningrouters(void) char digest[DIGEST_LEN]; char published[ISO_TIME_LEN+1]; size_t len; - crypto_pk_env_t *private_key = get_identity_key(); + crypto_pk_env_t *private_key = get_server_identity_key(); char *identity_pkey; /* Identity key, DER64-encoded. */ size_t identity_pkey_len; @@ -2710,7 +2711,7 @@ generate_v2_networkstatus_opinion(void) smartlist_t *routers = NULL; digestmap_t *omit_as_sybil = NULL; - private_key = get_identity_key(); + private_key = get_server_identity_key(); if (resolve_my_address(LOG_WARN, options, &addr, &hostname)<0) { log_warn(LD_NET, "Couldn't resolve my hostname"); |