[Pkg-mongodb-maintainers] [pkg-mongodb] 09/11: Fix build with OpenSSL 1.1

Apollon Oikonomopoulos apoikos at moszumanska.debian.org
Mon Oct 2 07:55:15 UTC 2017


This is an automated email from the git hooks/post-receive script.

apoikos pushed a commit to branch master
in repository pkg-mongodb.

commit 90705bb55e8b84a1d290fb25d8ef6652f25ba85c
Author: Apollon Oikonomopoulos <apoikos at debian.org>
Date:   Tue Sep 26 12:27:32 2017 +0300

    Fix build with OpenSSL 1.1
    
    Upstream merged a commit that pre-dated OpenSSL 1.1 support in 3.2.16,
    undoing parts of it. Restore the missing bits.
    
    Git-Dch: ingore
---
 debian/patches/fix-build-with-openssl-1.1.patch | 39 +++++++++++++++++++++++++
 debian/patches/series                           |  1 +
 2 files changed, 40 insertions(+)

diff --git a/debian/patches/fix-build-with-openssl-1.1.patch b/debian/patches/fix-build-with-openssl-1.1.patch
new file mode 100644
index 0000000..77cc556
--- /dev/null
+++ b/debian/patches/fix-build-with-openssl-1.1.patch
@@ -0,0 +1,39 @@
+From 557c0a3ca5f55ae3ca8ff26918fe94113c403390 Mon Sep 17 00:00:00 2001
+From: Apollon Oikonomopoulos <apoikos at debian.org>
+Date: Tue, 26 Sep 2017 12:25:06 +0300
+Subject: [PATCH] Fix build with OpenSSL 1.1
+
+Upstream merged a commit that pre-dated OpenSSL 1.1 support in 3.2.16,
+effectively removing parts of 1.1 support. Fix this by restoring the
+correct declarations.
+---
+ src/mongo/crypto/sha1_block_openssl.cpp | 11 +++++------
+ 1 file changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/src/mongo/crypto/sha1_block_openssl.cpp b/src/mongo/crypto/sha1_block_openssl.cpp
+index ce0cab8e9e..4514c6afc3 100644
+--- a/src/mongo/crypto/sha1_block_openssl.cpp
++++ b/src/mongo/crypto/sha1_block_openssl.cpp
+@@ -70,14 +70,13 @@ namespace mongo {
+ SHA1Block SHA1Block::computeHash(const uint8_t* input, size_t inputLen) {
+     HashType output;
+ 
+-    EVP_MD_CTX digestCtx;
+-    EVP_MD_CTX_init(&digestCtx);
+-    ON_BLOCK_EXIT(EVP_MD_CTX_cleanup, &digestCtx);
++    std::unique_ptr<EVP_MD_CTX, decltype(&EVP_MD_CTX_free)> digestCtx(EVP_MD_CTX_new(),
++                                                                      EVP_MD_CTX_free);
+ 
+     fassert(40379,
+-            EVP_DigestInit_ex(&digestCtx, EVP_sha1(), NULL) == 1 &&
+-                EVP_DigestUpdate(&digestCtx, input, inputLen) == 1 &&
+-                EVP_DigestFinal_ex(&digestCtx, output.data(), NULL) == 1);
++            EVP_DigestInit_ex(digestCtx.get(), EVP_sha1(), NULL) == 1 &&
++                EVP_DigestUpdate(digestCtx.get(), input, inputLen) == 1 &&
++                EVP_DigestFinal_ex(digestCtx.get(), output.data(), NULL) == 1);
+     return SHA1Block(output);
+ }
+ 
+-- 
+2.14.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 8c32e33..44e32cd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@ fix-wt-checksum-on-arm64
 fix-ftbfs-with-gcc-7.patch
 arm64-48bit-va-compat.patch
 fix-mozjs-38-segfaults.patch
+fix-build-with-openssl-1.1.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mongodb/pkg-mongodb.git



More information about the Pkg-mongodb-maintainers mailing list