[or-cvs] Fix client_process_auth
Nick Mathewson
nickm at seul.org
Wed Mar 19 21:34:41 UTC 2003
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv30311/src/or
Modified Files:
connection_or.c
Log Message:
Fix client_process_auth
Index: connection_or.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_or.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- connection_or.c 19 Mar 2003 20:48:56 -0000 1.19
+++ connection_or.c 19 Mar 2003 21:34:38 -0000 1.20
@@ -375,7 +375,7 @@
int or_handshake_client_send_auth(connection_t *conn) {
int retval;
- char buf[46];
+ char buf[48];
char cipher[128];
struct sockaddr_in me; /* my router identity */
@@ -439,7 +439,7 @@
}
int or_handshake_client_process_auth(connection_t *conn) {
- char buf[128]; /* only 48 of this is expected to be used */
+ char buf[128]; /* only 56 of this is expected to be used */
char cipher[128];
uint32_t bandwidth;
int retval;
@@ -468,7 +468,7 @@
crypto_perror());
return -1;
}
- else if (retval != 48)
+ else if (retval != 56)
{
log(LOG_ERR,"Received an incorrect response from router %s:%u during authentication.",
conn->address,conn->port);
@@ -496,7 +496,7 @@
conn->bandwidth = bandwidth;
/* reply is just local addr/port, remote addr/port, nonce */
- memcpy(buf+12, buf+32, 8);
+ memcpy(buf+12, buf+48, 8);
/* encrypt reply */
retval = crypto_pk_public_encrypt(conn->pkey, buf, 20, cipher,RSA_PKCS1_PADDING);
More information about the tor-commits
mailing list