15 #ifndef TLSGNUTLSBASE_H__
16 #define TLSGNUTLSBASE_H__
21 # include "../config.h.win"
22 #elif defined( _WIN32_WCE )
23 # include "../config.h.win"
30 #include <gnutls/gnutls.h>
31 #include <gnutls/x509.h>
60 virtual bool encrypt(
const std::string& data );
63 virtual int decrypt(
const std::string& data );
75 virtual void setClientCert(
const std::string& ,
const std::string& ) {}
78 virtual void init() = 0;
79 virtual void getCertInfo() {}
81 gnutls_session_t* m_session;
83 std::string m_recvBuffer;
87 ssize_t pullFunc(
void *data,
size_t len );
88 static ssize_t pullFunc( gnutls_transport_ptr_t ptr,
void *data,
size_t len );
90 ssize_t pushFunc(
const void *data,
size_t len );
91 static ssize_t pushFunc( gnutls_transport_ptr_t ptr,
const void *data,
size_t len );
99 #endif // TLSGNUTLSBASE_H__