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 );
66 virtual void getCertInfo() {}
68 gnutls_session_t* m_session;
70 std::string m_recvBuffer;
74 ssize_t pullFunc(
void* data,
size_t len );
75 static ssize_t pullFunc( gnutls_transport_ptr_t ptr,
void* data,
size_t len );
77 ssize_t pushFunc(
const void* data,
size_t len );
78 static ssize_t pushFunc( gnutls_transport_ptr_t ptr,
const void* data,
size_t len );
86 #endif // TLSGNUTLSBASE_H__