xvr2::Net::SSLContext Class Reference

#include <SSLContext.h>

Inheritance diagram for xvr2::Net::SSLContext:

Inheritance graph
[legend]

List of all members.


Detailed Description

Instructions on how to create a socket.

SSLContext ctx; ctx.setPassphrase("somepassword"); ctx.pemCertificateChainFile("chain_file.pem"); ctx.privateKeyfile("pkey.pem"); ctx.loadVerifyLocations("cafile.pem", "/some/path");

Definition at line 24 of file SSLContext.h.


Public Member Functions

 SSLContext (int _method=SSL_V23)
 Instantiates an uninitialized SSL Context with the specified connection method.
 SSLContext (const String &_keyfile, int _method=SSL_V23)
 ~SSLContext ()
virtual int passwordCallback (char *buf, int num, int rwflag, void *userdata)
 This method must be overriden in order to supply a different method to obtain the keyfile password.
void setUserdata (void *data)
 Permits to set a block of data to be passed to the passwordCallback() method when called to save/load a keyfile.
void setPassphrase (const char *passphrase)
 This method lets you set the default passphrase to be used when saving/loading a keifile.
void pemCertificateChainFile (const String &chain_file)
void privateKeyfile (const String &file, int type=KEYFILE_PEM)
void rsaPrivateKeyfile (const String &file, int type=KEYFILE_PEM)
void loadVerifyLocations (const String &cafile, const String &capath)
bool privateKeyIsValid ()
void * getInternal ()
void addCipher (const String &cyp)
const X509getX509 ()
virtual const char * getClassName ()
 Returns the name of the current class.
virtual std::string toString ()

Static Public Member Functions

static void debugmsg (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__)
 Will print a debug message to the screen.
static void debugmsgln (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__)

Protected Attributes

void * ctx
int method
String keyfile
void * mydata
StringBuffer c_list
 Cypher list.
X509pem
std::string __cls_name

Static Private Member Functions

static int passwdCB (char *buf, int num, int rwflag, void *userdata)

Friends

std::ostream & operator<< (std::ostream &stream, const Object &s)

Constructor & Destructor Documentation

xvr2::Net::SSLContext::SSLContext ( int  _method = SSL_V23  ) 

Instantiates an uninitialized SSL Context with the specified connection method.

xvr2::Net::SSLContext::SSLContext ( const String _keyfile,
int  _method = SSL_V23 
)

xvr2::Net::SSLContext::~SSLContext (  ) 


Member Function Documentation

static int xvr2::Net::SSLContext::passwdCB ( char *  buf,
int  num,
int  rwflag,
void *  userdata 
) [static, private]

virtual int xvr2::Net::SSLContext::passwordCallback ( char *  buf,
int  num,
int  rwflag,
void *  userdata 
) [virtual]

This method must be overriden in order to supply a different method to obtain the keyfile password.

You might want to override in the case your are reading the passphrase from a file, console input, etc, etc.

void xvr2::Net::SSLContext::setUserdata ( void *  data  ) 

Permits to set a block of data to be passed to the passwordCallback() method when called to save/load a keyfile.

void xvr2::Net::SSLContext::setPassphrase ( const char *  passphrase  ) 

This method lets you set the default passphrase to be used when saving/loading a keifile.

NOTE: This method is useless if you decide to override the passwordCallback() method.

void xvr2::Net::SSLContext::pemCertificateChainFile ( const String chain_file  ) 

void xvr2::Net::SSLContext::privateKeyfile ( const String file,
int  type = KEYFILE_PEM 
)

void xvr2::Net::SSLContext::rsaPrivateKeyfile ( const String file,
int  type = KEYFILE_PEM 
)

void xvr2::Net::SSLContext::loadVerifyLocations ( const String cafile,
const String capath 
)

bool xvr2::Net::SSLContext::privateKeyIsValid (  ) 

void* xvr2::Net::SSLContext::getInternal (  )  [inline]

Definition at line 58 of file SSLContext.h.

References ctx.

void xvr2::Net::SSLContext::addCipher ( const String cyp  ) 

const X509* xvr2::Net::SSLContext::getX509 (  ) 

virtual const char* xvr2::Object::getClassName (  )  [virtual, inherited]

Returns the name of the current class.

static void xvr2::Object::debugmsg ( Object obj,
const char *  msg,
int  linenumber = __LINE__,
const char *  srcfile = __FILE__ 
) [static, inherited]

Will print a debug message to the screen.

static void xvr2::Object::debugmsgln ( Object obj,
const char *  msg,
int  linenumber = __LINE__,
const char *  srcfile = __FILE__ 
) [static, inherited]

virtual std::string xvr2::Object::toString (  )  [virtual, inherited]


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
const Object s 
) [friend, inherited]


Member Data Documentation

void* xvr2::Net::SSLContext::ctx [protected]

Definition at line 28 of file SSLContext.h.

Referenced by getInternal().

Definition at line 29 of file SSLContext.h.

Definition at line 30 of file SSLContext.h.

void* xvr2::Net::SSLContext::mydata [protected]

Definition at line 31 of file SSLContext.h.

Cypher list.

Definition at line 33 of file SSLContext.h.

Definition at line 34 of file SSLContext.h.

std::string xvr2::Object::__cls_name [protected, inherited]

Definition at line 30 of file Object.h.


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

Generated on Fri Jun 20 22:56:03 2008 for X-VR2 SDK by  doxygen 1.5.5