summaryrefslogtreecommitdiff
path: root/src/common/aes.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-04-18 12:31:24 -0400
committerNick Mathewson <nickm@torproject.org>2018-04-18 12:31:24 -0400
commita15b2c57e1f901c531a5f063513a541adb418ae1 (patch)
tree09b5402461a963d741ce77302c4245b198c1e28b /src/common/aes.c
parent8e562874a42a1a3eb982ba2df3ff1f3860db0d31 (diff)
downloadtor-a15b2c57e1f901c531a5f063513a541adb418ae1.tar.gz
tor-a15b2c57e1f901c531a5f063513a541adb418ae1.zip
Add support for openssl built with "no-deprecated".
Patch from Andrew John Hughes; partial fix for 19981.
Diffstat (limited to 'src/common/aes.c')
-rw-r--r--src/common/aes.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/aes.c b/src/common/aes.c
index 5d0841dfa3..95737cffcc 100644
--- a/src/common/aes.c
+++ b/src/common/aes.c
@@ -116,7 +116,11 @@ aes_cipher_free_(aes_cnt_cipher_t *cipher_)
if (!cipher_)
return;
EVP_CIPHER_CTX *cipher = (EVP_CIPHER_CTX *) cipher_;
+#if OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,1,0)
+ EVP_CIPHER_CTX_reset(cipher);
+#else
EVP_CIPHER_CTX_cleanup(cipher);
+#endif
EVP_CIPHER_CTX_free(cipher);
}
void