summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 da0a95da15..954da65143 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;
}