Fix build with LibreSSL 2.7

PR:		229608
Approved by:	SSL blanket
MFH:		2018Q3
This commit is contained in:
Michael Gmelin 2018-07-08 18:16:41 +00:00
parent 6d11263cb5
commit 0f627d95b5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=474192
2 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1,11 @@
--- src/mongo/crypto/sha_block_openssl.cpp.orig 2018-07-08 16:42:41.034894000 +0000
+++ src/mongo/crypto/sha_block_openssl.cpp 2018-07-08 16:42:58.121846000 +0000
@@ -44,7 +44,7 @@
#include <openssl/hmac.h>
#include <openssl/sha.h>
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
namespace {
// Copies of OpenSSL after 1.1.0 define new EVP digest routines. We must
// polyfill used definitions to interact with older OpenSSL versions.

View file

@ -0,0 +1,11 @@
--- src/mongo/util/net/ssl_manager.cpp.orig 2018-07-08 16:33:48.347433000 +0000
+++ src/mongo/util/net/ssl_manager.cpp 2018-07-08 16:34:49.098494000 +0000
@@ -237,7 +237,7 @@
#endif // MONGO_CONFIG_NEEDS_ASN1_ANY_DEFINITIONS
// clang-format on
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
// Copies of OpenSSL after 1.1.0 define new functions for interaction with
// X509 structure. We must polyfill used definitions to interact with older
// OpenSSL versions.