20 #include "tlshandler.h"
40 : m_handler( th ), m_server( server ), m_secure( false ), m_valid( false ), m_initLib( true )
76 virtual bool encrypt(
const std::string& data ) = 0;
85 virtual int decrypt(
const std::string& data ) = 0;
143 virtual void setClientCert(
const std::string& clientKey,
const std::string& clientCerts ) = 0;
148 std::string m_clientKey;
149 std::string m_clientCerts;
150 std::string m_server;
161 #endif // TLSBASE_H__
virtual const CertInfo & fetchTLSInfo() const
virtual bool encrypt(const std::string &data)=0
An interface that allows for interacting with TLS implementations derived from TLSBase.
void setInitLib(bool init)
virtual void setCACerts(const StringList &cacerts)=0
virtual bool isSecure() const
TLSBase(TLSHandler *th, const std::string server)
virtual const std::string channelBinding() const
std::list< std::string > StringList
A simple implementation of mutex as a wrapper around a pthread mutex or a win32 critical section.
virtual void setClientCert(const std::string &clientKey, const std::string &clientCerts)=0
virtual bool hasChannelBinding() const
The namespace for the gloox library.
virtual int decrypt(const std::string &data)=0
An abstract base class for TLS implementations.
const std::string EmptyString
virtual bool handshake()=0
virtual bool init(const std::string &clientKey=EmptyString, const std::string &clientCerts=EmptyString, const StringList &cacerts=StringList())=0