64 typedef void (*
LogFn)( int ,
const std::string & ) ;
84 Result read(
char * buffer , size_type buffer_size_in , ssize_type & data_size_out ) ;
109 Result write(
const char * buffer , size_type data_size_in , ssize_type & data_size_out ) ;
127 static std::string
str(
Result result ) ;
138 void operator=(
const Protocol & ) ;
156 Library(
bool active ,
const std::string & pem_file ,
unsigned int flags , LogFn = NULL ) ;
169 bool enabled(
bool for_serving =
false )
const ;
173 static std::string
credit(
const std::string & prefix ,
const std::string & eol ,
const std::string &
final ) ;
178 void operator=(
const Library & ) ;
void(* LogFn)(int, const std::string &)
static Library * instance()
Returns a pointer to a library object, if any.
static std::string str(Result result)
Converts a result enumeration into a printable string.
A private pimple class used by GSsl::Library.
~Library()
Destructor. Cleans up the underlying ssl library.
Result connect(int fd)
Starts the protocol actively.
std::pair< std::string, bool > peerCertificate(int format=0)
Returns the peer certificate and a verified flag.
Result stop()
Initiates the protocol shutdown.
A private pimple class used by GSsl::Protocol.
static std::string credit(const std::string &prefix, const std::string &eol, const std::string &final)
Returns a credit string.
Protocol(const Library &)
Constructor.
Result read(char *buffer, size_type buffer_size_in, ssize_type &data_size_out)
Reads user data into the supplied buffer.
A RAII class for initialising the underlying ssl library.
bool enabled(bool for_serving=false) const
Returns true if this is a real and enabled ssl library.
TLS/SSL transport layer security classes.
Result write(const char *buffer, size_type data_size_in, ssize_type &data_size_out)
Writes user data.
Result accept(int fd)
Starts the protocol passively.