From 90515dfa50c676df37f440893de6e344fbfd2cdc Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 30 Sep 2012 00:50:14 +0900 Subject: RPC over SSL/TLS transport To enable RPC over SSL/TLS, specify server certificate and private key using --rpc-certificate and --rpc-private-key options and enable --rpc-secure option. After the encryption is enabled, use https and wss scheme to access RPC server. --- src/OptionHandlerFactory.cc | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/OptionHandlerFactory.cc') diff --git a/src/OptionHandlerFactory.cc b/src/OptionHandlerFactory.cc index 3d440741..562f947b 100644 --- a/src/OptionHandlerFactory.cc +++ b/src/OptionHandlerFactory.cc @@ -747,6 +747,15 @@ std::vector OptionHandlerFactory::createOptionHandlers() op->addTag(TAG_RPC); handlers.push_back(op); } + { + OptionHandler* op(new LocalFilePathOptionHandler + (PREF_RPC_CERTIFICATE, + TEXT_RPC_CERTIFICATE, + NO_DEFAULT_VALUE, + false)); + op->addTag(TAG_RPC); + handlers.push_back(op); + } { OptionHandler* op(new BooleanOptionHandler (PREF_RPC_LISTEN_ALL, @@ -774,6 +783,24 @@ std::vector OptionHandlerFactory::createOptionHandlers() op->addTag(TAG_RPC); handlers.push_back(op); } + { + OptionHandler* op(new LocalFilePathOptionHandler + (PREF_RPC_PRIVATE_KEY, + TEXT_RPC_PRIVATE_KEY, + NO_DEFAULT_VALUE, + false)); + op->addTag(TAG_RPC); + handlers.push_back(op); + } + { + OptionHandler* op(new BooleanOptionHandler + (PREF_RPC_SECURE, + TEXT_RPC_SECURE, + A2_V_FALSE, + OptionHandler::OPT_ARG)); + op->addTag(TAG_RPC); + handlers.push_back(op); + } { OptionHandler* op(new DefaultOptionHandler (PREF_RPC_USER, -- cgit