summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Network')
-rw-r--r--Swiften/Network/BoostNetworkFactories.cpp7
-rw-r--r--Swiften/Network/BoostNetworkFactories.h4
-rw-r--r--Swiften/Network/NetworkFactories.h3
3 files changed, 14 insertions, 0 deletions
diff --git a/Swiften/Network/BoostNetworkFactories.cpp b/Swiften/Network/BoostNetworkFactories.cpp
index 56be2b7..030fd49 100644
--- a/Swiften/Network/BoostNetworkFactories.cpp
+++ b/Swiften/Network/BoostNetworkFactories.cpp
@@ -12,6 +12,7 @@
#include <Swiften/Network/PlatformNATTraversalWorker.h>
#include <Swiften/Parser/PlatformXMLParserFactory.h>
#include <Swiften/Network/NullNATTraverser.h>
+#include <Swiften/TLS/PlatformTLSFactories.h>
namespace Swift {
@@ -26,9 +27,15 @@ BoostNetworkFactories::BoostNetworkFactories(EventLoop* eventLoop) {
natTraverser = new NullNATTraverser(eventLoop);
#endif
xmlParserFactory = new PlatformXMLParserFactory();
+ tlsFactories = new PlatformTLSFactories();
+}
+
+TLSContextFactory* BoostNetworkFactories::getTLSContextFactory() const {
+ return tlsFactories->getTLSContextFactory();
}
BoostNetworkFactories::~BoostNetworkFactories() {
+ delete tlsFactories;
delete xmlParserFactory;
delete natTraverser;
delete connectionServerFactory;
diff --git a/Swiften/Network/BoostNetworkFactories.h b/Swiften/Network/BoostNetworkFactories.h
index c9ecb59..8f2b17a 100644
--- a/Swiften/Network/BoostNetworkFactories.h
+++ b/Swiften/Network/BoostNetworkFactories.h
@@ -12,6 +12,7 @@
namespace Swift {
class EventLoop;
class NATTraverser;
+ class PlatformTLSFactories;
class BoostNetworkFactories : public NetworkFactories {
public:
@@ -46,6 +47,8 @@ namespace Swift {
return xmlParserFactory;
}
+ virtual TLSContextFactory* getTLSContextFactory() const;
+
private:
BoostIOServiceThread ioServiceThread;
TimerFactory* timerFactory;
@@ -54,5 +57,6 @@ namespace Swift {
ConnectionServerFactory* connectionServerFactory;
NATTraverser* natTraverser;
XMLParserFactory* xmlParserFactory;
+ PlatformTLSFactories* tlsFactories;
};
}
diff --git a/Swiften/Network/NetworkFactories.h b/Swiften/Network/NetworkFactories.h
index 42c9f6a..2404460 100644
--- a/Swiften/Network/NetworkFactories.h
+++ b/Swiften/Network/NetworkFactories.h
@@ -13,6 +13,8 @@ namespace Swift {
class ConnectionServerFactory;
class NATTraverser;
class XMLParserFactory;
+ class TLSContextFactory;
+ class CertificateFactory;
/**
* An interface collecting network factories.
@@ -27,5 +29,6 @@ namespace Swift {
virtual ConnectionServerFactory* getConnectionServerFactory() const = 0;
virtual NATTraverser* getNATTraverser() const = 0;
virtual XMLParserFactory* getXMLParserFactory() const = 0;
+ virtual TLSContextFactory* getTLSContextFactory() const = 0;
};
}