From: Nick Mathewson Date: Mon, 17 Mar 2025 13:32:55 +0000 (-0400) Subject: AUTHTYPE_RSA_SHA256_TLSSECRET is never supported. X-Git-Tag: tor-0.4.9.2-alpha~30^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92150e23afa0906197be295ee71024e4bd02d89f;p=thirdparty%2Ftor.git AUTHTYPE_RSA_SHA256_TLSSECRET is never supported. --- diff --git a/src/core/or/connection_or.h b/src/core/or/connection_or.h index 2132f9a072..26608176d3 100644 --- a/src/core/or/connection_or.h +++ b/src/core/or/connection_or.h @@ -129,8 +129,4 @@ STATIC void note_or_connect_failed(const or_connection_t *or_conn); MOCK_DECL(void, connection_or_change_state, (or_connection_t *conn, uint8_t state)); -#ifdef TOR_UNIT_TESTS -extern int testing__connection_or_pretend_TLSSECRET_is_supported; -#endif - #endif /* !defined(TOR_CONNECTION_OR_H) */ diff --git a/src/feature/relay/relay_handshake.c b/src/feature/relay/relay_handshake.c index a9f941cf02..4187475050 100644 --- a/src/feature/relay/relay_handshake.c +++ b/src/feature/relay/relay_handshake.c @@ -183,27 +183,17 @@ connection_or_send_certs_cell(or_connection_t *conn) return 0; } -#ifdef TOR_UNIT_TESTS -int testing__connection_or_pretend_TLSSECRET_is_supported = 0; -#else -#define testing__connection_or_pretend_TLSSECRET_is_supported 0 -#endif - /** Return true iff challenge_type is an AUTHCHALLENGE type that * we can send and receive. */ int authchallenge_type_is_supported(uint16_t challenge_type) { switch (challenge_type) { - case AUTHTYPE_RSA_SHA256_TLSSECRET: -#ifdef HAVE_WORKING_TOR_TLS_GET_TLSSECRETS - return 1; -#else - return testing__connection_or_pretend_TLSSECRET_is_supported; -#endif case AUTHTYPE_ED25519_SHA256_RFC5705: return 1; - case AUTHTYPE_RSA_SHA256_RFC5705: + + case AUTHTYPE_RSA_SHA256_TLSSECRET: // obsolete. + case AUTHTYPE_RSA_SHA256_RFC5705: // never implemented. default: return 0; }