1
mirror of https://github.com/monero-project/monero synced 2024-11-19 20:36:50 +01:00

Merge pull request #2696

937e7f8a Initialize openssl on startup (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2017-11-14 15:13:43 +02:00
commit 8df6b010eb
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD
10 changed files with 21 additions and 1 deletions

View File

@ -549,6 +549,13 @@ std::string get_nix_version_display_string()
if (!strcmp(ver, "2.25"))
MCLOG_RED(el::Level::Warning, "global", "Running with glibc " << ver << ", hangs may occur - change glibc version if possible");
#endif
#if OPENSSL_VERSION_NUMBER < 0x10100000
SSL_library_init();
#else
OPENSSL_init_ssl(0, NULL);
#endif
return true;
}
void set_strict_default_file_permissions(bool strict)

View File

@ -71,7 +71,7 @@ int main(int argc, char* argv[])
TRY_ENTRY();
tools::on_startup();
string_tools::set_module_name_and_folder(argv[0]);
//set up logging options

View File

@ -47,6 +47,7 @@ namespace
int main(int argc, char* argv[])
{
TRY_ENTRY();
tools::on_startup();
epee::string_tools::set_module_name_and_folder(argv[0]);
//set up logging options

View File

@ -34,6 +34,7 @@
using namespace epee;
#include "common/command_line.h"
#include "common/util.h"
#include "transactions_flow_test.h"
namespace po = boost::program_options;
@ -58,6 +59,7 @@ namespace
int main(int argc, char* argv[])
{
TRY_ENTRY();
tools::on_startup();
string_tools::set_module_name_and_folder(argv[0]);
//set up logging options

View File

@ -29,6 +29,7 @@
#include <boost/program_options.hpp>
#include "include_base_utils.h"
#include "common/command_line.h"
#include "common/util.h"
#include "fuzzer.h"
#if (!defined(__clang__) || (__clang__ < 5))
@ -48,6 +49,7 @@ using namespace boost::program_options;
int run_fuzzer(int argc, const char **argv, Fuzzer &fuzzer)
{
TRY_ENTRY();
tools::on_startup();
string_tools::set_module_name_and_folder(argv[0]);
//set up logging options

View File

@ -33,6 +33,7 @@
#include "wallet/wallet2_api.h"
#include "wallet/wallet2.h"
#include "include_base_utils.h"
#include "common/util.h"
#include <boost/chrono/chrono.hpp>
#include <boost/filesystem.hpp>
@ -1138,6 +1139,7 @@ TEST_F(WalletManagerMainnetTest, RecoverAndRefreshWalletMainNetAsync)
int main(int argc, char** argv)
{
tools::on_startup();
// we can override default values for "TESTNET_DAEMON_ADDRESS" and "WALLETS_ROOT_DIR"
const char * testnet_daemon_addr = std::getenv("TESTNET_DAEMON_ADDRESS");

View File

@ -628,6 +628,7 @@ TEST_F(net_load_test_clt, permament_open_and_close_and_connections_closed_by_ser
int main(int argc, char** argv)
{
tools::on_startup();
epee::debug::get_set_enable_assert(true, false);
//set up logging options
mlog_configure(mlog_get_default_log_path("net_load_tests_clt.log"), true);

View File

@ -215,6 +215,7 @@ namespace
int main(int argc, char** argv)
{
tools::on_startup();
//set up logging options
mlog_configure(mlog_get_default_log_path("net_load_tests_srv.log"), true);

View File

@ -28,6 +28,7 @@
//
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
#include "common/util.h"
#include "performance_tests.h"
#include "performance_utils.h"
@ -48,6 +49,7 @@
int main(int argc, char** argv)
{
tools::on_startup();
set_process_affinity(1);
set_thread_high_priority();

View File

@ -35,6 +35,7 @@
#include "include_base_utils.h"
#include "common/command_line.h"
#include "common/util.h"
#include "unit_tests_utils.h"
namespace po = boost::program_options;
@ -43,6 +44,7 @@ boost::filesystem::path unit_test::data_dir;
int main(int argc, char** argv)
{
tools::on_startup();
epee::string_tools::set_module_name_and_folder(argv[0]);
mlog_configure(mlog_get_default_log_path("unit_tests.log"), true);
epee::debug::get_set_enable_assert(true, false);