aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/openssl_missing.h
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-05-05 15:47:58 +0900
committerKazuki Yamaguchi <k@rhe.jp>2016-05-05 18:43:46 +0900
commit2eea53d8878d74d292b3982159e509729f03f8c7 (patch)
tree22c1fffec3ebb08844f66ad6a435db8259e4fbaf /ext/openssl/openssl_missing.h
parentce719f13aded9f7d3d4fcfd4e3078ea19ef0309e (diff)
downloadruby-2eea53d8878d74d292b3982159e509729f03f8c7.tar.gz
ext/openssl: SSL_state() is removed
SSL_state() is removed, and the replacement, SSL_get_state(), never returns SSL_ST_ACCEPT. I think it is used to distinguish if the SSL is a server or not, so replacing it with SSL_is_server(). And add some `const`s.
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 7081fc1fe4..e7ec792626 100644
--- a/ext/openssl/openssl_missing.h
+++ b/ext/openssl/openssl_missing.h
@@ -35,6 +35,10 @@ int CRYPTO_memcmp(const volatile void * volatile in_a, const volatile void * vol
(d2i_of_void *)d2i_X509_REVOKED, (char *)(rev))
#endif
+#if !defined(HAVE_SSL_IS_SERVER)
+# define SSL_is_server(s) ((s)->server)
+#endif
+
/* added in 1.1.0 */
#if !defined(HAVE_X509_STORE_GET_EX_DATA)
# define X509_STORE_get_ex_data(x, idx) \