[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] use the right variable when comparing hashes; maybe fix "Ha...
- To: or-cvs@freehaven.net
- Subject: [or-cvs] use the right variable when comparing hashes; maybe fix "Ha...
- From: nickm@seul.org (Nick Mathewson)
- Date: Mon, 5 Apr 2004 13:36:32 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Mon, 05 Apr 2004 13:36:55 -0400
- Reply-to: or-dev@freehaven.net
- Sender: owner-or-cvs@freehaven.net
Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/tmp/cvs-serv10311/src/common
Modified Files:
crypto.c crypto.h
Log Message:
use the right variable when comparing hashes; maybe fix "Hash of session" bug
Index: crypto.c
===================================================================
RCS file: /home/or/cvsroot/src/common/crypto.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- crypto.c 5 Apr 2004 17:10:48 -0000 1.70
+++ crypto.c 5 Apr 2004 17:36:30 -0000 1.71
@@ -482,7 +482,7 @@
/* Return 0 if sig is a correct signature for SHA1(data). Else return -1.
*/
-int crypto_pk_public_checksig_digest(crypto_pk_env_t *env, const unsigned char *data, int datalen, unsigned char *sig, int siglen)
+int crypto_pk_public_checksig_digest(crypto_pk_env_t *env, const unsigned char *data, int datalen, const unsigned char *sig, int siglen)
{
char digest[DIGEST_LEN];
char buf[PK_BYTES+1];
Index: crypto.h
===================================================================
RCS file: /home/or/cvsroot/src/common/crypto.h,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- crypto.h 3 Apr 2004 02:40:29 -0000 1.35
+++ crypto.h 5 Apr 2004 17:36:30 -0000 1.36
@@ -56,7 +56,7 @@
int crypto_pk_private_sign(crypto_pk_env_t *env, const unsigned char *from, int fromlen, unsigned char *to);
int crypto_pk_private_sign_digest(crypto_pk_env_t *env, const unsigned char *from, int fromlen, unsigned char *to);
int crypto_pk_public_checksig(crypto_pk_env_t *env, const unsigned char *from, int fromlen, unsigned char *to);
-int crypto_pk_public_checksig_digest(crypto_pk_env_t *env, const unsigned char *data, int datalen, unsigned char *sig, int siglen);
+int crypto_pk_public_checksig_digest(crypto_pk_env_t *env, const unsigned char *data, int datalen, const unsigned char *sig, int siglen);
int crypto_pk_public_hybrid_encrypt(crypto_pk_env_t *env,
const unsigned char *from, int fromlen,
unsigned char *to, int padding);