[or-cvs] Build without warnings against openssl 0.9.6

Nick Mathewson nickm at seul.org
Sat Apr 3 02:43:11 UTC 2004


Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/home/nickm/src/tor/src/common

Modified Files:
	crypto.c 
Log Message:
Build without warnings against openssl 0.9.6

Index: crypto.c
===================================================================
RCS file: /home/or/cvsroot/src/common/crypto.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- crypto.c	3 Apr 2004 02:40:29 -0000	1.67
+++ crypto.c	3 Apr 2004 02:43:09 -0000	1.68
@@ -444,7 +444,7 @@
 {
   assert(env && from && to);
 
-  return RSA_public_encrypt(fromlen, from, to, env->key,
+  return RSA_public_encrypt(fromlen, (unsigned char*)from, to, env->key,
                             crypto_get_rsa_padding(padding));
 }
 
@@ -455,14 +455,14 @@
     /* Not a private key */
     return -1;
 
-  return RSA_private_decrypt(fromlen, from, to, env->key,
+  return RSA_private_decrypt(fromlen, (unsigned char*)from, to, env->key,
                              crypto_get_rsa_padding(padding));
 }
 
 int crypto_pk_public_checksig(crypto_pk_env_t *env, const unsigned char *from, int fromlen, unsigned char *to)
 {
   assert(env && from && to);
-  return RSA_public_decrypt(fromlen, from, to, env->key, RSA_PKCS1_PADDING);
+  return RSA_public_decrypt(fromlen, (unsigned char*)from, to, env->key, RSA_PKCS1_PADDING);
 }
 
 int crypto_pk_private_sign(crypto_pk_env_t *env, const unsigned char *from, int fromlen, unsigned char *to)
@@ -472,7 +472,7 @@
     /* Not a private key */
     return -1;
 
-  return RSA_private_encrypt(fromlen, from, to, env->key, RSA_PKCS1_PADDING);
+  return RSA_private_encrypt(fromlen, (unsigned char*)from, to, env->key, RSA_PKCS1_PADDING);
 }
 
 /* Return 0 if sig is a correct signature for SHA1(data).  Else return -1.



More information about the tor-commits mailing list