diff options
author | Roger Dingledine <arma@torproject.org> | 2004-04-03 01:59:53 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-04-03 01:59:53 +0000 |
commit | 8c19d6e3d7944f267ac420ed42731c10e632e7d1 (patch) | |
tree | 59240eddc57411bc78f6813fe40902d57b387405 /src/or/rendcommon.c | |
parent | 15036380a8477db073eb1b865cddd6e923857285 (diff) | |
download | tor-8c19d6e3d7944f267ac420ed42731c10e632e7d1.tar.gz tor-8c19d6e3d7944f267ac420ed42731c10e632e7d1.zip |
alice can intercept y.onion requests, do a lookup on them via tor,
and receive a 404
svn:r1455
Diffstat (limited to 'src/or/rendcommon.c')
-rw-r--r-- | src/or/rendcommon.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c index 0a10f022f3..f80abf48eb 100644 --- a/src/or/rendcommon.c +++ b/src/or/rendcommon.c @@ -121,10 +121,6 @@ int rend_get_service_id(crypto_pk_env_t *pk, char *out) return 0; } -int rend_cmp_service_ids(char *one, char *two) { - return strcasecmp(one,two); -} - /* ==== Rendezvous service descriptor cache. */ #define REND_CACHE_MAX_AGE 24*60*60 #define REND_CACHE_MAX_SKEW 60*60 @@ -251,34 +247,6 @@ int rend_cache_store(char *desc, int desc_len) return 0; } -/* ==== General utility functions for rendezvous. */ - -/* If address is of the form "y.onion" with a well-formed handle y, - * then put a '\0' after y, lower-case it, and return 0. - * Else return -1 and change nothing. - */ -int rend_parse_rendezvous_address(char *address) { - char *s; - char query[REND_SERVICE_ID_LEN+1]; - - s = strchr(address,'.'); - if(!s) return -1; /* no dot */ - if(strcasecmp(s+1,"onion")) return -1; /* not .onion */ - - *s = 0; /* null terminate it */ - if(strlcpy(query, address, REND_SERVICE_ID_LEN+1) >= REND_SERVICE_ID_LEN+1) - goto failed; - tor_strlower(query); - if(rend_valid_service_id(query)) { - tor_strlower(address); - return 0; /* success */ - } -failed: - /* otherwise, return to previous state and return -1 */ - *s = '.'; - return -1; -} - /* Local Variables: mode:c |