tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit fdc3ad6259095b3f15eeb96e998bf078083449dd
parent be3a962ca7c6fc5fd72dfd9bb1def24efa4cdf2a
Author: teor <teor@torproject.org>
Date:   Wed, 25 Jul 2018 14:33:10 +1000

Merge branch 'bug26924_029' into bug26924_032

Diffstat:
Achanges/bug26924 | 4++++
Msrc/or/connection_or.c | 6+++++-
2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/changes/bug26924 b/changes/bug26924 @@ -0,0 +1,4 @@ + o Minor bugfixes (single onion services, Tor2web): + - Log a protocol warning when single onion services or Tor2web clients + fail to authenticate direct connections to relays. + Fixes bug 26924; bugfix on 0.2.9.1-alpha. diff --git a/src/or/connection_or.c b/src/or/connection_or.c @@ -49,6 +49,7 @@ #include "proto_cell.h" #include "reasons.h" #include "relay.h" +#include "rendcommon.h" #include "rephist.h" #include "router.h" #include "routerkeys.h" @@ -1677,10 +1678,13 @@ connection_or_client_learned_peer_id(or_connection_t *conn, conn->identity_digest); const int is_authority_fingerprint = router_digest_is_trusted_dir( conn->identity_digest); + const int non_anonymous_mode = rend_non_anonymous_mode_enabled(options); int severity; const char *extra_log = ""; - if (server_mode(options)) { + /* Relays, Single Onion Services, and Tor2web make direct connections using + * untrusted authentication keys. */ + if (server_mode(options) || non_anonymous_mode) { severity = LOG_PROTOCOL_WARN; } else { if (using_hardcoded_fingerprints) {