Upgrade depends OpenSSL to 3.5 LTS
This commit is contained in:
@@ -53,6 +53,8 @@
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <openssl/crypto.h>
|
||||
|
||||
#ifndef WIN32
|
||||
#include <signal.h>
|
||||
#endif
|
||||
@@ -1055,7 +1057,11 @@ bool AppInit2()
|
||||
ShrinkDebugFile();
|
||||
LogPrintf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
|
||||
LogPrintf("Agrarian version %s (%s)\n", FormatFullVersion(), CLIENT_DATE);
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
LogPrintf("Using OpenSSL version %s\n", OpenSSL_version(OPENSSL_VERSION));
|
||||
#else
|
||||
LogPrintf("Using OpenSSL version %s\n", SSLeay_version(SSLEAY_VERSION));
|
||||
#endif
|
||||
#ifdef ENABLE_WALLET
|
||||
LogPrintf("Using BerkeleyDB version %s\n", DbEnv::version(0, 0, 0));
|
||||
#endif
|
||||
|
||||
@@ -116,9 +116,18 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c
|
||||
|
||||
// The first cert is the signing cert, the rest are untrusted certs that chain
|
||||
// to a valid root authority. OpenSSL needs them separately.
|
||||
STACK_OF(X509)* chain = sk_X509_new_null();
|
||||
STACK_OF(X509)* chain =
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
reinterpret_cast<STACK_OF(X509)*>(OPENSSL_sk_new_null());
|
||||
#else
|
||||
sk_X509_new_null();
|
||||
#endif
|
||||
for (int i = certs.size() - 1; i > 0; i--) {
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
OPENSSL_sk_push(reinterpret_cast<OPENSSL_STACK*>(chain), reinterpret_cast<void*>(certs[i]));
|
||||
#else
|
||||
sk_X509_push(chain, certs[i]);
|
||||
#endif
|
||||
}
|
||||
X509* signing_cert = certs[0];
|
||||
|
||||
@@ -159,9 +168,9 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c
|
||||
EVP_MD_CTX _ctx;
|
||||
EVP_MD_CTX *ctx;
|
||||
ctx = &_ctx;
|
||||
EVP_MD_CTX_init(ctx);
|
||||
#endif
|
||||
EVP_PKEY* pubkey = X509_get_pubkey(signing_cert);
|
||||
EVP_MD_CTX_init(ctx);
|
||||
if (!EVP_VerifyInit_ex(ctx, digestAlgorithm, NULL) ||
|
||||
!EVP_VerifyUpdate(ctx, data_to_verify.data(), data_to_verify.size()) ||
|
||||
!EVP_VerifyFinal(ctx, (const unsigned char*)paymentRequest.signature().data(), paymentRequest.signature().size(), pubkey)) {
|
||||
|
||||
@@ -286,7 +286,11 @@ RPCConsole::RPCConsole(QWidget* parent) : QDialog(parent, Qt::WindowSystemMenuHi
|
||||
connect(ui->btn_resync, SIGNAL(clicked()), this, SLOT(walletResync()));
|
||||
|
||||
// set library version labels
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
ui->openSSLVersion->setText(OpenSSL_version(OPENSSL_VERSION));
|
||||
#else
|
||||
ui->openSSLVersion->setText(SSLeay_version(SSLEAY_VERSION));
|
||||
#endif
|
||||
#ifdef ENABLE_WALLET
|
||||
std::string strPathCustom = GetArg("-backuppath", "");
|
||||
std::string strzAGRPathCustom = GetArg("-zagrbackuppath", "");
|
||||
|
||||
Reference in New Issue
Block a user