Dv::Ssl::Context Class Reference

Common base class represensting an SSL context. More...

#include <sslcontext.h>

Inheritance diagram for Dv::Ssl::Context:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual ~Context ()
 Destructor.
void * context ()
 Return pointer to en openssl SSL_CTX structure.
const std::string * rsa_private_key_file () const
 Return name of private key filename or 0 if none.
const std::string * certificate_file () const
 Return name of certificate filename or 0 if none.

Protected Member Functions

 Context () throw (std::runtime_error)
 Constructor is protected because only derived objects make sense.
bool rsa_private_key_file (const char *filename)
 Set private key file name associated with this context.
bool certificate_file (const char *filename)
 Set certificate file name associated with this context.

Protected Attributes

void * context_
 Pointer to SSL_CTX structure.

Private Member Functions

 Context (const Context &)
 Forbidden.
Contextoperator= (const Context &)
 Forbidden.

Private Attributes

std::string * rsa_private_key_file_
std::string * certificate_file_

Classes

class  Init
 This class serves to initialize the openssl library. More...

Detailed Description

Common base class represensting an SSL context.

The constructors for a a Dv::Ssl::Socket and a Dv::Ssl::ServerSocket both have a required Dv::Ssl::Socket& argument.

Example usage:

Definition at line 46 of file sslcontext.h.


Constructor & Destructor Documentation

virtual Dv::Ssl::Context::~Context (  )  [virtual]

Destructor.

Dv::Ssl::Context::Context (  )  throw (std::runtime_error) [protected]

Constructor is protected because only derived objects make sense.

Dv::Ssl::Context::Context ( const Context  )  [private]

Forbidden.


Member Function Documentation

void* Dv::Ssl::Context::context (  )  [inline]

Return pointer to en openssl SSL_CTX structure.

The pointer is declared void to avoid inclusion of openssl header files.

Definition at line 54 of file sslcontext.h.

References context_.

const std::string* Dv::Ssl::Context::rsa_private_key_file (  )  const [inline]

Return name of private key filename or 0 if none.

Returns:
name of private key filename

0 if there is no private key filename

Definition at line 59 of file sslcontext.h.

References rsa_private_key_file_.

const std::string* Dv::Ssl::Context::certificate_file (  )  const [inline]

Return name of certificate filename or 0 if none.

Returns:
name of certificate filename

0 if there is no certificate filename

Definition at line 64 of file sslcontext.h.

References certificate_file_.

bool Dv::Ssl::Context::rsa_private_key_file ( const char *  filename  )  [protected]

Set private key file name associated with this context.

Parameters:
filename to use as private key file
Returns:
true if the operation succeeds

false if filename==0 or SSL_CTX_useBLBLA fails.

bool Dv::Ssl::Context::certificate_file ( const char *  filename  )  [protected]

Set certificate file name associated with this context.

Parameters:
filename to use as certificate file
Returns:
true if the operation succeeds

false if filename==0 or SSL_CTX_useBLBLA fails.

Context& Dv::Ssl::Context::operator= ( const Context  )  [private]

Forbidden.


Member Data Documentation

void* Dv::Ssl::Context::context_ [protected]

Pointer to SSL_CTX structure.

The pointer is declared void to avoid inclusion of openssl header files.

Definition at line 82 of file sslcontext.h.

Referenced by context().

std::string* Dv::Ssl::Context::rsa_private_key_file_ [private]

Definition at line 88 of file sslcontext.h.

Referenced by rsa_private_key_file().

std::string* Dv::Ssl::Context::certificate_file_ [private]

Definition at line 89 of file sslcontext.h.

Referenced by certificate_file().


The documentation for this class was generated from the following file:
dvssl-0.6.1 [15 March, 2008]