diff options
Diffstat (limited to 'Swiften/Client')
-rw-r--r-- | Swiften/Client/CoreClient.cpp | 8 | ||||
-rw-r--r-- | Swiften/Client/CoreClient.h | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/Swiften/Client/CoreClient.cpp b/Swiften/Client/CoreClient.cpp index 7bde017..2c3ab35 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/TLS/PlatformTLSContextFactory.h" +#include "Swiften/TLS/PlatformTLSFactories.h" #include "Swiften/TLS/CertificateVerificationError.h" #include "Swiften/Network/Connector.h" #include "Swiften/Network/BoostConnectionFactory.h" @@ -34,14 +34,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); - tlsContextFactory_ = new PlatformTLSContextFactory(); + tlsFactories = new PlatformTLSFactories(); } CoreClient::~CoreClient() { if (session_ || connection_) { std::cerr << "Warning: Client not disconnected properly" << std::endl; } - delete tlsContextFactory_; + delete tlsFactories; delete timerFactory_; delete connectionFactory_; delete iqRouter_; @@ -82,7 +82,7 @@ void CoreClient::handleConnectorFinished(boost::shared_ptr<Connection> connectio connection_ = connection; assert(!sessionStream_); - sessionStream_ = boost::shared_ptr<BasicSessionStream>(new BasicSessionStream(ClientStreamType, connection_, &payloadParserFactories_, &payloadSerializers_, tlsContextFactory_, timerFactory_)); + sessionStream_ = boost::shared_ptr<BasicSessionStream>(new BasicSessionStream(ClientStreamType, connection_, &payloadParserFactories_, &payloadSerializers_, tlsFactories->getTLSContextFactory(), timerFactory_)); if (!certificate_.isEmpty()) { sessionStream_->setTLSCertificate(PKCS12Certificate(certificate_, password_)); } diff --git a/Swiften/Client/CoreClient.h b/Swiften/Client/CoreClient.h index 780201d..211f84f 100644 --- a/Swiften/Client/CoreClient.h +++ b/Swiften/Client/CoreClient.h @@ -32,6 +32,7 @@ namespace Swift { class ClientSession; class BasicSessionStream; class EventLoop; + class PlatformTLSFactories; class CertificateTrustChecker; /** @@ -201,7 +202,7 @@ namespace Swift { Connector::ref connector_; ConnectionFactory* connectionFactory_; TimerFactory* timerFactory_; - TLSContextFactory* tlsContextFactory_; + PlatformTLSFactories* tlsFactories; FullPayloadParserFactoryCollection payloadParserFactories_; FullPayloadSerializerCollection payloadSerializers_; boost::shared_ptr<Connection> connection_; |