[tor-commits] [tor/master] Bugfixes for authenticate handling and generation

nickm at torproject.org nickm at torproject.org
Tue Oct 11 03:22:16 UTC 2011


commit 41b250d7ea6b2d635d0e0b70cf7e1d5c1ed9ca4f
Author: Nick Mathewson <nickm at torproject.org>
Date:   Tue Sep 27 15:20:17 2011 -0400

    Bugfixes for authenticate handling and generation
---
 src/or/command.c       |    2 +-
 src/or/connection_or.c |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/or/command.c b/src/or/command.c
index 5519245..4da5f86 100644
--- a/src/or/command.c
+++ b/src/or/command.c
@@ -1055,7 +1055,7 @@ command_process_authenticate_cell(var_cell_t *cell, or_connection_t *conn)
     ERR("We're not doing a v3 handshake");
   if (conn->link_proto < 3)
     ERR("We're not using link protocol >= 3");
-  if (! conn->handshake_state->started_here)
+  if (conn->handshake_state->started_here)
     ERR("We originated this connection");
   if (conn->handshake_state->received_authenticate)
     ERR("We already got one!");
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 004c19f..1b40f36 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -2163,6 +2163,7 @@ connection_or_send_authenticate_cell(or_connection_t *conn, int authtype)
     16 /* just in case XXXX */ ;
 
   cell = var_cell_new(cell_maxlen);
+  cell->command = CELL_AUTHENTICATE;
   set_uint16(cell->payload, htons(AUTHTYPE_RSA_SHA256_TLSSECRET));
   /* skip over length ; we don't know that yet. */
 





More information about the tor-commits mailing list