summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Session')
-rw-r--r--Swiften/Session/BasicSessionStream.cpp4
-rw-r--r--Swiften/Session/BasicSessionStream.h1
-rw-r--r--Swiften/Session/SessionStream.h2
3 files changed, 7 insertions, 0 deletions
diff --git a/Swiften/Session/BasicSessionStream.cpp b/Swiften/Session/BasicSessionStream.cpp
index 32424bc..45489cf 100644
--- a/Swiften/Session/BasicSessionStream.cpp
+++ b/Swiften/Session/BasicSessionStream.cpp
@@ -15,6 +15,7 @@
#include "Swiften/StreamStack/CompressionLayer.h"
#include "Swiften/StreamStack/TLSLayer.h"
#include "Swiften/TLS/TLSContextFactory.h"
+#include "Swiften/TLS/TLSContext.h"
namespace Swift {
@@ -93,6 +94,9 @@ boost::shared_ptr<CertificateVerificationError> BasicSessionStream::getPeerCerti
return tlsLayer->getPeerCertificateVerificationError();
}
+ByteArray BasicSessionStream::getTLSFinishMessage() const {
+ return tlsLayer->getContext()->getFinishMessage();
+}
void BasicSessionStream::addZLibCompression() {
boost::shared_ptr<CompressionLayer> compressionLayer(new CompressionLayer());
diff --git a/Swiften/Session/BasicSessionStream.h b/Swiften/Session/BasicSessionStream.h
index fbaa937..6927800 100644
--- a/Swiften/Session/BasicSessionStream.h
+++ b/Swiften/Session/BasicSessionStream.h
@@ -54,6 +54,7 @@ namespace Swift {
virtual bool isTLSEncrypted();
virtual Certificate::ref getPeerCertificate() const;
virtual boost::shared_ptr<CertificateVerificationError> getPeerCertificateVerificationError() const;
+ virtual ByteArray getTLSFinishMessage() const;
virtual void setWhitespacePingEnabled(bool);
diff --git a/Swiften/Session/SessionStream.h b/Swiften/Session/SessionStream.h
index d648f91..d3d3ebb 100644
--- a/Swiften/Session/SessionStream.h
+++ b/Swiften/Session/SessionStream.h
@@ -63,6 +63,8 @@ namespace Swift {
virtual Certificate::ref getPeerCertificate() const = 0;
virtual boost::shared_ptr<CertificateVerificationError> getPeerCertificateVerificationError() const = 0;
+ virtual ByteArray getTLSFinishMessage() const = 0;
+
boost::signal<void (const ProtocolHeader&)> onStreamStartReceived;
boost::signal<void (boost::shared_ptr<Element>)> onElementReceived;
boost::signal<void (boost::shared_ptr<Error>)> onError;