diff options
author | Roger Dingledine <arma@torproject.org> | 2007-11-29 15:25:04 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2007-11-29 15:25:04 +0000 |
commit | aaf35cccf7ac60c17dac687127ec82c612232836 (patch) | |
tree | c382f9c21bb2812178fe1eb85147432c65e73b0c /src/or/rendclient.c | |
parent | 0f22c584cdc797e20f4aef74e5312ebda76d05fa (diff) | |
download | tor-aaf35cccf7ac60c17dac687127ec82c612232836.tar.gz tor-aaf35cccf7ac60c17dac687127ec82c612232836.zip |
karsten's second refactoring patch
svn:r12607
Diffstat (limited to 'src/or/rendclient.c')
-rw-r--r-- | src/or/rendclient.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/or/rendclient.c b/src/or/rendclient.c index b0fe325a92..e613230145 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -87,6 +87,10 @@ rend_client_send_introduction(origin_circuit_t *introcirc, introcirc->build_state->chosen_exit->identity_digest, DIGEST_LEN); intro_key = strmap_get(entry->parsed->intro_keys, hex_digest); + if (!intro_key) { + log_warn(LD_BUG, "Internal error: could not find intro key."); + goto err; + } } if (crypto_pk_get_digest(intro_key, payload)<0) { log_warn(LD_BUG, "Internal error: couldn't hash public key."); @@ -279,9 +283,9 @@ rend_client_refetch_renddesc(const char *query) } } -/** If we are not currently fetching a rendezvous service descriptor for the - * base32-encoded service ID <b>query</b>, start a connection to a hidden - * service directory to fetch a new one. +/** Start a connection to a hidden service directory to fetch a v2 + * rendezvous service descriptor for the base32-encoded service ID + * <b>query</b>. */ void rend_client_refetch_v2_renddesc(const char *query) @@ -289,7 +293,7 @@ rend_client_refetch_v2_renddesc(const char *query) char descriptor_id[DIGEST_LEN]; int replica; tor_assert(query); - tor_assert(strlen(query) == REND_SERVICE_ID_LEN); + tor_assert(strlen(query) == REND_SERVICE_ID_LEN_BASE32); /* Are we configured to fetch descriptors? */ if (!get_options()->FetchHidServDescriptors) { log_warn(LD_REND, "We received an onion address for a v2 rendezvous " |