mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-23 03:55:49 +00:00
Refactor jtx::Env:
These changes eliminate the Env's OpenLedger member and make transactions go through the Application associated with each instance of the Env, making the unit tests follow a code path closer to the production code path. * Add Env::open() for open ledger * Add Env::now() * Rename to Env::current() * Inject ManualTimeKeeper in Env Application * Make Config mutable * Move setupConfigForUnitTests * Launch Env Application thread * Use Application ledgers in Env * Adjust Application clock on ledger close * Adjust close time for close resolution * Scrub obsolete clock types * Enable features via Env ctor * Make Env::master Account object global * Cache SSL context (performance) * Cache master wallet keys in Ledger ctor (performance)
This commit is contained in:
@@ -514,15 +514,20 @@ initAuthenticated (boost::asio::ssl::context& context,
|
||||
std::shared_ptr<boost::asio::ssl::context>
|
||||
make_SSLContext()
|
||||
{
|
||||
std::shared_ptr<boost::asio::ssl::context> context =
|
||||
std::make_shared<boost::asio::ssl::context> (
|
||||
boost::asio::ssl::context::sslv23);
|
||||
// By default, allow anonymous DH.
|
||||
openssl::detail::initAnonymous (
|
||||
*context, "ALL:!LOW:!EXP:!MD5:@STRENGTH");
|
||||
// VFALCO NOTE, It seems the WebSocket context never has
|
||||
// set_verify_mode called, for either setting of WEBSOCKET_SECURE
|
||||
context->set_verify_mode (boost::asio::ssl::verify_none);
|
||||
static auto const context =
|
||||
[]()
|
||||
{
|
||||
auto const context = std::make_shared<
|
||||
boost::asio::ssl::context>(
|
||||
boost::asio::ssl::context::sslv23);
|
||||
// By default, allow anonymous DH.
|
||||
openssl::detail::initAnonymous(
|
||||
*context, "ALL:!LOW:!EXP:!MD5:@STRENGTH");
|
||||
// VFALCO NOTE, It seems the WebSocket context never has
|
||||
// set_verify_mode called, for either setting of WEBSOCKET_SECURE
|
||||
context->set_verify_mode(boost::asio::ssl::verify_none);
|
||||
return context;
|
||||
}();
|
||||
return context;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user