aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-07-14 17:20:01 -0400
committerNick Mathewson <nickm@torproject.org>2011-07-14 17:20:01 -0400
commit866a2828bdcb88398ee8332e918e9a9028397156 (patch)
tree7183215fc2e42a643a0e562c111cc0c000e40399 /src/or
parent5580fbb0c481a1f52fcef9e5b65966d5a91446d9 (diff)
parent2e34416c6db20156619e80975e46c8b1030bb3a1 (diff)
downloadtor-866a2828bdcb88398ee8332e918e9a9028397156.tar
tor-866a2828bdcb88398ee8332e918e9a9028397156.tar.gz
Merge branch 'bug3577' into maint-0.2.2
Diffstat (limited to 'src/or')
-rw-r--r--src/or/control.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/or/control.c b/src/or/control.c
index da0a95da1..954da6514 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -1394,14 +1394,14 @@ getinfo_helper_misc(control_connection_t *conn, const char *question,
} else if (!strcmp(question, "dir-usage")) {
*answer = directory_dump_request_log();
} else if (!strcmp(question, "fingerprint")) {
- routerinfo_t *me = router_get_my_routerinfo();
- if (!me) {
- *errmsg = "No routerdesc known; am I really a server?";
+ crypto_pk_env_t *server_key;
+ if (!server_mode(get_options())) {
+ *errmsg = "Not running in server mode";
return -1;
}
+ server_key = get_server_identity_key();
*answer = tor_malloc(HEX_DIGEST_LEN+1);
- base16_encode(*answer, HEX_DIGEST_LEN+1, me->cache_info.identity_digest,
- DIGEST_LEN);
+ crypto_pk_get_fingerprint(server_key, *answer, 0);
}
return 0;
}