summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2017-01-04 18:37:51 +0000
committerAnthony G. Basile <blueness@gentoo.org>2017-01-05 09:07:54 -0500
commit31ab6249b3a35002038c6c7f0a4e33cf482aff88 (patch)
treee0d551843401de1a420bd364570b1e09fb03ca8d /net-p2p/bitcoin-qt
parentdev-libs/libsecp256k1: Implement suggestions re asm & doc USE flags, and gmp ... (diff)
downloadgentoo-31ab6249b3a35002038c6c7f0a4e33cf482aff88.tar.gz
gentoo-31ab6249b3a35002038c6c7f0a4e33cf482aff88.tar.bz2
gentoo-31ab6249b3a35002038c6c7f0a4e33cf482aff88.zip
net-p2p/bitcoin-qt: Backport LibreSSL fix for 0.13.2
Diffstat (limited to 'net-p2p/bitcoin-qt')
-rw-r--r--net-p2p/bitcoin-qt/bitcoin-qt-0.13.2.ebuild2
-rw-r--r--net-p2p/bitcoin-qt/files/0.13.2-libressl.patch48
2 files changed, 50 insertions, 0 deletions
diff --git a/net-p2p/bitcoin-qt/bitcoin-qt-0.13.2.ebuild b/net-p2p/bitcoin-qt/bitcoin-qt-0.13.2.ebuild
index 30cc24aa0700..45b5c9411517 100644
--- a/net-p2p/bitcoin-qt/bitcoin-qt-0.13.2.ebuild
+++ b/net-p2p/bitcoin-qt/bitcoin-qt-0.13.2.ebuild
@@ -79,6 +79,8 @@ src_prepare() {
sed "s/locale\/${filt}/bitcoin.qrc/" -i 'src/Makefile.qt.include' || die
einfo "Languages -- Enabled:$yeslang -- Disabled:$nolang"
+ epatch "${FILESDIR}/0.13.2-libressl.patch"
+
bitcoincore_autoreconf
}
diff --git a/net-p2p/bitcoin-qt/files/0.13.2-libressl.patch b/net-p2p/bitcoin-qt/files/0.13.2-libressl.patch
new file mode 100644
index 000000000000..415adcc59eae
--- /dev/null
+++ b/net-p2p/bitcoin-qt/files/0.13.2-libressl.patch
@@ -0,0 +1,48 @@
+commit 0388afe69dd85ca9549727ee105ba7017169b464 (HEAD -> EVP_MD_CTX_new, personal-github/EVP_MD_CTX_new)
+Author: Luke Dashjr <luke-jr+git@utopios.org>
+Date: Wed Jan 4 17:07:42 2017 +0000
+
+ Let autoconf detect presence of EVP_MD_CTX_new
+
+ Fixes LibreSSL compatibility
+
+diff --git a/configure.ac b/configure.ac
+index ced258e..02af0d6 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -832,6 +832,13 @@ else
+ fi
+ fi
+
++save_CXXFLAGS="${CXXFLAGS}"
++CXXFLAGS="${CXXFLAGS} ${CRYPTO_CFLAGS} ${SSL_CFLAGS}"
++AC_CHECK_DECLS([EVP_MD_CTX_new],,,[AC_INCLUDES_DEFAULT
++#include <openssl/x509_vfy.h>
++])
++CXXFLAGS="${save_CXXFLAGS}"
++
+ dnl univalue check
+
+ need_bundled_univalue=yes
+diff --git a/src/qt/paymentrequestplus.cpp b/src/qt/paymentrequestplus.cpp
+index 82be4d8..0d4907b 100644
+--- a/src/qt/paymentrequestplus.cpp
++++ b/src/qt/paymentrequestplus.cpp
+@@ -159,7 +159,7 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c
+ std::string data_to_verify; // Everything but the signature
+ rcopy.SerializeToString(&data_to_verify);
+
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++#if HAVE_DECL_EVP_MD_CTX_NEW
+ EVP_MD_CTX *ctx = EVP_MD_CTX_new();
+ if (!ctx) throw SSLVerifyError("Error allocating OpenSSL context.");
+ #else
+@@ -174,7 +174,7 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c
+ !EVP_VerifyFinal(ctx, (const unsigned char*)paymentRequest.signature().data(), (unsigned int)paymentRequest.signature().size(), pubkey)) {
+ throw SSLVerifyError("Bad signature, invalid payment request.");
+ }
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++#if HAVE_DECL_EVP_MD_CTX_NEW
+ EVP_MD_CTX_free(ctx);
+ #endif
+