From 13b33a2163ed52d4683f3901ed1f90ad93aa8474 Mon Sep 17 00:00:00 2001 From: Kazuki Yamaguchi Date: Wed, 20 Apr 2016 13:13:45 +0900 Subject: ext/openssl: use EVP_CIPHER_CTX_{new,free} to allocate EVP_CIPHER_CTX EVP_CIPHER_CTX was made opaque in OpenSSL 1.1.0 --- ext/openssl/openssl_missing.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'ext/openssl/openssl_missing.h') diff --git a/ext/openssl/openssl_missing.h b/ext/openssl/openssl_missing.h index 025ce06bda..3e2c8159e4 100644 --- a/ext/openssl/openssl_missing.h +++ b/ext/openssl/openssl_missing.h @@ -14,6 +14,21 @@ extern "C" { #endif +/*** added in 0.9.8X ***/ +#if !defined(HAVE_EVP_CIPHER_CTX_NEW) +EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void); +#endif + +#if !defined(HAVE_EVP_CIPHER_CTX_FREE) +void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx); +#endif + +#if !defined(HAVE_SSL_CTX_CLEAR_OPTIONS) +# define SSL_CTX_clear_options(ctx, op) do \ + (ctx)->options &= ~(op); while (0) +#endif + +/*** added in 1.0.0 ***/ #if !defined(HAVE_HMAC_CTX_COPY) void HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in); #endif @@ -34,11 +49,6 @@ int X509_STORE_set_ex_data(X509_STORE *str, int idx, void *data); int CRYPTO_memcmp(const volatile void * volatile in_a, const volatile void * volatile in_b, size_t len); #endif -#if !defined(HAVE_SSL_CTX_CLEAR_OPTIONS) -# define SSL_CTX_clear_options(ctx, op) do \ - (ctx)->options &= ~(op); while (0) -#endif - #if !defined(HAVE_X509_REVOKED_DUP) # define X509_REVOKED_dup(rev) (X509_REVOKED *)ASN1_dup((i2d_of_void *)i2d_X509_REVOKED, \ (d2i_of_void *)d2i_X509_REVOKED, (char *)(rev)) -- cgit v1.2.3