TransportTLSCommon class.
More...
#include <TransportTLSCommon.H>
|
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. More...
|
|
void | set_non_blocking () |
| Set the underlying I/O descriptor as non-blocking.
|
|
|
static int | pem_passwd_cb (char *buf, int size, int rwflag, void *userdata) |
| Callback method used by OpenSSL to collect passphrases. More...
|
|
long TransportTLSCommon::cert_common_name_check |
( |
const string & |
common_name | ) |
|
Checks if peer's certificate common name matches string common_name.
- Parameters
-
common_name | expected common_name |
- Returns
- X509 error code
string TransportTLSCommon::get_openssl_msg |
( |
| ) |
const |
Return the OpenSSL error message.
- Returns
- OpenSSL error message
static int TransportTLSCommon::pem_passwd_cb |
( |
char * |
buf, |
|
|
int |
size, |
|
|
int |
rwflag, |
|
|
void * |
userdata |
|
) |
| |
|
staticprotected |
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: