15 #ifndef TLSOPENSSLBASE_H__
16 #define TLSOPENSSLBASE_H__
24 #include <openssl/ssl.h>
57 virtual bool encrypt(
const std::string& data );
60 virtual int decrypt(
const std::string& data );
72 virtual void setClientCert(
const std::string& clientKey,
const std::string& clientCerts );
75 virtual bool setType() = 0;
76 virtual int handshakeFunction() = 0;
85 virtual bool privateInit() {
return true; }
94 void doTLSOperation( TLSOperation op );
95 int openSSLTime2UnixTime(
const char* time_string );
97 std::string m_recvBuffer;
98 std::string m_sendBuffer;
106 #endif // HAVE_OPENSSL
108 #endif // TLSOPENSSLBASE_H__
virtual void setClientCert(const std::string &clientKey, const std::string &clientCerts)
std::list< std::string > StringList
virtual int decrypt(const std::string &data)
virtual void setCACerts(const StringList &cacerts)
The namespace for the gloox library.
virtual bool encrypt(const std::string &data)
OpenSSLBase(TLSHandler *th, const std::string &server=EmptyString)
An abstract base class for TLS implementations.
virtual bool init(const std::string &clientKey=EmptyString, const std::string &clientCerts=EmptyString, const StringList &cacerts=StringList())
An interface that allows for interacting with TLS implementations derived from TLSBase.
const std::string EmptyString