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;
149 virtual void setClientCert(
const std::string& clientKey,
const std::string& clientCerts ) = 0;
154 std::string m_clientKey;
155 std::string m_clientCerts;
156 std::string m_server;
An abstract base class for TLS implementations.
virtual bool encrypt(const std::string &data)=0
virtual const CertInfo & fetchTLSInfo() const
virtual int decrypt(const std::string &data)=0
virtual const std::string channelBinding() const
virtual void setClientCert(const std::string &clientKey, const std::string &clientCerts)=0
virtual bool hasChannelBinding() const
virtual bool init(const std::string &clientKey=EmptyString, const std::string &clientCerts=EmptyString, const StringList &cacerts=StringList())=0
virtual bool handshake()=0
virtual bool isSecure() const
virtual void setCACerts(const StringList &cacerts)=0
virtual const std::string channelBindingType() const
void setInitLib(bool init)
TLSBase(TLSHandler *th, const std::string server)
An interface that allows for interacting with TLS implementations derived from TLSBase.
A simple implementation of mutex as a wrapper around a pthread mutex or a win32 critical section.
The namespace for the gloox library.
std::list< std::string > StringList
const std::string EmptyString