From ffc58cd91a82c62dbf80f2a64253fa5762b6a63a Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Sat, 3 Apr 2004 02:43:09 +0000 Subject: Build without warnings against openssl 0.9.6 svn:r1459 --- src/common/crypto.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/common') diff --git a/src/common/crypto.c b/src/common/crypto.c index 6f1d49d00..74f75bde3 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -444,7 +444,7 @@ int crypto_pk_public_encrypt(crypto_pk_env_t *env, const unsigned char *from, in { 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 @@ int crypto_pk_private_decrypt(crypto_pk_env_t *env, const unsigned char *from, i /* 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 @@ int crypto_pk_private_sign(crypto_pk_env_t *env, const unsigned char *from, int /* 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. -- cgit v1.2.3