sockets::SSLContext::Events Class Reference

Events callback class. More...

#include <ssl.h>

List of all members.

Public Member Functions

 Events (SSLContext &ctx)
 Constructor.
virtual ~Events ()
 Destructor.
virtual int on_getpass (char *buf, int size, int rwflag)
 An event called when a password is requested.
virtual int on_verify (int preverify_ok, SSLInfo *si, X509StoreContext &x509_ctx)
 An event called during verification.
virtual void on_handshake (SSLInfo &si)
 Called when initial handshake is completed.
virtual void on_error (SSLInfo &si, char const *error)
 Called when an SSL library error happens on a SSL connection.
virtual bool is_context_owner () const
 Returns whether the SSL context is the owner of the object (and must free it).
SSLContext const & context () const
 Returns our SSL context.


Detailed Description

This class is an event sink allowing customized behaviour to certain

Member Function Documentation

virtual int sockets::SSLContext::Events::on_getpass ( char *  buf,
int  size,
int  rwflag 
) [inline, virtual]

An event called when a password is requested, for a key, certificate, etc.

The default implementation always returns 0.

Parameters:
[in] buf The buffer to copy the password to.
[in] size The length of the buffer, in bytes.
[in] rwflag 1 if the password is used for encryption, 0 if it is used for decryption.
Returns:
The length of the password copied to the buffer.

virtual int sockets::SSLContext::Events::on_verify ( int  preverify_ok,
SSLInfo si,
X509StoreContext x509_ctx 
) [inline, virtual]

An event called during verification.

The default implementation always returns preverify_ok.

Parameters:
[in] preverify_ok 1 if verification succeeded, 0 otherwise.
[in] si The SSLInfo object this verification was made for.
[in] x509_ctx See the man page.
Returns:
1 if verification must succeed, 0 otherwise.


The documentation for this class was generated from the following file:
Generated on Fri Apr 18 22:03:29 2008 for Epona API by  doxygen 1.5.3