summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Session/BasicSessionStream.cpp')
-rw-r--r--Swiften/Session/BasicSessionStream.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Swiften/Session/BasicSessionStream.cpp b/Swiften/Session/BasicSessionStream.cpp
index 10c6ad0..54cd225 100644
--- a/Swiften/Session/BasicSessionStream.cpp
+++ b/Swiften/Session/BasicSessionStream.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2018 Isode Limited.
* All rights reserved.
@@ -113,3 +113,4 @@ void BasicSessionStream::addTLSEncryption() {
assert(available);
- tlsLayer = new TLSLayer(tlsContextFactory, tlsOptions_);
+ auto tlsContext = tlsContextFactory->createTLSContext(tlsOptions_);
+ tlsLayer = new TLSLayer(std::move(tlsContext));
if (hasTLSCertificate() && !tlsLayer->setClientCertificate(getTLSCertificate())) {