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__