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