aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/openssl_missing.h
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-04-20 13:13:45 +0900
committerKazuki Yamaguchi <k@rhe.jp>2016-04-27 23:07:41 +0900
commit13b33a2163ed52d4683f3901ed1f90ad93aa8474 (patch)
tree230d27d352d2955c4d1058232ec6f342ccb21159 /ext/openssl/openssl_missing.h
parent435fe7bdd0980e3fdb5483986a784fa2ba4bc46a (diff)
downloadruby-13b33a2163ed52d4683f3901ed1f90ad93aa8474.tar.gz
ext/openssl: use EVP_CIPHER_CTX_{new,free} to allocate EVP_CIPHER_CTX
EVP_CIPHER_CTX was made opaque in OpenSSL 1.1.0
Diffstat (limited to 'ext/openssl/openssl_missing.h')
-rw-r--r--ext/openssl/openssl_missing.h20
1 files changed, 15 insertions, 5 deletions
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))