diff options
Diffstat (limited to 'Swiften/TLS')
-rw-r--r-- | Swiften/TLS/OpenSSL/OpenSSLContext.cpp | 6 | ||||
-rw-r--r-- | Swiften/TLS/Schannel/SchannelContext.cpp | 2 | ||||
-rw-r--r-- | Swiften/TLS/TLSContext.h | 3 |
3 files changed, 6 insertions, 5 deletions
diff --git a/Swiften/TLS/OpenSSL/OpenSSLContext.cpp b/Swiften/TLS/OpenSSL/OpenSSLContext.cpp index 54addef..8c03052 100644 --- a/Swiften/TLS/OpenSSL/OpenSSLContext.cpp +++ b/Swiften/TLS/OpenSSL/OpenSSLContext.cpp @@ -132,7 +132,7 @@ void OpenSSLContext::doConnect() { break; default: state_ = Error; - onError(); + onError(boost::make_shared<TLSError>()); } } @@ -166,7 +166,7 @@ void OpenSSLContext::handleDataFromApplication(const SafeByteArray& data) { } else { state_ = Error; - onError(); + onError(boost::make_shared<TLSError>()); } } @@ -182,7 +182,7 @@ void OpenSSLContext::sendPendingDataToApplication() { } if (ret < 0 && SSL_get_error(handle_, ret) != SSL_ERROR_WANT_READ) { state_ = Error; - onError(); + onError(boost::make_shared<TLSError>()); } } diff --git a/Swiften/TLS/Schannel/SchannelContext.cpp b/Swiften/TLS/Schannel/SchannelContext.cpp index 9be1ded..4f8f36f 100644 --- a/Swiften/TLS/Schannel/SchannelContext.cpp +++ b/Swiften/TLS/Schannel/SchannelContext.cpp @@ -473,7 +473,7 @@ void SchannelContext::indicateError() { m_state = Error; m_receivedData.clear(); - onError(); + onError(boost::make_shared<TLSError>()); } //------------------------------------------------------------------------ diff --git a/Swiften/TLS/TLSContext.h b/Swiften/TLS/TLSContext.h index 9dee902..5640fe1 100644 --- a/Swiften/TLS/TLSContext.h +++ b/Swiften/TLS/TLSContext.h @@ -13,6 +13,7 @@ #include <Swiften/TLS/Certificate.h> #include <Swiften/TLS/CertificateWithKey.h> #include <Swiften/TLS/CertificateVerificationError.h> +#include <Swiften/TLS/TLSError.h> namespace Swift { @@ -35,7 +36,7 @@ namespace Swift { public: boost::signal<void (const SafeByteArray&)> onDataForNetwork; boost::signal<void (const SafeByteArray&)> onDataForApplication; - boost::signal<void ()> onError; + boost::signal<void (boost::shared_ptr<TLSError>)> onError; boost::signal<void ()> onConnected; }; } |