mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-28 23:15:52 +00:00
Need working ways to specify the key, cert, and chain.
This commit is contained in:
@@ -41,6 +41,8 @@
|
||||
#define SECTION_WEBSOCKET_PORT "websocket_port"
|
||||
#define SECTION_WEBSOCKET_SECURE "websocket_secure"
|
||||
#define SECTION_WEBSOCKET_SSL_CERT "websocket_ssl_cert"
|
||||
#define SECTION_WEBSOCKET_SSL_CHAIN "websocket_ssl_chain"
|
||||
#define SECTION_WEBSOCKET_SSL_KEY "websocket_ssl_key"
|
||||
#define SECTION_VALIDATORS "validators"
|
||||
#define SECTION_VALIDATORS_SITE "validators_site"
|
||||
|
||||
@@ -263,6 +265,8 @@ void Config::load()
|
||||
WEBSOCKET_SECURE = boost::lexical_cast<bool>(strTemp);
|
||||
|
||||
sectionSingleB(secConfig, SECTION_WEBSOCKET_SSL_CERT, WEBSOCKET_SSL_CERT);
|
||||
sectionSingleB(secConfig, SECTION_WEBSOCKET_SSL_CHAIN, WEBSOCKET_SSL_CHAIN);
|
||||
sectionSingleB(secConfig, SECTION_WEBSOCKET_SSL_KEY, WEBSOCKET_SSL_KEY);
|
||||
|
||||
|
||||
if (sectionSingleB(secConfig, SECTION_VALIDATION_SEED, strTemp))
|
||||
|
||||
@@ -94,6 +94,7 @@ public:
|
||||
bool WEBSOCKET_SECURE;
|
||||
std::string WEBSOCKET_SSL_CERT;
|
||||
std::string WEBSOCKET_SSL_CHAIN;
|
||||
std::string WEBSOCKET_SSL_KEY;
|
||||
|
||||
// RPC parameters
|
||||
std::string RPC_IP;
|
||||
|
||||
@@ -138,7 +138,9 @@ public:
|
||||
boost::asio::ssl::context::single_dh_use);
|
||||
// context->set_password_callback(boost::bind(&type::get_password, this));
|
||||
if (!theConfig.WEBSOCKET_SSL_CERT.empty())
|
||||
context->use_private_key_file(theConfig.WEBSOCKET_SSL_CERT, boost::asio::ssl::context::pem);
|
||||
context->use_certificate_file(theConfig.WEBSOCKET_SSL_CERT, boost::asio::ssl::context::pem);
|
||||
if (!theConfig.WEBSOCKET_SSL_KEY.empty())
|
||||
context->use_private_key_file(theConfig.WEBSOCKET_SSL_KEY, boost::asio::ssl::context::pem);
|
||||
if (!theConfig.WEBSOCKET_SSL_CHAIN.empty())
|
||||
context->use_certificate_chain_file(theConfig.WEBSOCKET_SSL_CHAIN);
|
||||
//context->use_tmp_dh_file("../../src/ssl/dh512.pem");
|
||||
|
||||
Reference in New Issue
Block a user