diff options
Diffstat (limited to 'Swiften/Network/BOSHConnection.cpp')
-rw-r--r-- | Swiften/Network/BOSHConnection.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Swiften/Network/BOSHConnection.cpp b/Swiften/Network/BOSHConnection.cpp index b4ffa7d..4bbb121 100644 --- a/Swiften/Network/BOSHConnection.cpp +++ b/Swiften/Network/BOSHConnection.cpp @@ -7,3 +7,3 @@ /* - * Copyright (c) 2011-2017 Isode Limited. + * Copyright (c) 2011-2018 Isode Limited. * All rights reserved. @@ -29,2 +29,3 @@ #include <Swiften/TLS/TLSContext.h> +#include <Swiften/TLS/TLSContextFactory.h> #include <Swiften/TLS/TLSOptions.h> @@ -44,3 +45,4 @@ BOSHConnection::BOSHConnection(const URL& boshURL, Connector::ref connector, XML if (boshURL_.getScheme() == "https") { - tlsLayer_ = std::make_shared<TLSLayer>(tlsContextFactory, tlsOptions); + auto tlsContext = tlsContextFactory->createTLSContext(tlsOptions); + tlsLayer_ = std::make_shared<TLSLayer>(std::move(tlsContext)); // The following dummyLayer_ is needed as the TLSLayer will pass the decrypted data to its parent layer. |