TransportTLSCommon Class Reference

TransportTLSCommon class. More...

#include <TransportTLSCommon.H>

Inheritance diagram for TransportTLSCommon:

TransportTLS List of all members.

Public Member Functions

 TransportTLSCommon ()
 Constructor.
 ~TransportTLSCommon ()
 Destructor.
void read (string &xml_payload, const int &timeout=TIMEOUT)
 Read payload from the open connection.
void write (const string &xml_payload, const int &timeout=TIMEOUT)
 Write payload to the open connection.
void disconnect ()
 Close the connection.
string get_openssl_msg ()
 Return the OpenSSL error message.

Protected Member Functions

void seed_prng ()
 Seed OpenSSL pseudo random number generator.
void setup_context (const string &cert_file, const string &root_ca_file, const string &pem_passphrase="")
 Setup Context for Certificate Validation.
void set_non_blocking ()
 Set the underlying I/O descriptor as non-blocking.

Static Protected Member Functions

static int pem_passwd_cb (char *buf, int size, int rwflag, void *userdata)
 Callback method used by OpenSSL to collect passphrases.

Protected Attributes

BIO * _conn
 BIO Socket.
SSL_CTX * _ssl_ctx
 SSL Context.
SSL * _ssl
 SSL object.

Static Protected Attributes

static string _pem_passphrase
 pem passphrase
static const int TIMEOUT
 Default read/write timeout in seconds.

Detailed Description

TransportTLSCommon class.


Member Function Documentation

string TransportTLSCommon::get_openssl_msg  ) 
 

Return the OpenSSL error message.

Returns:
OpenSSL error message

static int TransportTLSCommon::pem_passwd_cb char *  buf,
int  size,
int  rwflag,
void *  userdata
[static, protected]
 

Callback method used by OpenSSL to collect passphrases.

Parameters:
buf buffer that the passphrase should be copied into
size size of buf in bytes, including the NULL terminating character
rwflag indicates whether the callback is used for reading/decryption (rwflag=0) or writing/decryption (rwflag=1)
userdata application specific data
Returns:
the actual length of the password

void TransportTLSCommon::read string &  xml_payload,
const int &  timeout = TIMEOUT
 

Read payload from the open connection.

Parameters:
xml_payload buffer to be read
timeout timeout in seconds

void TransportTLSCommon::setup_context const string &  cert_file,
const string &  root_ca_file,
const string &  pem_passphrase = ""
[protected]
 

Setup Context for Certificate Validation.

Parameters:
cert_file Certificate file
root_ca_file Root certificate file
pem_passphrase Optional passphrase for an encrypted private key

void TransportTLSCommon::write const string &  xml_payload,
const int &  timeout = TIMEOUT
 

Write payload to the open connection.

Parameters:
xml_payload XML Payload
timeout timeout in seconds


The documentation for this class was generated from the following file:
Generated on Thu Jun 8 17:40:01 2006 for libepp_nicbr by  doxygen 1.4.6