backport r11499, r11500, r11501: hidserv hexdigests rather than nicknames

svn:r11922
This commit is contained in:
Roger Dingledine
2007-10-14 07:51:39 +00:00
parent 8b35202b47
commit 8bf32223d7
4 changed files with 13 additions and 5 deletions
+1 -1
View File
@@ -146,7 +146,7 @@ rend_parse_service_descriptor(const char *str, size_t len)
result->protocols = ntohs(get_uint16(cp));
cp += 2;
} else {
result->protocols = 1;
result->protocols = 1<<2; /* always use intro format 2 */
}
if (end-cp < 2) goto truncated;
result->n_intro_points = ntohs(get_uint16(cp));
+4 -3
View File
@@ -303,16 +303,17 @@ rend_service_update_descriptor(rend_service_t *service)
d->intro_point_extend_info = tor_malloc_zero(sizeof(extend_info_t*)*n);
d->protocols = (1<<2) | (1<<0); /* We support protocol 2 and protocol 0. */
for (i=0; i < n; ++i) {
router = router_get_by_nickname(smartlist_get(service->intro_nodes, i),1);
const char *name = smartlist_get(service->intro_nodes, i);
router = router_get_by_nickname(name, 1);
if (!router) {
log_info(LD_REND,"Router '%s' not found for intro point %d. Skipping.",
safe_str((char*)smartlist_get(service->intro_nodes, i)), i);
safe_str(name), i);
continue;
}
circ = find_intro_circuit(router, service->pk_digest);
if (circ && circ->_base.purpose == CIRCUIT_PURPOSE_S_INTRO) {
/* We have an entirely established intro circuit. */
d->intro_points[d->n_intro_points] = tor_strdup(router->nickname);
d->intro_points[d->n_intro_points] = tor_strdup(name);
d->intro_point_extend_info[d->n_intro_points] =
extend_info_from_router(router);
d->n_intro_points++;