diff options
author | Tobias Markmann <tm@ayena.de> | 2017-03-19 16:27:06 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2017-04-04 09:14:16 (GMT) |
commit | ad66cc53f7e7ce860aee5b71b871a0ae9f8d357d (patch) | |
tree | bc655727b49d9308f220574c89aa9911fc30ed92 /Swiften/Network | |
parent | 38f35935581b826940a10246b0a624c643dccc2e (diff) | |
download | swift-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.cpp | 1 | ||||
-rw-r--r-- | Swiften/Network/BOSHConnectionPool.h | 1 |
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; |