diff options
author | Christopher Baines <cb15g11@soton.ac.uk> | 2014-02-16 16:54:44 +0000 |
---|---|---|
committer | Christopher Baines <cb15g11@soton.ac.uk> | 2014-02-16 16:55:11 +0000 |
commit | 70935a8378cb31cc9eb8578477aa4fcf2a13e393 (patch) | |
tree | 0f4e8d4ce32528ad3f632ab223cbbaabeb13353d | |
parent | 444c589c6e0591e7b4febafb2bc5bee82e0d97db (diff) | |
download | tor-70935a8378cb31cc9eb8578477aa4fcf2a13e393.tar tor-70935a8378cb31cc9eb8578477aa4fcf2a13e393.tar.gz |
Key hacks
-rw-r--r-- | src/or/rendcommon.c | 8 | ||||
-rw-r--r-- | src/or/rendservice.c | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c index a664b5d50..9bf5533a8 100644 --- a/src/or/rendcommon.c +++ b/src/or/rendcommon.c @@ -198,8 +198,8 @@ rend_encode_v2_intro_points(char **encoded, rend_service_descriptor_t *desc) log_warn(LD_REND, "Could not write onion key."); goto done; } - /* Encode intro key. */ - intro_key = intro->intro_key; + /* Encode the service key, rather than the intro key. */ + intro_key = desc->pk; if (!intro_key || crypto_pk_write_public_key_to_string(intro_key, &service_key, &service_key_len) < 0) { @@ -207,6 +207,10 @@ rend_encode_v2_intro_points(char **encoded, rend_service_descriptor_t *desc) tor_free(onion_key); goto done; } + log_info(LD_REND, "Got service key:\n%s for introduction point %s", + safe_str_client(service_key), + safe_str_client(intro->extend_info->nickname)); + /* Assemble everything for this introduction point. */ address = tor_dup_addr(&info->addr); res = tor_snprintf(unenc + unenc_written, unenc_len - unenc_written, diff --git a/src/or/rendservice.c b/src/or/rendservice.c index 2374aec00..0de3189a8 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -1170,7 +1170,7 @@ rend_service_introduce(origin_circuit_t *circuit, const uint8_t *request, escaped(serviceid), (unsigned)circuit->base_.n_circ_id); /* use intro key instead of service key. */ - intro_key = circuit->intro_key; + intro_key = service->private_key; tor_free(err_msg); stage_descr = NULL; @@ -2448,8 +2448,8 @@ rend_service_intro_has_opened(origin_circuit_t *circuit) "Established circuit %u as introduction point for service %s", (unsigned)circuit->base_.n_circ_id, serviceid); - /* Use the intro key instead of the service key in ESTABLISH_INTRO. */ - intro_key = circuit->intro_key; + /* Use the service key in ESTABLISH_INTRO. */ + intro_key = service->private_key; /* Build the payload for a RELAY_ESTABLISH_INTRO cell. */ r = crypto_pk_asn1_encode(intro_key, buf+2, RELAY_PAYLOAD_SIZE-2); |