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/Component
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/Component')
-rw-r--r--Swiften/Component/CoreComponent.cpp5
-rw-r--r--Swiften/Component/CoreComponent.h2
2 files changed, 1 insertions, 6 deletions
diff --git a/Swiften/Component/CoreComponent.cpp b/Swiften/Component/CoreComponent.cpp
index af6ebe5..2821dd2 100644
--- a/Swiften/Component/CoreComponent.cpp
+++ b/Swiften/Component/CoreComponent.cpp
@@ -11,7 +11,6 @@
#include "Swiften/Network/MainBoostIOServiceThread.h"
#include "Swiften/Network/BoostIOServiceThread.h"
#include "Swiften/Component/ComponentSession.h"
-#include "Swiften/StreamStack/NullTLSLayerFactory.h"
#include "Swiften/Network/Connector.h"
#include "Swiften/Network/BoostConnectionFactory.h"
#include "Swiften/Network/BoostTimerFactory.h"
@@ -33,14 +32,12 @@ CoreComponent::CoreComponent(EventLoop* eventLoop, const JID& jid, const String&
iqRouter_->setFrom(jid);
connectionFactory_ = new BoostConnectionFactory(&MainBoostIOServiceThread::getInstance().getIOService(), eventLoop);
timerFactory_ = new BoostTimerFactory(&MainBoostIOServiceThread::getInstance().getIOService(), eventLoop);
- tlsLayerFactory_ = new NullTLSLayerFactory();
}
CoreComponent::~CoreComponent() {
if (session_ || connection_) {
std::cerr << "Warning: Component not disconnected properly" << std::endl;
}
- delete tlsLayerFactory_;
delete timerFactory_;
delete connectionFactory_;
delete iqRouter_;
@@ -72,7 +69,7 @@ void CoreComponent::handleConnectorFinished(boost::shared_ptr<Connection> connec
connection_ = connection;
assert(!sessionStream_);
- sessionStream_ = boost::shared_ptr<BasicSessionStream>(new BasicSessionStream(ComponentStreamType, connection_, &payloadParserFactories_, &payloadSerializers_, tlsLayerFactory_, timerFactory_));
+ sessionStream_ = boost::shared_ptr<BasicSessionStream>(new BasicSessionStream(ComponentStreamType, connection_, &payloadParserFactories_, &payloadSerializers_, NULL, timerFactory_));
sessionStream_->onDataRead.connect(boost::bind(&CoreComponent::handleDataRead, this, _1));
sessionStream_->onDataWritten.connect(boost::bind(&CoreComponent::handleDataWritten, this, _1));
sessionStream_->initialize();
diff --git a/Swiften/Component/CoreComponent.h b/Swiften/Component/CoreComponent.h
index 75e6bda..59466f7 100644
--- a/Swiften/Component/CoreComponent.h
+++ b/Swiften/Component/CoreComponent.h
@@ -25,7 +25,6 @@
namespace Swift {
class IQRouter;
- class TLSLayerFactory;
class ConnectionFactory;
class TimerFactory;
class ComponentSession;
@@ -97,7 +96,6 @@ namespace Swift {
ComponentConnector::ref connector_;
ConnectionFactory* connectionFactory_;
TimerFactory* timerFactory_;
- TLSLayerFactory* tlsLayerFactory_;
FullPayloadParserFactoryCollection payloadParserFactories_;
FullPayloadSerializerCollection payloadSerializers_;
boost::shared_ptr<Connection> connection_;