15 #ifndef TLSGNUTLSBASE_H__
16 #define TLSGNUTLSBASE_H__
24 #include <gnutls/gnutls.h>
25 #include <gnutls/x509.h>
54 virtual bool encrypt(
const std::string& data );
57 virtual int decrypt(
const std::string& data );
75 virtual void setClientCert(
const std::string& ,
const std::string& ) {}
78 virtual void getCertInfo() {}
80 gnutls_session_t* m_session;
82 std::string m_recvBuffer;
86 ssize_t pullFunc(
void* data,
size_t len );
87 static ssize_t pullFunc( gnutls_transport_ptr_t ptr,
void* data,
size_t len );
89 ssize_t pushFunc(
const void* data,
size_t len );
90 static ssize_t pushFunc( gnutls_transport_ptr_t ptr,
const void* data,
size_t len );
98 #endif // TLSGNUTLSBASE_H__
virtual const std::string channelBinding() const
GnuTLSBase(TLSHandler *th, const std::string &server=EmptyString)
std::list< std::string > StringList
virtual int decrypt(const std::string &data)
virtual void setClientCert(const std::string &, const std::string &)
virtual void setCACerts(const StringList &)
The namespace for the gloox library.
virtual bool hasChannelBinding() const
This is the common base class for (stream) encryption using GnuTLS.
An abstract base class for TLS implementations.
virtual bool encrypt(const std::string &data)
An interface that allows for interacting with TLS implementations derived from TLSBase.
const std::string EmptyString