summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-12-05 18:06:41 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-12-05 18:06:41 (GMT)
commitf32492bec456866fb5101274e6789efc59a47bdc (patch)
tree5fad08517a769afe3943a7dcbfef2c4c2b3ea850 /Swift/QtUI
parentfc585cd8313fec545b4cdae4fe4fed1f75626409 (diff)
downloadswift-f32492bec456866fb5101274e6789efc59a47bdc.zip
swift-f32492bec456866fb5101274e6789efc59a47bdc.tar.bz2
Added plumbing for persistent certificate trust checking.
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtSwift.cpp4
-rw-r--r--Swift/QtUI/QtSwift.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp
index f33706a..2890357 100644
--- a/Swift/QtUI/QtSwift.cpp
+++ b/Swift/QtUI/QtSwift.cpp
@@ -24,6 +24,7 @@
#include <QSplitter>
#include <Swiften/Base/Log.h>
+#include <Swift/Controllers/CertificateFileStorageFactory.h>
#include "SwifTools/Application/PlatformApplicationPathProvider.h"
#include "Swiften/Avatars/AvatarFileStorage.h"
#include "Swiften/Disco/CapsFileStorage.h"
@@ -102,6 +103,7 @@ QtSwift::QtSwift(po::variables_map options) : autoUpdater_(NULL) {
settings_ = new QtSettingsProvider();
applicationPathProvider_ = new PlatformApplicationPathProvider(SWIFT_APPLICATION_NAME);
storagesFactory_ = new FileStoragesFactory(applicationPathProvider_->getDataDir());
+ certificateStorageFactory_ = new CertificateFileStorageFactory(applicationPathProvider_->getDataDir(), tlsFactories_.getCertificateFactory());
chatWindowFactory_ = new QtChatWindowFactory(splitter_, settings_, tabs_, "");
soundPlayer_ = new QtSoundPlayer(applicationPathProvider_);
#if defined(HAVE_GROWL)
@@ -153,6 +155,7 @@ QtSwift::QtSwift(po::variables_map options) : autoUpdater_(NULL) {
chatListWindowFactory,
mucSearchWindowFactory,
storagesFactory_,
+ certificateStorageFactory_,
dock_,
notifier_,
options.count("latency-debug") > 0);
@@ -200,6 +203,7 @@ QtSwift::~QtSwift() {
foreach (QtChatListWindowFactory* factory, chatListWindowFactories_) {
delete factory;
}
+ delete certificateStorageFactory_;
delete storagesFactory_;
}
diff --git a/Swift/QtUI/QtSwift.h b/Swift/QtUI/QtSwift.h
index 6817734..a41e2d1 100644
--- a/Swift/QtUI/QtSwift.h
+++ b/Swift/QtUI/QtSwift.h
@@ -9,6 +9,7 @@
#include <boost/program_options/variables_map.hpp>
#include <boost/program_options/options_description.hpp>
+#include <Swiften/TLS/PlatformTLSFactories.h>
#include "Swiften/Base/String.h"
#include "Swiften/Base/Platform.h"
#include "Swiften/EventLoop/Qt/QtEventLoop.h"
@@ -28,6 +29,7 @@ namespace po = boost::program_options;
class QSplitter;
namespace Swift {
+ class CertificateStorageFactory;
class Dock;
class Notifier;
class StoragesFactory;
@@ -54,6 +56,7 @@ namespace Swift {
static po::options_description getOptionsDescription();
~QtSwift();
private:
+ PlatformTLSFactories tlsFactories_;
std::vector<MainController*> mainControllers_;
QtChatWindowFactory *chatWindowFactory_;
std::vector<QtMainWindowFactory*> rosterWindowFactories_;
@@ -71,6 +74,7 @@ namespace Swift {
QtChatTabs* tabs_;
ApplicationPathProvider* applicationPathProvider_;
StoragesFactory* storagesFactory_;
+ CertificateStorageFactory* certificateStorageFactory_;
AutoUpdater* autoUpdater_;
Notifier* notifier_;
#if defined(SWIFTEN_PLATFORM_MACOSX)