diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-04-03 02:43:09 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-04-03 02:43:09 +0000 |
commit | ffc58cd91a82c62dbf80f2a64253fa5762b6a63a (patch) | |
tree | 2ac779dff50e992e1cceb1738e092d054184460c /src/common | |
parent | 137b577bbd52a2da8f35a6b38514457868460e36 (diff) | |
download | tor-ffc58cd91a82c62dbf80f2a64253fa5762b6a63a.tar tor-ffc58cd91a82c62dbf80f2a64253fa5762b6a63a.tar.gz |
Build without warnings against openssl 0.9.6
svn:r1459
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/crypto.c | 8 |
1 files changed, 4 insertions, 4 deletions
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. |