#include <sslbase.hh>

Public Member Functions | |
| ssl_bio (void) | |
| ssl_bio empty constructor. | |
| ssl_bio (ssl_ctx &ctx) | |
| New ssl_bio constructor. | |
| virtual | ~ssl_bio (void) |
| Destructor. | |
| ssl_bio & | operator= (ssl_bio &bio) |
| Assignment operator. | |
| ssl_bio * | accept (void) |
| Accept a client connection. | |
| sock_err | bind (const std::string &port) |
| Complete client handshake. | |
| sock_err | close (void) |
| Close connection. | |
| sock_err | connect (const std::string &peer) |
| Close connection. | |
| sock_err | handshake (void) |
| Complete client handshake. | |
| sock_err | listen (const std::string &port, int lq) |
| Listen for clients. | |
| long | read_available (char *buffer, long length) |
| Read a string. | |
| bio_st & | ref_bio (void) |
| bio_st * | release (void) |
| void | reset (bio_st *bio) |
| Reset the inter BIO pointer. | |
| void | set_ssl_mode (long mode) |
| Set the SSL mode flags. | |
| int | socket_id (void) const |
| Get the socket id. | |
| long | write (const char *buffer, long length) |
| Write data. | |
SSL BIO wrapper. Performs I/O and control functions to an SSL port. Note that this class contains a pointer to a BIO that it owns. When the class is copied bu an operator= or a copy constructor, the ownership is passed to the new class and the BIO pointer is reset. This might appear to be an obvious application for the auto_ptr template, but the BIO must be release by BIO_free rather than being deleted.
| sends::ssl_bio::ssl_bio | ( | void | ) |
ssl_bio empty constructor.
Construct a null SSL BIO wrapper.
| sends::ssl_bio::ssl_bio | ( | ssl_ctx & | ctx | ) | [explicit] |
New ssl_bio constructor.
Construct an SSL BIO wrapper. The OpenSSL bio is allocated from the specified context.
| ctx | OpenSSL contect used to construct the BIO structure. |
| virtual sends::ssl_bio::~ssl_bio | ( | void | ) | [virtual] |
Destructor.
Destroy and free the bio.
| ssl_bio* sends::ssl_bio::accept | ( | void | ) | [virtual] |
Accept a client connection.
Accept a connection from a client. THe current ssl_bio should be listening to a port (see listen method).
Implements sends::socket_api.
| sock_err sends::ssl_bio::bind | ( | const std::string & | port | ) | [virtual] |
Complete client handshake.
Complete the handshake on an accepted lient connection.
| port | Prt number string. |
Implements sends::socket_api.
| sock_err sends::ssl_bio::close | ( | void | ) | [virtual] |
Close connection.
Shut-down and free current BIO and zero the internal pointer.
Implements sends::socket_api.
| sock_err sends::ssl_bio::connect | ( | const std::string & | peer | ) | [virtual] |
Close connection.
Shut-down and free current BIO and zero the internal pointer.
| peer | IP address to which the connection will be made. |
Implements sends::socket_api.
| sock_err sends::ssl_bio::handshake | ( | void | ) | [virtual] |
Complete client handshake.
Complete the handshake on an accepted lient connection.
Reimplemented from sends::socket_api.
| sock_err sends::ssl_bio::listen | ( | const std::string & | port, | |
| int | lq | |||
| ) | [virtual] |
Listen for clients.
Listen to the specified port for client connection requests. The port to be listened to is identified by a character string containing the port number.
| port | Port ID string. | |
| lq | length of request queue. |
Implements sends::socket_api.
| long sends::ssl_bio::read_available | ( | char * | buffer, | |
| long | length | |||
| ) | [virtual] |
Read a string.
Read a data string via the Bio.
| buffer | Character vector to receive the data. | |
| length | Maximum length of data to be read. |
Implements sends::socket_api.
| bio_st & sends::ssl_bio::ref_bio | ( | void | ) | [inline] |
Reference the wrapped OpenSSL BIO structure.
| bio_st* sends::ssl_bio::release | ( | void | ) |
Release the wrapped OpenSSL BIO structure from this object. The Bio structure pointer is is returned and the internal pointer is set to null.
| void sends::ssl_bio::reset | ( | bio_st * | bio | ) |
Reset the inter BIO pointer.
Free the wrapped bio structure if one exists and reset the internal pointer to the argument value.
| bio | New value of the bio pointer. |
| void sends::ssl_bio::set_ssl_mode | ( | long | mode | ) |
Set the SSL mode flags.
Set the OpenSSL mode flags in the wrapped BIO.
| mode | New mode flags |
| int sends::ssl_bio::socket_id | ( | void | ) | const [virtual] |
Get the socket id.
Get a socket id number. In general this will be the system fd for the socket.
Implements sends::socket_api.
| long sends::ssl_bio::write | ( | const char * | buffer, | |
| long | length | |||
| ) | [virtual] |
Write data.
Write data string to the socket.
| buffer | Character vector with data to be written. | |
| length | Length of data to be written. |
Implements sends::socket_api.
1.5.5