#include <sslcontext.h>
Inheritance diagram for Dv::Ssl::Context:
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. | |
Context & | operator= (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... |
The constructors for a a Dv::Ssl::Socket and a Dv::Ssl::ServerSocket both have a required Dv::Ssl::Socket& argument.
Example usage:
try { Dv::Ssl::ContextV23 context("key.pem", "cert.pem"); Dv::Ssl::ServerSocket server(context, 9999); .. } catch (std::exception& e) { .. }
try { Dv::Ssl::ContextV23 context; Dv::Ssl::Socket client(context, "host.domain", 9999); .. } catch (std::exception& e) { .. }
Definition at line 46 of file sslcontext.h.
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.
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.
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.
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.
filename | to use as private key file |
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.
filename | to use as certificate file |
false if filename==0 or SSL_CTX_useBLBLA fails.
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] |
std::string* Dv::Ssl::Context::certificate_file_ [private] |