summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Session')
-rw-r--r--Swiften/Session/BOSHSessionStream.cpp13
-rw-r--r--Swiften/Session/BOSHSessionStream.h1
2 files changed, 10 insertions, 4 deletions
diff --git a/Swiften/Session/BOSHSessionStream.cpp b/Swiften/Session/BOSHSessionStream.cpp
index 99af71d..7fb8b31 100644
--- a/Swiften/Session/BOSHSessionStream.cpp
+++ b/Swiften/Session/BOSHSessionStream.cpp
@@ -83,6 +83,11 @@ BOSHSessionStream::~BOSHSessionStream() {
xmppLayer = NULL;
}
+void BOSHSessionStream::open() {
+ connectionPool->setTLSCertificate(getTLSCertificate());
+ connectionPool->open();
+}
+
void BOSHSessionStream::handlePoolXMPPDataRead(const SafeByteArray& data) {
xmppLayer->handleDataRead(data);
}
@@ -118,19 +123,19 @@ void BOSHSessionStream::addTLSEncryption() {
}
bool BOSHSessionStream::isTLSEncrypted() {
- return false;
+ return connectionPool->isTLSEncrypted();
}
Certificate::ref BOSHSessionStream::getPeerCertificate() const {
- return Certificate::ref();
+ return connectionPool->getPeerCertificate();
}
std::vector<Certificate::ref> BOSHSessionStream::getPeerCertificateChain() const {
- return std::vector<Certificate::ref>();
+ return connectionPool->getPeerCertificateChain();
}
boost::shared_ptr<CertificateVerificationError> BOSHSessionStream::getPeerCertificateVerificationError() const {
- return boost::shared_ptr<CertificateVerificationError>();
+ return connectionPool->getPeerCertificateVerificationError();
}
ByteArray BOSHSessionStream::getTLSFinishMessage() const {
diff --git a/Swiften/Session/BOSHSessionStream.h b/Swiften/Session/BOSHSessionStream.h
index 191a6f4..66e41ea 100644
--- a/Swiften/Session/BOSHSessionStream.h
+++ b/Swiften/Session/BOSHSessionStream.h
@@ -51,6 +51,7 @@ namespace Swift {
);
virtual ~BOSHSessionStream();
+ void open();
virtual void close();
virtual bool isOpen();