diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-07-14 17:22:23 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-07-14 17:22:23 -0400 |
commit | 852b1312812bd0174353271c5a2d42ed08c6b8a2 (patch) | |
tree | 2677b00a1030d9b907870f5bebfe31665433e156 /src/or/control.c | |
parent | 642cff5bcad9288aa32f27ea5309019538580438 (diff) | |
parent | 866a2828bdcb88398ee8332e918e9a9028397156 (diff) | |
download | tor-852b1312812bd0174353271c5a2d42ed08c6b8a2.tar.gz tor-852b1312812bd0174353271c5a2d42ed08c6b8a2.zip |
Merge remote-tracking branch 'origin/maint-0.2.2'
Conflicts:
src/or/control.c
Diffstat (limited to 'src/or/control.c')
-rw-r--r-- | src/or/control.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/or/control.c b/src/or/control.c index fa0c6cf4e0..ad11350fbd 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -1459,14 +1459,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")) { - const 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; } |