diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-01-05 10:26:42 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-01-05 10:28:47 +0100 |
commit | 70145064153aae87245c35e009282e5198e3f60f (patch) | |
tree | c4d8e6f843342f12cc3d8855c7949c77a9633414 | |
parent | 7dac1e5e9e887f5f6ff146e812a05bd3bf281eae (diff) | |
parent | 0388afe69dd85ca9549727ee105ba7017169b464 (diff) |
Merge #9475: Let autoconf detect presence of EVP_MD_CTX_new
0388afe Let autoconf detect presence of EVP_MD_CTX_new (Luke Dashjr)
-rw-r--r-- | configure.ac | 7 | ||||
-rw-r--r-- | src/qt/paymentrequestplus.cpp | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 73414c633d..4723c69d5d 100644 --- a/configure.ac +++ b/configure.ac @@ -835,6 +835,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 5101e4e0ee..01ec416613 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 |