summaryrefslogtreecommitdiff
path: root/src/HttpRequestCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-09-30 00:50:14 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-09-30 00:50:14 +0900
commit90515dfa50c676df37f440893de6e344fbfd2cdc (patch)
tree257d86e0614b6eb0ea8e9384af3269d60a53dbbc /src/HttpRequestCommand.cc
parent4b94ede268ff2ff793b22a0730dcbda09d280618 (diff)
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.
Diffstat (limited to 'src/HttpRequestCommand.cc')
-rw-r--r--src/HttpRequestCommand.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/HttpRequestCommand.cc b/src/HttpRequestCommand.cc
index d96ead50..0a3f0375 100644
--- a/src/HttpRequestCommand.cc
+++ b/src/HttpRequestCommand.cc
@@ -123,8 +123,7 @@ createHttpRequest(const SharedHandle<Request>& req,
bool HttpRequestCommand::executeInternal() {
//socket->setBlockingMode();
if(getRequest()->getProtocol() == "https") {
- getSocket()->prepareSecureConnection();
- if(!getSocket()->initiateSecureConnection(getRequest()->getHost())) {
+ if(!getSocket()->tlsConnect(getRequest()->getHost())) {
setReadCheckSocketIf(getSocket(), getSocket()->wantRead());
setWriteCheckSocketIf(getSocket(), getSocket()->wantWrite());
getDownloadEngine()->addCommand(this);