summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-11-07 10:41:22 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-11-07 10:41:22 (GMT)
commit52c716c657cf4f5b0a5767f59dc7ddb04261f534 (patch)
tree37d62ff65227746c184fbb0eac011d0577f199d7 /Swiften/Client
parentbec14a3e051a97f543175a8bdcc2c1c6fd18ce77 (diff)
downloadswift-contrib-52c716c657cf4f5b0a5767f59dc7ddb04261f534.zip
swift-contrib-52c716c657cf4f5b0a5767f59dc7ddb04261f534.tar.bz2
Refactored TLS handling.
TLSLayer is now independent of TLS implementation. The implementation-specifics are now in TLSContext and TLSContextFactory.
Diffstat (limited to 'Swiften/Client')
-rw-r--r--Swiften/Client/CoreClient.cpp8
-rw-r--r--Swiften/Client/CoreClient.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/Swiften/Client/CoreClient.cpp b/Swiften/Client/CoreClient.cpp
index d9b21bc..214e6b1 100644
--- a/Swiften/Client/CoreClient.cpp
+++ b/Swiften/Client/CoreClient.cpp
@@ -11,7 +11,7 @@
#include "Swiften/Network/MainBoostIOServiceThread.h"
#include "Swiften/Network/BoostIOServiceThread.h"
#include "Swiften/Client/ClientSession.h"
-#include "Swiften/StreamStack/PlatformTLSLayerFactory.h"
+#include "Swiften/TLS/PlatformTLSContextFactory.h"
#include "Swiften/Network/Connector.h"
#include "Swiften/Network/BoostConnectionFactory.h"
#include "Swiften/Network/BoostTimerFactory.h"
@@ -33,14 +33,14 @@ CoreClient::CoreClient(EventLoop* eventLoop, const JID& jid, const String& passw
iqRouter_ = new IQRouter(stanzaChannel_);
connectionFactory_ = new BoostConnectionFactory(&MainBoostIOServiceThread::getInstance().getIOService(), eventLoop);
timerFactory_ = new BoostTimerFactory(&MainBoostIOServiceThread::getInstance().getIOService(), eventLoop);
- tlsLayerFactory_ = new PlatformTLSLayerFactory();
+ tlsContextFactory_ = new PlatformTLSContextFactory();
}
CoreClient::~CoreClient() {
if (session_ || connection_) {
std::cerr << "Warning: Client not disconnected properly" << std::endl;
}
- delete tlsLayerFactory_;
+ delete tlsContextFactory_;
delete timerFactory_;
delete connectionFactory_;
delete iqRouter_;
@@ -81,7 +81,7 @@ void CoreClient::handleConnectorFinished(boost::shared_ptr<Connection> connectio
connection_ = connection;
assert(!sessionStream_);
- sessionStream_ = boost::shared_ptr<BasicSessionStream>(new BasicSessionStream(ClientStreamType, connection_, &payloadParserFactories_, &payloadSerializers_, tlsLayerFactory_, timerFactory_));
+ sessionStream_ = boost::shared_ptr<BasicSessionStream>(new BasicSessionStream(ClientStreamType, connection_, &payloadParserFactories_, &payloadSerializers_, tlsContextFactory_, timerFactory_));
if (!certificate_.isEmpty()) {
sessionStream_->setTLSCertificate(PKCS12Certificate(certificate_, password_));
}
diff --git a/Swiften/Client/CoreClient.h b/Swiften/Client/CoreClient.h
index 2b7113f..4170e8d 100644
--- a/Swiften/Client/CoreClient.h
+++ b/Swiften/Client/CoreClient.h
@@ -26,7 +26,7 @@
namespace Swift {
class IQRouter;
- class TLSLayerFactory;
+ class TLSContextFactory;
class ConnectionFactory;
class TimerFactory;
class ClientSession;
@@ -198,7 +198,7 @@ namespace Swift {
Connector::ref connector_;
ConnectionFactory* connectionFactory_;
TimerFactory* timerFactory_;
- TLSLayerFactory* tlsLayerFactory_;
+ TLSContextFactory* tlsContextFactory_;
FullPayloadParserFactoryCollection payloadParserFactories_;
FullPayloadSerializerCollection payloadSerializers_;
boost::shared_ptr<Connection> connection_;