aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl')
-rw-r--r--ext/openssl/ossl.h4
-rw-r--r--ext/openssl/ossl_ssl_session.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h
index fd7c8401f3..a53f0f413f 100644
--- a/ext/openssl/ossl.h
+++ b/ext/openssl/ossl.h
@@ -64,7 +64,9 @@ extern "C" {
#include <openssl/rand.h>
#include <openssl/conf.h>
#include <openssl/conf_api.h>
-#include <openssl/crypto.h>
+#if !defined(_WIN32)
+# include <openssl/crypto.h>
+#endif
#undef X509_NAME
#undef PKCS7_SIGNER_INFO
#if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_EVP_CIPHER_CTX_ENGINE)
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