summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/StreamStack/TLSLayer.h')
-rw-r--r--Swiften/StreamStack/TLSLayer.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Swiften/StreamStack/TLSLayer.h b/Swiften/StreamStack/TLSLayer.h
index 415a3f0..89588e3 100644
--- a/Swiften/StreamStack/TLSLayer.h
+++ b/Swiften/StreamStack/TLSLayer.h
@@ -1,8 +1,8 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2018 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
@@ -20,13 +20,13 @@
namespace Swift {
class TLSContext;
class TLSContextFactory;
class SWIFTEN_API TLSLayer : public StreamLayer {
public:
- TLSLayer(TLSContextFactory*, const TLSOptions&);
+ TLSLayer(std::unique_ptr<TLSContext> tlsContext);
virtual ~TLSLayer();
void connect();
bool setClientCertificate(CertificateWithKey::ref cert);
Certificate::ref getPeerCertificate() const;
@@ -34,17 +34,17 @@ namespace Swift {
std::shared_ptr<CertificateVerificationError> getPeerCertificateVerificationError() const;
void writeData(const SafeByteArray& data);
void handleDataRead(const SafeByteArray& data);
TLSContext* getContext() const {
- return context;
+ return context_.get();
}
public:
boost::signals2::signal<void (std::shared_ptr<TLSError>)> onError;
boost::signals2::signal<void ()> onConnected;
private:
- TLSContext* context;
+ std::unique_ptr<TLSContext> context_;
};
}