]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Remove now-needless RSA key argument for AUTHENTICATE body
authorNick Mathewson <nickm@torproject.org>
Mon, 17 Mar 2025 13:54:58 +0000 (09:54 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 18 Mar 2025 15:58:23 +0000 (11:58 -0400)
src/core/or/channeltls.c
src/feature/relay/relay_handshake.c
src/feature/relay/relay_handshake.h

index bed1cd11dfefe882d9f153adc1a17df4385ea887..a14b1991c2476e3b8df8f0a84f94f3e1e2f35c21 100644 (file)
@@ -2465,7 +2465,7 @@ channel_tls_process_authenticate_cell(var_cell_t *cell, channel_tls_t *chan)
     ERR("Authenticator was too short");
 
   expected_cell = connection_or_compute_authenticate_cell_body(
-                chan->conn, authtype, NULL, NULL, 1);
+                chan->conn, authtype, NULL, 1);
   if (! expected_cell)
     ERR("Couldn't compute expected AUTHENTICATE cell body");
 
index 362cc81f636e3f158587a3defb06ae80db89ad24..a35725ddbc5eca28be821d9007802dd2fcdfb97d 100644 (file)
@@ -268,19 +268,19 @@ connection_or_send_auth_challenge_cell(or_connection_t *conn)
  * determined by the rest of the handshake, and which match the provided value
  * exactly.
  *
- * If <b>server</b> is false and <b>signing_key</b> is NULL, calculate the
+ * If <b>server</b> is false and <b>ed_signing_key</b> is NULL, calculate the
  * first V3_AUTH_BODY_LEN bytes of the authenticator (that is, everything
  * that should be signed), but don't actually sign it.
  *
- * If <b>server</b> is false and <b>signing_key</b> is provided, calculate the
- * entire authenticator, signed with <b>signing_key</b>.
+ * If <b>server</b> is false and <b>ed_signing_key</b> is provided,
+ * calculate the
+ * entire authenticator, signed with <b>ed_signing_key</b>.
  *
  * Return the length of the cell body on success, and -1 on failure.
  */
 var_cell_t *
 connection_or_compute_authenticate_cell_body(or_connection_t *conn,
                                              const int authtype,
-                                             crypto_pk_t *signing_key,
                                       const ed25519_keypair_t *ed_signing_key,
                                       int server)
 {
@@ -289,8 +289,6 @@ connection_or_compute_authenticate_cell_body(or_connection_t *conn,
   var_cell_t *result = NULL;
   const char *authtype_str = NULL;
 
-  (void) signing_key; // XXXX remove.
-
   /* assert state is reasonable XXXX */
   switch (authtype) {
   case AUTHTYPE_RSA_SHA256_TLSSECRET:
@@ -494,13 +492,8 @@ MOCK_IMPL(int,
 connection_or_send_authenticate_cell,(or_connection_t *conn, int authtype))
 {
   var_cell_t *cell;
-  crypto_pk_t *pk = tor_tls_get_my_client_auth_key();
   /* XXXX make sure we're actually supposed to send this! */
 
-  if (!pk) {
-    log_warn(LD_BUG, "Can't compute authenticate cell: no client auth key");
-    return -1;
-  }
   if (! authchallenge_type_is_supported(authtype)) {
     log_warn(LD_BUG, "Tried to send authenticate cell with unknown "
              "authentication type %d", authtype);
@@ -509,7 +502,6 @@ connection_or_send_authenticate_cell,(or_connection_t *conn, int authtype))
 
   cell = connection_or_compute_authenticate_cell_body(conn,
                                                  authtype,
-                                                 pk,
                                                  get_current_auth_keypair(),
                                                  0 /* not server */);
   if (! cell) {
index 87199c1c2d6440e984845ee339145e687c9493c8..61d0558d68b147f7e44ec5d626585a3c680db372 100644 (file)
@@ -21,7 +21,6 @@ int connection_or_send_auth_challenge_cell(or_connection_t *conn);
 var_cell_t *connection_or_compute_authenticate_cell_body(
                               or_connection_t *conn,
                               const int authtype,
-                              crypto_pk_t *signing_key,
                               const struct ed25519_keypair_t *ed_signing_key,
                               int server);
 
@@ -56,7 +55,6 @@ static inline var_cell_t *
 connection_or_compute_authenticate_cell_body(
                               or_connection_t *conn,
                               const int authtype,
-                              crypto_pk_t *signing_key,
                               const struct ed25519_keypair_t *ed_signing_key,
                               int server)
 {