diff options
author | David Goulet <dgoulet@torproject.org> | 2018-07-12 09:21:52 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-08-28 16:01:57 -0400 |
commit | f661d856fd83cb978320bf55ba5dfdee55a666b8 (patch) | |
tree | 019a18c86d19e5ebd87cd739fa71684f646b973f /src/feature | |
parent | 67cd67611c7d0756d04eab4a04ed913bf3421ae1 (diff) | |
download | tor-f661d856fd83cb978320bf55ba5dfdee55a666b8.tar.gz tor-f661d856fd83cb978320bf55ba5dfdee55a666b8.zip |
hs: Remove rend_client_allow_non_anonymous_connection
By removing Tor2Web, there is no way a client can be non anonymous so we
remove that function and the callsites.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature')
-rw-r--r-- | src/feature/rend/rendclient.c | 14 | ||||
-rw-r--r-- | src/feature/rend/rendclient.h | 1 | ||||
-rw-r--r-- | src/feature/rend/rendcommon.c | 9 |
3 files changed, 2 insertions, 22 deletions
diff --git a/src/feature/rend/rendclient.c b/src/feature/rend/rendclient.c index 0b7d602d98..485ffa8be3 100644 --- a/src/feature/rend/rendclient.c +++ b/src/feature/rend/rendclient.c @@ -1219,20 +1219,6 @@ rend_parse_service_authorization(const or_options_t *options, return res; } -/* Can Tor client code make direct (non-anonymous) connections to introduction - * or rendezvous points? - * Returns true if tor was compiled with NON_ANONYMOUS_MODE_ENABLED. */ -int -rend_client_allow_non_anonymous_connection(const or_options_t *options) -{ -#ifdef NON_ANONYMOUS_MODE_ENABLED - return 1; -#else - (void)options; - return 0; -#endif /* defined(NON_ANONYMOUS_MODE_ENABLED) */ -} - /* At compile-time, was non-anonymous mode enabled via * NON_ANONYMOUS_MODE_ENABLED ? */ int diff --git a/src/feature/rend/rendclient.h b/src/feature/rend/rendclient.h index e41faa4932..2e7d7aeca9 100644 --- a/src/feature/rend/rendclient.h +++ b/src/feature/rend/rendclient.h @@ -47,7 +47,6 @@ rend_service_authorization_t *rend_client_lookup_service_authorization( const char *onion_address); void rend_service_authorization_free_all(void); -int rend_client_allow_non_anonymous_connection(const or_options_t *options); int rend_client_non_anonymous_mode_enabled(const or_options_t *options); #endif /* !defined(TOR_RENDCLIENT_H) */ diff --git a/src/feature/rend/rendcommon.c b/src/feature/rend/rendcommon.c index 567cc5c1e4..6e19d56b30 100644 --- a/src/feature/rend/rendcommon.c +++ b/src/feature/rend/rendcommon.c @@ -979,16 +979,11 @@ rend_auth_decode_cookie(const char *cookie_in, uint8_t *cookie_out, /* Is this a rend client or server that allows direct (non-anonymous) * connections? - * Clients must be specifically compiled and configured in this mode. - * Onion services can be configured to start in this mode. - * Prefer rend_client_allow_non_anonymous_connection() or - * rend_service_allow_non_anonymous_connection() whenever possible, so that - * checks are specific to Single Onion Services. */ + * Onion services can be configured to start in this mode for single onion. */ int rend_allow_non_anonymous_connection(const or_options_t* options) { - return (rend_client_allow_non_anonymous_connection(options) - || rend_service_allow_non_anonymous_connection(options)); + return rend_service_allow_non_anonymous_connection(options); } /* Is this a rend client or server in non-anonymous mode? |