#include <sslcontext.h>
Inheritance diagram for Dv::Ssl::SslContext:
Public Member Functions | |
virtual | ~SslContext () |
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 | |
SslContext () throw (std::runtime_error) | |
Constructor is protected because only derived objects make sense. | |
bool | rsa_private_key_file (const char *filename) |
Associated private key file name with this context. | |
bool | certificate_file (const char *filename) |
Associated certificate file name with this context. | |
Protected Attributes | |
void * | context_ |
Pointer to SSL_CTX structure. | |
Private Member Functions | |
SslContext (const SslContext &) | |
SslContext & | operator= (const SslContext &) |
Private Attributes | |
std::string * | rsa_private_key_file_ |
std::string * | certificate_file_ |
The constructors for a a Dv::Ssl::SslSocket and a Dv::Ssl::SslServerSocket both have a required Dv::Ssl::SslSocket& argument.
Example usage:
try { SslContextV23 context("key.pem","cert.pem"); SslServerSocket server(context,9999); .. } catch (exception& e) { .. }
try { SslContextV23 context; SslSocket client(context,"host.domain",9999); .. } catch (exception& e) { .. }
Definition at line 81 of file sslcontext.h.
|
Destructor.
|
|
Constructor is protected because only derived objects make sense.
|
|
The pointer is declared void to avoid inclusion of openssl header files. |
|
Return pointer to en openssl SSL_CTX structure. The pointer is declared void to avoid inclusion of openssl header files. Definition at line 89 of file sslcontext.h. References context_. |
|
Return name of private key filename or 0 if none.
Definition at line 92 of file sslcontext.h. References rsa_private_key_file_. |
|
Return name of certificate filename or 0 if none.
Definition at line 94 of file sslcontext.h. References certificate_file_. |
|
Associated private key file name with this context. Fails is filename==0 or SSL_CTX_useBLBLA fails. |
|
Associated certificate file name with this context. Fails is filename==0 or SSL_CTX_useBLBLA fails. |
|
|
|
Pointer to SSL_CTX structure.
Definition at line 106 of file sslcontext.h. Referenced by context(). |
|
Definition at line 115 of file sslcontext.h. Referenced by rsa_private_key_file(). |
|
Definition at line 116 of file sslcontext.h. Referenced by certificate_file(). |