diff options
Diffstat (limited to 'Swiften/StreamStack/TLSLayer.h')
-rw-r--r-- | Swiften/StreamStack/TLSLayer.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Swiften/StreamStack/TLSLayer.h b/Swiften/StreamStack/TLSLayer.h index f8cda41..6fb825f 100644 --- a/Swiften/StreamStack/TLSLayer.h +++ b/Swiften/StreamStack/TLSLayer.h @@ -8,6 +8,8 @@ #include "Swiften/Base/ByteArray.h" #include "Swiften/StreamStack/StreamLayer.h" +#include "Swiften/TLS/Certificate.h" +#include "Swiften/TLS/CertificateVerificationError.h" namespace Swift { class TLSContext; @@ -19,11 +21,14 @@ namespace Swift { TLSLayer(TLSContextFactory*); ~TLSLayer(); - virtual void connect(); - virtual bool setClientCertificate(const PKCS12Certificate&); + void connect(); + bool setClientCertificate(const PKCS12Certificate&); - virtual void writeData(const ByteArray& data); - virtual void handleDataRead(const ByteArray& data); + Certificate::ref getPeerCertificate() const; + boost::optional<CertificateVerificationError> getPeerCertificateVerificationError() const; + + void writeData(const ByteArray& data); + void handleDataRead(const ByteArray& data); public: boost::signal<void ()> onError; |