]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Bugfixes for authenticate handling and generation
authorNick Mathewson <nickm@torproject.org>
Tue, 27 Sep 2011 19:20:17 +0000 (15:20 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 11 Oct 2011 03:14:30 +0000 (23:14 -0400)
src/or/command.c
src/or/connection_or.c

index 5519245894555d886da911c9d51d6c2a2f5b99eb..4da5f86009b015b8eeaa77cba5e141c85cb1c713 100644 (file)
@@ -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!");
index 004c19f08bd1777f5c523fe2957fa1da243017a8..1b40f36dfb002ea7ceffb1aaaa861abd72378afa 100644 (file)
@@ -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. */