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

MynahSA Namespace Reference


Classes

class  Archive
class  ArchiveStreamBase
class  ClientException
class  ExceptionBase
class  IArchive
class  IBinaryStream
class  IBlowfishStream
class  IoBase
class  ISSLStream
class  IStreamReadError
class  IStreamEOF
class  IStreamBase
class  ITCPStream
class  ITextStream
class  OArchive
class  OBinaryStream
class  OBlowfishStream
class  OSSLStream
class  OStreamWriteError
class  OStreamBase
class  OTCPStream
class  OTextStream
class  RequestResponseHandler
class  ServerException
class  ServerConnectionException
class  SharedPtr
class  SharedPtr< void >
class  SSLArchiveStream
class  SSLConnectionCertVerifier
class  SSLConnectionManager
class  SSLConnectionVerifier
class  SSLRPCClient
class  SSLServer
class  StreamConstructor
class  StringCastException
class  TCPArchiveStream
class  TCPConnectionManager
class  TCPRPCClient
class  TCPServer
class  Mutex
class  Lock
class  Thread

Namespaces

namespace  Detail

Typedefs

typedef IArchive< ISSLStreamISSLArchiveStream
 typedef to remove template parameter
typedef OArchive< OSSLStreamOSSLArchiveStream
 typdef to remove template parameter
typedef SSLServer SSLRPCServer
typedef IArchive< ITCPStreamITCPArchiveStream
 typedef to remove template parameter
typedef OArchive< OTCPStreamOTCPArchiveStream
 typdef to remove template parameter
typedef TCPServer TCPRPCServer

Functions

template<int N>
void swapit_helper (char *a, char *b)
template<class T>
void byteswap (T &i)
int mkcert (X509 **x509p, EVP_PKEY **pkeyp, int bits, int serial, int days)
int add_ext (X509 *cert, int nid, char *value)
int saInit (bool initTCP=true, bool initSSL=true)
template<class B, class A>
SharedPtr< B > StaticPtrCast (const SharedPtr< A > &src)
void sslInit ()
template<class T>
StringCast (const char *c)
template<class T>
StringCast (const std::string &c)


Function Documentation

int MynahSA::add_ext X509 *  cert,
int  nid,
char *  value
 

A private function for mkcert - it is used for adding custom values to a certificate.

Parameters:
cert - the certificate (non-null!)
nid - the Numerical IDentifier for the value to be added
value - the string to be associated with NID
Returns:

int MynahSA::mkcert X509 **  x509p,
EVP_PKEY **  pkeyp,
int  bits,
int  serial,
int  days
 

mkcert - a procedure for making an OpenSSL certificate with some default parameters. This function is a straight re-implementation of the mkcert function provided with the OpenSSL package.

Parameters:
x509p - an output parameter for a new certificate. Pass in the address of an X509 pointer, which should be 0.
pkeyp - an output parameter for a new RSA private key.
bits - the number of bits for the RSA private key (1024 is recommended).
serial - the serial number for the certificate.
days - the number of valid days for the certificate.
Returns:
- non-zero indicates success

int MynahSA::saInit bool  initTCP = true,
bool  initSSL = true
 

Initialize archive and stream library. This function must be called prior to using the archiving and streaming library... This function will initialize winsock on the Win32 platform, and perform the necessary ssl startup - if required.

If you are using neither the TCP streams nor the SSL streams, it is safe to call this function with false for both parameters. Calling this function with initSSL == true and initTCP == false will cause problems on Win32 if networking is required - TCP must be initialized on Win32 to use any form of network communication.

void MynahSA::sslInit  ) 
 

function used for initializing the SSL library. Note: This function must be called prior to using any OpenSSL functionality. It is responsible for configuring the OpenSSL library, initializing thread support by providing the correct mutex constructor functions, and initializing the random number generator. Valgrind hits are expected in this function because of the way OpenSSL deals with uninitialized variables.