Browse Source

Fix op handshake for longer keys

svn:r200
Nick Mathewson 22 years ago
parent
commit
51ed97504b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/or/connection_op.c

+ 2 - 1
src/or/connection_op.c

@@ -59,13 +59,14 @@ int op_handshake_process_keys(connection_t *conn) {
         crypto_perror());
         crypto_perror());
     return -1;
     return -1;
   }
   }
+  /* XXXX Check length */
 
 
   log(LOG_DEBUG,"Successfully decrypted keys from new OP.");
   log(LOG_DEBUG,"Successfully decrypted keys from new OP.");
 
 
   conn->bandwidth = ntohl(*((uint32_t *)auth_plain));
   conn->bandwidth = ntohl(*((uint32_t *)auth_plain));
 
 
   crypto_cipher_set_key(conn->b_crypto, auth_plain+4);
   crypto_cipher_set_key(conn->b_crypto, auth_plain+4);
-  crypto_cipher_set_key(conn->f_crypto, auth_plain+12);
+  crypto_cipher_set_key(conn->f_crypto, auth_plain+20);
 #if 0
 #if 0
   printf("f_session_key: ");
   printf("f_session_key: ");
   for(x=0;x<8;x++) {
   for(x=0;x<8;x++) {