summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2018-01-26 18:04:17 (GMT)
committerTobias Markmann <tm@ayena.de>2018-03-12 09:02:00 (GMT)
commitff600776577ce4e3bbf9aa66f5980bc9cf1042a0 (patch)
treef4dcd3484d481d8a7b78bdbf29a3481f0e6b7e83 /Swiften/TLS/TLSContext.cpp
parent3a540816280691e7ca3191867d3c73beba465674 (diff)
downloadswift-ff600776577ce4e3bbf9aa66f5980bc9cf1042a0.zip
swift-ff600776577ce4e3bbf9aa66f5980bc9cf1042a0.tar.bz2
Add getPeerFinishMessage() method and OpenSSL TLS backend
This method allows to calculate the TLS finish message of the peer of a TLS connection. It can be used to provide SASL channel binding for TLS servers. Test-Information: Added unit test that verifies the finish messages of a server TLS context with the finish messages of a client TLS context. Tests pass on macOS 10.13.3 with OpenSSL. Change-Id: Ia5ba539e1fb6d1bef6b4436bb59c7384b57a69b0
Diffstat (limited to 'Swiften/TLS/TLSContext.cpp')
-rw-r--r--Swiften/TLS/TLSContext.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Swiften/TLS/TLSContext.cpp b/Swiften/TLS/TLSContext.cpp
index 39fb5c9..8246dde 100644
--- a/Swiften/TLS/TLSContext.cpp
+++ b/Swiften/TLS/TLSContext.cpp
@@ -35,10 +35,14 @@ void TLSContext::setAbortTLSHandshake(bool /* abort */) {
assert(false);
}
-
Certificate::ref TLSContext::getPeerCertificate() const {
std::vector<Certificate::ref> chain = getPeerCertificateChain();
return chain.empty() ? Certificate::ref() : chain[0];
}
+ByteArray TLSContext::getPeerFinishMessage() const {
+ assert(false);
+ return ByteArray();
+}
+
}