diff options
author | David Goulet <dgoulet@ev0ke.net> | 2015-03-15 10:29:02 -0400 |
---|---|---|
committer | David Goulet <dgoulet@ev0ke.net> | 2015-04-21 14:22:54 -0400 |
commit | 3ec651c0a66b2da75c047f8937245fd97f01db4e (patch) | |
tree | 02abbc668cf864e584814717191038cba052ac60 /src/or/control.c | |
parent | b100ebee4ed64e735de107023189f8c47ef0bc59 (diff) | |
download | tor-3ec651c0a66b2da75c047f8937245fd97f01db4e.tar.gz tor-3ec651c0a66b2da75c047f8937245fd97f01db4e.zip |
Control: make HSFETCH command use LongName
The "SERVER=" option now supports LongName described in the control-spec.txt
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
Diffstat (limited to 'src/or/control.c')
-rw-r--r-- | src/or/control.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/or/control.c b/src/or/control.c index 2f6ef5cd9b..5cbc6ab619 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -3304,18 +3304,10 @@ handle_control_hsfetch(control_connection_t *conn, uint32_t len, static const char *opt_server = "SERVER="; if (!strcasecmpstart(arg, opt_server)) { - char id[DIGEST_LEN] = {0}; const char *server; server = arg + strlen(opt_server); - /* Is the server's fingerprint valid?. */ - if (!string_is_hex(server) || strlen(server) != HEX_DIGEST_LEN || - base16_decode(id, sizeof(id), server, HEX_DIGEST_LEN)) { - connection_printf_to_buf(conn, "552 Invalid fingerprint \"%s\"\r\n", - server); - goto done; - } - node = node_get_by_id(id); + node = node_get_by_hex_id(server); if (!node) { connection_printf_to_buf(conn, "552 Server \"%s\" not found\r\n", server); |