summaryrefslogtreecommitdiff
path: root/src/common/crypto.c
diff options
context:
space:
mode:
authorMalek <malek@mit.edu>2016-02-06 12:05:32 -0500
committerNick Mathewson <nickm@torproject.org>2016-02-06 13:38:11 -0500
commita9cd291753b022aab1a07525f19e113c9da2cd0e (patch)
tree71284b6334030e30d66f273388828c72aa8e8558 /src/common/crypto.c
parent1f5cdf2b6c72ae89eea630a2c4693273ff1aee6c (diff)
downloadtor-a9cd291753b022aab1a07525f19e113c9da2cd0e.tar.gz
tor-a9cd291753b022aab1a07525f19e113c9da2cd0e.zip
Removed aes_crypt, left only aes_crypt_inplace. Removed should_use_openssl_CTR, was used for openssl 1.0.0 bug.
Diffstat (limited to 'src/common/crypto.c')
-rw-r--r--src/common/crypto.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c
index bc659b1935..956ec88ed6 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -1509,7 +1509,8 @@ crypto_cipher_encrypt(crypto_cipher_t *env, char *to,
tor_assert(to);
tor_assert(fromlen < SIZE_T_CEILING);
- aes_crypt(env->cipher, from, fromlen, to);
+ memcpy(to, from, fromlen);
+ aes_crypt_inplace(env->cipher, to, fromlen);
return 0;
}
@@ -1526,7 +1527,8 @@ crypto_cipher_decrypt(crypto_cipher_t *env, char *to,
tor_assert(to);
tor_assert(fromlen < SIZE_T_CEILING);
- aes_crypt(env->cipher, from, fromlen, to);
+ memcpy(to, from, fromlen);
+ aes_crypt_inplace(env->cipher, to, fromlen);
return 0;
}
@@ -3154,4 +3156,3 @@ crypto_global_cleanup(void)
}
/** @} */
-