#include <SSLContext.h>

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 X509 * | getX509 () |
| 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. | |
| X509 * | pem |
| 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) |
| 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 | ( | ) |
| 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 | |||
| ) |
| bool xvr2::Net::SSLContext::privateKeyIsValid | ( | ) |
| void* xvr2::Net::SSLContext::getInternal | ( | ) | [inline] |
| 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] |
| std::ostream& operator<< | ( | std::ostream & | stream, | |
| const Object & | s | |||
| ) | [friend, inherited] |
void* xvr2::Net::SSLContext::ctx [protected] |
int xvr2::Net::SSLContext::method [protected] |
Definition at line 29 of file SSLContext.h.
String xvr2::Net::SSLContext::keyfile [protected] |
Definition at line 30 of file SSLContext.h.
void* xvr2::Net::SSLContext::mydata [protected] |
Definition at line 31 of file SSLContext.h.
StringBuffer xvr2::Net::SSLContext::c_list [protected] |
X509* xvr2::Net::SSLContext::pem [protected] |
Definition at line 34 of file SSLContext.h.
std::string xvr2::Object::__cls_name [protected, inherited] |
1.5.5