aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/openssl_missing.h
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-12-01 22:27:03 +0900
committerKazuki Yamaguchi <k@rhe.jp>2016-12-01 22:27:03 +0900
commit72126d6c8b88abd69c3565fc3bbbd5ed1e401611 (patch)
treef1ac4d813e757517c25da6fc70d26b6a7e832178 /ext/openssl/openssl_missing.h
parent94a1c4e0c5705ad1e9a4ca08cacaa6cba8b1e6f5 (diff)
downloadruby-openssl-72126d6c8b88abd69c3565fc3bbbd5ed1e401611.tar.gz
pkey: check existence of EVP_PKEY_get0()
EVP_PKEY_get0() did not exist in early OpenSSL 0.9.8 series. So define ourselves if needed.
Diffstat (limited to 'ext/openssl/openssl_missing.h')
-rw-r--r--ext/openssl/openssl_missing.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/openssl/openssl_missing.h b/ext/openssl/openssl_missing.h
index 897d6235..df27b1a8 100644
--- a/ext/openssl/openssl_missing.h
+++ b/ext/openssl/openssl_missing.h
@@ -47,6 +47,10 @@ int HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in);
i2d_ASN1_TYPE, V_ASN1_SET, V_ASN1_UNIVERSAL, 0)
#endif
+#if !defined(HAVE_EVP_PKEY_GET0)
+# define EVP_PKEY_get0(pk) (pk->pkey.ptr)
+#endif
+
/* added in 1.0.2 */
#if !defined(OPENSSL_NO_EC)
#if !defined(HAVE_EC_CURVE_NIST2NID)