SSLServer Class Reference

#include <server.h>

List of all members.

Public Member Functions

 SSLServer (void)
 SSLServer (int port)
 ~SSLServer (void)
void setport (int port)
int Open (int port)
int Open ()
int setpassword (const char *passwd)
int LoadCertificates (char *CertFile, char *KeyFile)
X509 * ShowCerts (SSL *ssl)
int asymmetricEncrypt (unsigned char *message, size_t inlen, unsigned char *cipherMessage, size_t *outlen)
void * Servlet ()
int Accept ()

Detailed Description

SSL Server is the server class which can be instantiated for the server functionality.


Constructor & Destructor Documentation

SSLServer::SSLServer ( void   ) 

This is used to know whether any client is busy before sending a connection request

This is the constructor of the server class SSL is initiated and the member variable of the server are initialzed a client list and a connection list will be created

SSLServer::SSLServer ( int  port  ) 

Server constructor to initialize the server member variables

This is the constructor of the server class It takes an argument as port to which this server will be listening to SSL is initiated and the member variable of the server are initialzed a client list and a connection list will be created

SSLServer::~SSLServer ( void   ) 

constructor which initialized with the port number to which server is going to listen

This is the destructor of the server class The member variable of the server are deallocated like a client list, connection list, certificate file handle, key file handle, etc


Member Function Documentation

int SSLServer::Accept (  ) 

Serve the connection -- threadable; called from the thread context

This function will accept the connection requests from the clients and create a thread for handling the packets received from the clients

int SSLServer::asymmetricEncrypt ( unsigned char *  message,
size_t  inlen,
unsigned char *  cipherMessage,
size_t *  outlen 
)

Get the client certificate and display or verify

int SSLServer::LoadCertificates ( char *  CertFile,
char *  KeyFile 
)

set the password that need to be used for accessing the keys or certificates

This function will load the certificates It takes two arguments CertFile will be the path to the certificate file of the server KeyFile will be the path for the key file This function will verify the path to the certifcate and key file and use the certificae file and private key file

int SSLServer::Open (  ) 

open the server socket listening at given port for communication

This function can be called to create a socket and bind for listening

int SSLServer::Open ( int  port  ) 

function to set the server port, should be used before opening the socket

This function can be called to create a socket and bind for listening This function takes port number as an argument, this port number will be used by the server fot listening

void * SSLServer::Servlet (  ) 

This is the function which handle all the commands from the packets received from client

int SSLServer::setpassword ( const char *  passwd  ) 

open the server socket for communication

This is the function which can be used to set the password to prevent the prompting for password when the certificate will be used by the server for communication

void SSLServer::setport ( int  port  ) 

Destructor to free the memory allocated during the initialization in the constructor

This function is used to set the port to which the server will be binding to. This has to be called before listening and accepting the connections Any call to this function after listening will not have any effect

X509 * SSLServer::ShowCerts ( SSL *  ssl  ) 

Load the server certficates which is used for SSL communication

This function is used to get the certificate of the clients get the subject and issuer name present in the certificate


The documentation for this class was generated from the following files:
 All Classes Functions

Generated on 2 Dec 2014 by  doxygen 1.6.1