From 2d51fd7321c3107a2cf1110878daa50fa4121717 Mon Sep 17 00:00:00 2001 From: Gandalf-the-Grey Date: Tue, 22 Jul 2014 10:04:55 -0400 Subject: [PATCH 1/3] Fix compile fc on Win64 tcp_socket needs a bit (two dozens of) more space. --- include/fc/network/tcp_socket.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fc/network/tcp_socket.hpp b/include/fc/network/tcp_socket.hpp index 1159654..384b65d 100644 --- a/include/fc/network/tcp_socket.hpp +++ b/include/fc/network/tcp_socket.hpp @@ -49,7 +49,7 @@ namespace fc { friend class tcp_server; class impl; #ifdef _WIN64 - fc::fwd my; + fc::fwd my; #else fc::fwd my; #endif From 4890351b34d8660512cbe6c697a28234b7f21c21 Mon Sep 17 00:00:00 2001 From: PaulEU Date: Wed, 23 Jul 2014 00:18:09 +0200 Subject: [PATCH 2/3] Added OpenSSL configuration file path. (qt_wallet issue #10 Some clients on Windows 7 quit/crash on start) --- include/fc/crypto/openssl.hpp | 2 +- include/fc/filesystem.hpp | 3 +++ src/crypto/openssl.cpp | 10 ++++++++-- src/filesystem.cpp | 6 ++++++ 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/include/fc/crypto/openssl.hpp b/include/fc/crypto/openssl.hpp index 0bf0fe8..5811390 100644 --- a/include/fc/crypto/openssl.hpp +++ b/include/fc/crypto/openssl.hpp @@ -58,7 +58,7 @@ namespace fc /** Allows to explicitly specify OpenSSL configuration file path to be loaded at OpenSSL library init. If not set OpenSSL will try to load the conf. file (openssl.cnf) from the path it was - configured with what caused serious Keyhotee startup bugs on some Win7 machines. + configured with what caused serious Keyhotee startup bugs on some Win7, Win8 machines. \warning to be effective this method should be used before any part using OpenSSL, especially before init_openssl call */ diff --git a/include/fc/filesystem.hpp b/include/fc/filesystem.hpp index d67cdd8..d655d68 100644 --- a/include/fc/filesystem.hpp +++ b/include/fc/filesystem.hpp @@ -165,6 +165,9 @@ namespace fc { */ const path& app_path(); + /** @return application executable path */ + const fc::path& current_path(); + class variant; void to_variant( const fc::path&, fc::variant& ); void from_variant( const fc::variant& , fc::path& ); diff --git a/src/crypto/openssl.cpp b/src/crypto/openssl.cpp index 14a0b80..36a3889 100644 --- a/src/crypto/openssl.cpp +++ b/src/crypto/openssl.cpp @@ -49,7 +49,13 @@ namespace fc int init_openssl() { - static openssl_scope ossl; - return 0; + auto strAppDir = current_path(); + fc::path appDir(strAppDir); + fc::path openSSLConf = appDir / "openssl.cnf"; + if (fc::exists(openSSLConf)) + fc::store_configuration_path(openSSLConf); + + static openssl_scope ossl; + return 0; } } diff --git a/src/filesystem.cpp b/src/filesystem.cpp index 2dd961a..459d22b 100644 --- a/src/filesystem.cpp +++ b/src/filesystem.cpp @@ -421,4 +421,10 @@ namespace fc { #endif return appdir; } + + const fc::path& current_path() + { + static fc::path appCurrentPath = boost::filesystem::current_path(); + return appCurrentPath; + } } From 9aa7700d0686dea2a4f6422b31732c142abd368d Mon Sep 17 00:00:00 2001 From: Gandalf-the-Grey Date: Wed, 23 Jul 2014 10:15:46 -0400 Subject: [PATCH 3/3] Fix for Linux needed to build Keyhotee. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3b0ed56..fb27c3c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -202,6 +202,7 @@ ELSE() IF(APPLE) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++ -Wall") ELSE() + target_compile_options(fc PUBLIC -std=c++11 -Wall -fnon-call-exceptions) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -fnon-call-exceptions") ENDIF() ENDIF()