]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
AUTHTYPE_RSA_SHA256_TLSSECRET is never supported.
authorNick Mathewson <nickm@torproject.org>
Mon, 17 Mar 2025 13:32:55 +0000 (09:32 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 18 Mar 2025 15:58:23 +0000 (11:58 -0400)
src/core/or/connection_or.h
src/feature/relay/relay_handshake.c

index 2132f9a07264188693ca238360f45d5a70cf1355..26608176d3ff0b14774ba4688138b5c00aa2a3e7 100644 (file)
@@ -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) */
index a9f941cf0263d315ec7846c50741828f7d858ba5..4187475050043dc36575216eb98a914fb73e52bb 100644 (file)
@@ -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 <b>challenge_type</b> 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;
   }