Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

MynahSA::SSLServer Class Reference

#include <sslserver.hpp>

Collaboration diagram for MynahSA::SSLServer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SSLServer (SSLConnectionManager &sobj, std::string cFile, std::string kFile, int port, std::string caFile="")
 SSLServer (SSLConnectionManager &sobj, X509 *certp, EVP_PKEY *pkeyp, int port, std::string caFile="")
 ~SSLServer ()
 close port and cleanup information
void checkClients (int wait_t=0)

Detailed Description

Class SSLServer is used to handle root connections - e.g. one instance of this class will handle incoming connections on a TCP port. Once the connection is established, the connection is handed to a ConnectionManager object - the template parameter used here takes the instance of type T and uses its operator() method to handle the individual connection.

Note: class T must provide an void operator()(SSL*) method - the operator will be invoked when a connection has been established.

Definition at line 46 of file sslserver.hpp.


Constructor & Destructor Documentation

MynahSA::SSLServer::SSLServer SSLConnectionManager sobj,
std::string  cFile,
std::string  kFile,
int  port,
std::string  caFile = ""
 

SSLServer constructor - takes a server object - an object that is required for dealing with SSL requests
cFile - a file name for the SSL certificate file
kFile - a file name for the SSL private key
port - the port to answer requests on

MynahSA::SSLServer::SSLServer SSLConnectionManager sobj,
X509 *  certp,
EVP_PKEY *  pkeyp,
int  port,
std::string  caFile = ""
 

in memory loading of SSL certificate and SSL RSA private key. Both must be in ASN1 format.

Note: this constructor is untested


Member Function Documentation

void MynahSA::SSLServer::checkClients int  wait_t = 0  ) 
 

Check for new connections, block for wait_t amount of seconds, if no connection is made within wait_t function returns. This must be called regularly from within main


The documentation for this class was generated from the following file: