set(CURL_MINIMUM 7.15.4)
set(EVENT2_MINIMUM 2.0.10)
-set(OPENSSL_MINIMUM 0.9.4)
+set(OPENSSL_MINIMUM 0.9.7)
set(CYASSL_MINIMUM 3.0)
set(POLARSSL_MINIMUM 1.2)
set(ZLIB_MINIMUM 1.2.3)
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/rand.h>
+#include <openssl/opensslv.h>
#include "transmission.h"
#include "crypto-utils.h"
****
***/
+#if OPENSSL_VERSION_NUMBER < 0x0090802fL
+
+static EVP_CIPHER_CTX *
+openssl_evp_cipher_context_new (void)
+{
+ EVP_CIPHER_CTX * ctx = tr_new (EVP_CIPHER_CTX, 1);
+ if (ctx != NULL)
+ EVP_CIPHER_CTX_init (ctx);
+ return ctx;
+}
+
+static void
+openssl_evp_cipher_context_free (EVP_CIPHER_CTX * ctx)
+{
+ if (ctx)
+ {
+ EVP_CIPHER_CTX_cleanup (ctx);
+ tr_free (ctx);
+ }
+}
+
+#define EVP_CIPHER_CTX_new() openssl_evp_cipher_context_new ()
+#define EVP_CIPHER_CTX_free(x) openssl_evp_cipher_context_free ((x))
+
+#endif
+
tr_rc4_ctx_t
tr_rc4_new (void)
{