aboutsummaryrefslogtreecommitdiffstats
path: root/testing/mongo-c-driver/libressl-2.7.patch
blob: 0839350ae63f107ac506dd4232cb8cb7c699ca6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
diff --git a/src/mongoc/mongoc-stream-tls-openssl-bio.c b/src/mongoc/mongoc-stream-tls-openssl-bio.c
index 053439b..0379a5d 100644
--- a/src/mongoc/mongoc-stream-tls-openssl-bio.c
+++ b/src/mongoc/mongoc-stream-tls-openssl-bio.c
@@ -39,7 +39,7 @@
 #define MONGOC_LOG_DOMAIN "stream-tls-openssl-bio"
 
 
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
 
 /* Magic vtable to make our BIO shim */
 static BIO_METHOD gMongocStreamTlsOpenSslRawMethods = {
diff --git a/src/mongoc/mongoc-stream-tls-openssl.c b/src/mongoc/mongoc-stream-tls-openssl.c
index fd1800b..bccae22 100644
--- a/src/mongoc/mongoc-stream-tls-openssl.c
+++ b/src/mongoc/mongoc-stream-tls-openssl.c
@@ -45,7 +45,7 @@
 
 #define MONGOC_STREAM_TLS_OPENSSL_BUFFER_SIZE 4096
 
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
 static void
 BIO_meth_free (BIO_METHOD *meth)
 {
diff --git a/build/autotools/CheckSSL.m4 b/build/autotools/CheckSSL.m4
index 95979c7..03576f5 100644
--- a/build/autotools/CheckSSL.m4
+++ b/build/autotools/CheckSSL.m4
@@ -34,7 +34,7 @@ AS_IF([test "$enable_ssl" != "no"],[
       ])
    ])
    AS_IF([test "$enable_ssl" = "libressl"],[
-      PKG_CHECK_MODULES(SSL, [libtls], [enable_ssl=libressl], [
+      PKG_CHECK_MODULES(SSL, [libtls libcrypto], [enable_ssl=libressl], [
          AC_CHECK_LIB([tls],[tls_init],[
             SSL_LIBS="-ltls -lcrypto"
             enable_ssl=libressl
diff --git a/src/mongoc/mongoc-crypto-openssl.c b/src/mongoc/mongoc-crypto-openssl.c
index 1b2552c..0e248e7 100644
--- a/src/mongoc/mongoc-crypto-openssl.c
+++ b/src/mongoc/mongoc-crypto-openssl.c
@@ -38,7 +38,7 @@ mongoc_crypto_openssl_hmac_sha1 (mongoc_crypto_t *crypto,
    HMAC (EVP_sha1 (), key, key_len, d, n, md, NULL);
 }
 
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
 EVP_MD_CTX *
 EVP_MD_CTX_new (void)
 {