[BW]: [Fix] Looks like OpenSSL_config argument doesn't refer to configuration file path, which can be passed only through environment variable unfortunetly.

This commit is contained in:
vogel76 2014-06-03 17:03:28 +02:00
parent 3e4f4b0d4c
commit 57e1d60257

View file

@ -4,6 +4,7 @@
#include <boost/filesystem/path.hpp>
#include <cstdlib>
#include <string>
namespace fc
@ -15,8 +16,16 @@ namespace fc
{
ERR_load_crypto_strings();
OpenSSL_add_all_algorithms();
const boost::filesystem::path& boostPath = _configurationFilePath;
OPENSSL_config(boostPath.empty() ? nullptr : _configurationFilePath.to_native_ansi_path().c_str());
if(boostPath.empty() == false)
{
std::string varSetting("OPENSSL_CONF=");
varSetting += _configurationFilePath.to_native_ansi_path();
putenv(varSetting.c_str());
}
OPENSSL_config(nullptr);
}
~openssl_scope()