summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_ssl_session.c
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-03 02:50:31 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-03 02:50:31 +0000
commitf0577b7563f72ae1effd82f12246fc8f91fece7c (patch)
tree8433f6f1c1cad447e4430cbcfeda75c76eb46c68 /ext/openssl/ossl_ssl_session.c
parente9ebaaa15d45998b088ef747f0c2ff63c4b0f7b6 (diff)
* ext/openssl/ossl.h: avoid to build failure of Windows environment.
* ext/openssl/ossl_ssl_session.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_ssl_session.c')
-rw-r--r--ext/openssl/ossl_ssl_session.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/openssl/ossl_ssl_session.c b/ext/openssl/ossl_ssl_session.c
index 2fd853f9ff..e1bbc6fb54 100644
--- a/ext/openssl/ossl_ssl_session.c
+++ b/ext/openssl/ossl_ssl_session.c
@@ -79,7 +79,11 @@ int SSL_SESSION_cmp(const SSL_SESSION *a,const SSL_SESSION *b)
if (a->ssl_version != b->ssl_version ||
a->session_id_length != b->session_id_length)
return 1;
+#if defined(_WIN32)
+ return memcmp(a->session_id, b->session_id, a->session_id_length);
+#else
return CRYPTO_memcmp(a->session_id, b->session_id, a->session_id_length);
+#endif
}
#endif