aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/openssl_missing.h
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-04-20 17:15:54 +0900
committerKazuki Yamaguchi <k@rhe.jp>2016-04-27 23:07:41 +0900
commite9cc5e209b520a87f05f994b2961da0ac0fd1e6d (patch)
tree78872a48b6c6700cccab6f38bfe0667b949e7955 /ext/openssl/openssl_missing.h
parent94cdf4aa2f4aa0dcacaca5127b4c8beb009d9e9f (diff)
downloadruby-e9cc5e209b520a87f05f994b2961da0ac0fd1e6d.tar.gz
ext/openssl: BIGNUM and BN_GENCB is made opaque
Diffstat (limited to 'ext/openssl/openssl_missing.h')
-rw-r--r--ext/openssl/openssl_missing.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/openssl/openssl_missing.h b/ext/openssl/openssl_missing.h
index e1ea7d8001..19644afcd4 100644
--- a/ext/openssl/openssl_missing.h
+++ b/ext/openssl/openssl_missing.h
@@ -49,6 +49,18 @@ int CRYPTO_memcmp(const volatile void * volatile in_a, const volatile void * vol
#endif
/*** added in 1.1.0 ***/
+#if !defined(HAVE_BN_GENCB_NEW)
+# define BN_GENCB_new() ((BN_GENCB *)OPENSSL_malloc(sizeof(BN_GENCB)))
+#endif
+
+#if !defined(HAVE_BN_GENCB_FREE)
+# define BN_GENCB_free(cb) OPENSSL_free(cb)
+#endif
+
+#if !defined(HAVE_BN_GENCB_GET_ARG)
+# define BN_GENCB_get_arg(cb) (cb)->arg
+#endif
+
#if !defined(HAVE_HMAC_CTX_NEW)
HMAC_CTX *HMAC_CTX_new(void);
#endif