Black Pharao Release Fix 5 - OpenSSL 3.x and modern Boost compatibility
Port codebase to build with OpenSSL 3.x and Boost 1.90+: - Rewrite bignum.h to use BIGNUM* pointer instead of inheriting from opaque BIGNUM - Fix ECDSA_SIG, EVP_CIPHER_CTX, HMAC_CTX opaque type access across key.cpp, crypter.cpp, smessage.cpp - Modernize Boost.Asio API (io_context, resolver, executor) in trianglesrpc.cpp - Remove embedded Tor v2 client (incompatible with OpenSSL 3.x), keep Tor v3 SOCKS5 approach - Update header logo to Cryptographic Triangles branding (300x63) - Replace Bittrex exchange link with Pinball (313.cash) across all locales - Fix MSYS2/MinGW64 build: linker flags, Boost library names, miniupnpc static linking Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+12
-11
@@ -13,7 +13,7 @@
|
||||
#include "smessage.h"
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/filesystem/fstream.hpp>
|
||||
#include <boost/filesystem/convenience.hpp>
|
||||
// boost/filesystem/convenience.hpp removed in modern Boost; functionality is in filesystem.hpp
|
||||
#include <boost/interprocess/sync/file_lock.hpp>
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
#include <openssl/crypto.h>
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
using namespace std;
|
||||
using namespace boost;
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
CWallet* pwalletMain;
|
||||
CClientUIInterface uiInterface;
|
||||
@@ -97,7 +98,7 @@ void Shutdown(void* parg)
|
||||
bitdb.Flush(false);
|
||||
StopNode();
|
||||
bitdb.Flush(true);
|
||||
boost::filesystem::remove(GetPidFile());
|
||||
fs::remove(GetPidFile());
|
||||
UnregisterWallet(pwalletMain);
|
||||
delete pwalletMain;
|
||||
NewThread(ExitTimeout, NULL);
|
||||
@@ -147,7 +148,7 @@ bool AppInit(int argc, char* argv[])
|
||||
//
|
||||
// If Qt is used, parameters/triangles.conf are parsed in qt/triangles.cpp's main()
|
||||
ParseParameters(argc, argv);
|
||||
if (!boost::filesystem::is_directory(GetDataDir(false)))
|
||||
if (!fs::is_directory(GetDataDir(false)))
|
||||
{
|
||||
fprintf(stderr, "Error: Specified directory does not exist\n");
|
||||
Shutdown(NULL);
|
||||
@@ -526,11 +527,11 @@ bool AppInit2()
|
||||
std::string strWalletFileName = GetArg("-wallet", "wallet.dat");
|
||||
|
||||
// strWalletFileName must be a plain filename without a directory
|
||||
if (strWalletFileName != boost::filesystem::basename(strWalletFileName) + boost::filesystem::extension(strWalletFileName))
|
||||
if (strWalletFileName != fs::path(strWalletFileName).stem().string() + fs::path(strWalletFileName).extension().string())
|
||||
return InitError(strprintf(_("Wallet %s resides outside data directory %s."), strWalletFileName.c_str(), strDataDir.c_str()));
|
||||
|
||||
// Make sure only a single Triangles process is using the data directory.
|
||||
boost::filesystem::path pathLockFile = GetDataDir() / ".lock";
|
||||
fs::path pathLockFile = GetDataDir() / ".lock";
|
||||
FILE* file = fopen(pathLockFile.string().c_str(), "a"); // empty lock file; created if it doesn't exist.
|
||||
if (file) fclose(file);
|
||||
static boost::interprocess::file_lock lock(pathLockFile.string().c_str());
|
||||
@@ -594,7 +595,7 @@ bool AppInit2()
|
||||
return false;
|
||||
}
|
||||
|
||||
if (filesystem::exists(GetDataDir() / strWalletFileName))
|
||||
if (fs::exists(GetDataDir() / strWalletFileName))
|
||||
{
|
||||
CDBEnv::VerifyResult r = bitdb.Verify(strWalletFileName, CWalletDB::Recover);
|
||||
if (r == CDBEnv::RECOVER_OK)
|
||||
@@ -690,10 +691,10 @@ bool AppInit2()
|
||||
}
|
||||
} else {
|
||||
string automatic_onion;
|
||||
filesystem::path const hostname_path = GetDataDir(
|
||||
fs::path const hostname_path = GetDataDir(
|
||||
) / "onion" / "hostname";
|
||||
if (
|
||||
!filesystem::exists(
|
||||
!fs::exists(
|
||||
hostname_path
|
||||
)
|
||||
) {
|
||||
@@ -891,13 +892,13 @@ bool AppInit2()
|
||||
exit(0);
|
||||
}
|
||||
|
||||
filesystem::path pathBootstrap = GetDataDir() / "bootstrap.dat";
|
||||
if (filesystem::exists(pathBootstrap)) {
|
||||
fs::path pathBootstrap = GetDataDir() / "bootstrap.dat";
|
||||
if (fs::exists(pathBootstrap)) {
|
||||
uiInterface.InitMessage(_("Importing bootstrap blockchain data file."));
|
||||
|
||||
FILE *file = fopen(pathBootstrap.string().c_str(), "rb");
|
||||
if (file) {
|
||||
filesystem::path pathBootstrapOld = GetDataDir() / "bootstrap.dat.old";
|
||||
fs::path pathBootstrapOld = GetDataDir() / "bootstrap.dat.old";
|
||||
LoadExternalBlockFile(file);
|
||||
RenameOver(pathBootstrap, pathBootstrapOld);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user