summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-10-16 08:09:03 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-10-16 08:09:03 (GMT)
commit9e6b127cf35319b0e89d4d6f4dff55a80ce03c02 (patch)
tree82bc0006bf3d5648ed813d9ddcfc01c1ef404f46 /Swiften/Client/CoreClient.cpp
parent3a60cfec978c512c7b4bbe6c04a0ca3fbdf1e51e (diff)
downloadswift-contrib-9e6b127cf35319b0e89d4d6f4dff55a80ce03c02.zip
swift-contrib-9e6b127cf35319b0e89d4d6f4dff55a80ce03c02.tar.bz2
Hoist TLSContextFactory creation out of Client.
Diffstat (limited to 'Swiften/Client/CoreClient.cpp')
-rw-r--r--Swiften/Client/CoreClient.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/Swiften/Client/CoreClient.cpp b/Swiften/Client/CoreClient.cpp
index 22e3612..2a66905 100644
--- a/Swiften/Client/CoreClient.cpp
+++ b/Swiften/Client/CoreClient.cpp
@@ -14,7 +14,6 @@
#include <Swiften/Base/foreach.h>
#include <Swiften/Base/Algorithm.h>
#include <Swiften/Client/ClientSession.h>
-#include <Swiften/TLS/PlatformTLSFactories.h>
#include <Swiften/TLS/CertificateVerificationError.h>
#include <Swiften/Network/ChainedConnector.h>
#include <Swiften/Network/NetworkFactories.h>
@@ -37,12 +36,10 @@ CoreClient::CoreClient(const JID& jid, const SafeByteArray& password, NetworkFac
iqRouter_ = new IQRouter(stanzaChannel_);
iqRouter_->setJID(jid);
- tlsFactories = new PlatformTLSFactories();
}
CoreClient::~CoreClient() {
forceReset();
- delete tlsFactories;
delete iqRouter_;
stanzaChannel_->onAvailableChanged.disconnect(boost::bind(&CoreClient::handleStanzaChannelAvailableChanged, this, _1));
@@ -94,7 +91,7 @@ void CoreClient::handleConnectorFinished(boost::shared_ptr<Connection> connectio
connection_ = connection;
assert(!sessionStream_);
- sessionStream_ = boost::make_shared<BasicSessionStream>(ClientStreamType, connection_, getPayloadParserFactories(), getPayloadSerializers(), tlsFactories->getTLSContextFactory(), networkFactories->getTimerFactory(), networkFactories->getXMLParserFactory());
+ sessionStream_ = boost::make_shared<BasicSessionStream>(ClientStreamType, connection_, getPayloadParserFactories(), getPayloadSerializers(), networkFactories->getTLSContextFactory(), networkFactories->getTimerFactory(), networkFactories->getXMLParserFactory());
if (!certificate_.empty()) {
sessionStream_->setTLSCertificate(PKCS12Certificate(certificate_, password_));
}