aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/openssl_missing.h
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-04-24 02:10:42 +0900
committerKazuki Yamaguchi <k@rhe.jp>2016-04-27 23:07:42 +0900
commitaee4e753b50fda71c5ea5672ac845060f5e6aa09 (patch)
tree835c17d61d647bbbbef51e04277eaa424fa34d6e /ext/openssl/openssl_missing.h
parent7e17fed37fb0da9e610156efe2b51ea182a21aa5 (diff)
downloadruby-aee4e753b50fda71c5ea5672ac845060f5e6aa09.tar.gz
ext/openssl: use SSL_is_server() to check if the SSL is server or not
The state returned by SSL_get_state() doesn't become SSL_ST_ACCEPT anymore in OpenSSL 1.1.0.
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 55f3adacb4..a23f7d87ea 100644
--- a/ext/openssl/openssl_missing.h
+++ b/ext/openssl/openssl_missing.h
@@ -70,6 +70,10 @@ int EC_curve_nist2nid(const char *str);
# define X509_STORE_CTX_get0_store(x) ((x)->ctx)
#endif
+#if !defined(HAVE_SSL_IS_SERVER)
+# define SSL_is_server(s) ((s)->server)
+#endif
+
/*** added in 1.1.0 ***/
#if !defined(HAVE_BN_GENCB_NEW)
# define BN_GENCB_new() ((BN_GENCB *)OPENSSL_malloc(sizeof(BN_GENCB)))