summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2017-03-19 16:27:06 (GMT)
committerTobias Markmann <tm@ayena.de>2017-04-04 09:14:16 (GMT)
commitad66cc53f7e7ce860aee5b71b871a0ae9f8d357d (patch)
treebc655727b49d9308f220574c89aa9911fc30ed92 /Swiften/Network
parent38f35935581b826940a10246b0a624c643dccc2e (diff)
downloadswift-ad66cc53f7e7ce860aee5b71b871a0ae9f8d357d.zip
swift-ad66cc53f7e7ce860aee5b71b871a0ae9f8d357d.tar.bz2
Verify certificates for HTTPS BOSH connections
Test-Information: Tested against a BOSH server with a valid HTTPS certificate and against a BOSH server with an expired HTTPS certificate. Tested on macOS 10.12.3 with Qt 5.5.1. Change-Id: I9989389b271961fc4d66db56198b32715af52ae7
Diffstat (limited to 'Swiften/Network')
-rw-r--r--Swiften/Network/BOSHConnectionPool.cpp1
-rw-r--r--Swiften/Network/BOSHConnectionPool.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/Swiften/Network/BOSHConnectionPool.cpp b/Swiften/Network/BOSHConnectionPool.cpp
index e4ca471..8a75e81 100644
--- a/Swiften/Network/BOSHConnectionPool.cpp
+++ b/Swiften/Network/BOSHConnectionPool.cpp
@@ -142,6 +142,7 @@ void BOSHConnectionPool::handleConnectFinished(bool error, BOSHConnection::ref c
}
if (!pinnedCertificateChain_.empty()) {
lastVerificationError_ = connection->getPeerCertificateVerificationError();
+ onTLSConnectionEstablished();
}
if (sid.empty()) {
diff --git a/Swiften/Network/BOSHConnectionPool.h b/Swiften/Network/BOSHConnectionPool.h
index 1a805de..c4d827c 100644
--- a/Swiften/Network/BOSHConnectionPool.h
+++ b/Swiften/Network/BOSHConnectionPool.h
@@ -41,6 +41,7 @@ namespace Swift {
std::vector<Certificate::ref> getPeerCertificateChain() const;
std::shared_ptr<CertificateVerificationError> getPeerCertificateVerificationError() const;
+ boost::signals2::signal<void ()> onTLSConnectionEstablished;
boost::signals2::signal<void (BOSHError::ref)> onSessionTerminated;
boost::signals2::signal<void ()> onSessionStarted;
boost::signals2::signal<void (const SafeByteArray&)> onXMPPDataRead;