aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/openssl_missing.h
diff options
context:
space:
mode:
authorrhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-22 01:43:41 +0000
committerrhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-22 01:43:41 +0000
commitb7458f20ffeb9cd0cd2514d86ecd9b25b4f2cb9b (patch)
tree2827e0ca4f7a8c45e09286ba275eeae6bf0c6da0 /ext/openssl/openssl_missing.h
parentbd288dcc8bd661b51856e95a9d649a1130580627 (diff)
downloadruby-b7458f20ffeb9cd0cd2514d86ecd9b25b4f2cb9b.tar.gz
openssl: import v2.0.2
Import Ruby/OpenSSL 2.0.2. This release contains only bugfixes. The full commit log since 2.0.1 (imported at r57041) can be found at: https://github.com/ruby/openssl/compare/v2.0.1...v2.0.2 ---------------------------------------------------------------- Kazuki Yamaguchi (5): ssl: check for SSL_CTX_clear_options() Rename functions in openssl_missing.c ssl: use SSL_SESSION_get_protocol_version() pkey: allow instantiating OpenSSL::PKey::PKey with unsupported key type Ruby/OpenSSL 2.0.2 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/openssl_missing.h')
-rw-r--r--ext/openssl/openssl_missing.h35
1 files changed, 26 insertions, 9 deletions
diff --git a/ext/openssl/openssl_missing.h b/ext/openssl/openssl_missing.h
index df27b1a858..3d11aec2d2 100644
--- a/ext/openssl/openssl_missing.h
+++ b/ext/openssl/openssl_missing.h
@@ -14,11 +14,17 @@
/* added in 0.9.8X */
#if !defined(HAVE_EVP_CIPHER_CTX_NEW)
-EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void);
+EVP_CIPHER_CTX *ossl_EVP_CIPHER_CTX_new(void);
+# define EVP_CIPHER_CTX_new ossl_EVP_CIPHER_CTX_new
#endif
#if !defined(HAVE_EVP_CIPHER_CTX_FREE)
-void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx);
+void ossl_EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *);
+# define EVP_CIPHER_CTX_free ossl_EVP_CIPHER_CTX_free
+#endif
+
+#if !defined(HAVE_SSL_CTX_CLEAR_OPTIONS)
+# define SSL_CTX_clear_options(ctx, op) ((ctx)->options &= ~(op))
#endif
/* added in 1.0.0 */
@@ -27,11 +33,13 @@ void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx);
#endif
#if !defined(HAVE_EVP_CIPHER_CTX_COPY)
-int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in);
+int ossl_EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *, const EVP_CIPHER_CTX *);
+# define EVP_CIPHER_CTX_copy ossl_EVP_CIPHER_CTX_copy
#endif
#if !defined(HAVE_HMAC_CTX_COPY)
-int HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in);
+int ossl_HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in);
+# define HMAC_CTX_copy ossl_HMAC_CTX_copy
#endif
#if !defined(HAVE_X509_STORE_CTX_GET0_CURRENT_CRL)
@@ -54,7 +62,8 @@ int HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in);
/* added in 1.0.2 */
#if !defined(OPENSSL_NO_EC)
#if !defined(HAVE_EC_CURVE_NIST2NID)
-int EC_curve_nist2nid(const char *);
+int ossl_EC_curve_nist2nid(const char *);
+# define EC_curve_nist2nid ossl_EC_curve_nist2nid
#endif
#endif
@@ -93,11 +102,13 @@ int EC_curve_nist2nid(const char *);
#endif
#if !defined(HAVE_HMAC_CTX_NEW)
-HMAC_CTX *HMAC_CTX_new(void);
+HMAC_CTX *ossl_HMAC_CTX_new(void);
+# define HMAC_CTX_new ossl_HMAC_CTX_new
#endif
#if !defined(HAVE_HMAC_CTX_FREE)
-void HMAC_CTX_free(HMAC_CTX *ctx);
+void ossl_HMAC_CTX_free(HMAC_CTX *);
+# define HMAC_CTX_free ossl_HMAC_CTX_free
#endif
#if !defined(HAVE_X509_STORE_GET_EX_DATA)
@@ -114,11 +125,13 @@ void HMAC_CTX_free(HMAC_CTX *ctx);
#endif
#if !defined(HAVE_X509_CRL_GET0_SIGNATURE)
-void X509_CRL_get0_signature(const X509_CRL *, const ASN1_BIT_STRING **, const X509_ALGOR **);
+void ossl_X509_CRL_get0_signature(const X509_CRL *, const ASN1_BIT_STRING **, const X509_ALGOR **);
+# define X509_CRL_get0_signature ossl_X509_CRL_get0_signature
#endif
#if !defined(HAVE_X509_REQ_GET0_SIGNATURE)
-void X509_REQ_get0_signature(const X509_REQ *, const ASN1_BIT_STRING **, const X509_ALGOR **);
+void ossl_X509_REQ_get0_signature(const X509_REQ *, const ASN1_BIT_STRING **, const X509_ALGOR **);
+# define X509_REQ_get0_signature ossl_X509_REQ_get0_signature
#endif
#if !defined(HAVE_X509_REVOKED_GET0_SERIALNUMBER)
@@ -245,4 +258,8 @@ IMPL_PKEY_GETTER(EC_KEY, ec)
# define X509_CRL_get0_nextUpdate(x) X509_CRL_get_nextUpdate(x)
#endif
+#if !defined(HAVE_SSL_SESSION_GET_PROTOCOL_VERSION)
+# define SSL_SESSION_get_protocol_version(s) ((s)->ssl_version)
+#endif
+
#endif /* _OSSL_OPENSSL_MISSING_H_ */