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 ASN1Time2UnixTime( ASN1_TIME* time );
97 std::string m_recvBuffer;
98 std::string m_sendBuffer;
virtual bool encrypt(const std::string &data)
virtual void setCACerts(const StringList &cacerts)
virtual void setClientCert(const std::string &clientKey, const std::string &clientCerts)
virtual bool init(const std::string &clientKey=EmptyString, const std::string &clientCerts=EmptyString, const StringList &cacerts=StringList())
OpenSSLBase(TLSHandler *th, const std::string &server=EmptyString)
virtual int decrypt(const std::string &data)
An abstract base class for TLS implementations.
An interface that allows for interacting with TLS implementations derived from TLSBase.
The namespace for the gloox library.
std::list< std::string > StringList
const std::string EmptyString