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 );
69 virtual void setClientCert(
const std::string& ,
const std::string& ) {}
72 virtual void getCertInfo() {}
74 gnutls_session_t* m_session;
76 std::string m_recvBuffer;
80 ssize_t pullFunc(
void* data,
size_t len );
81 static ssize_t pullFunc( gnutls_transport_ptr_t ptr,
void* data,
size_t len );
83 ssize_t pushFunc(
const void* data,
size_t len );
84 static ssize_t pushFunc( gnutls_transport_ptr_t ptr,
const void* data,
size_t len );
92 #endif // TLSGNUTLSBASE_H__