MityDSP::tcSslDefaultHelper Class Reference
#include <XySSL_port/SslDefaultHelper.h>
List of all members.
Detailed Description
Derived class to define a default SSL helper interface for tcDspNetClientHttp based on the XySSL library.
- See also:
- tcSslDefaultHelper Page
Constructor & Destructor Documentation
tcSslDefaultHelper::tcSslDefaultHelper |
( |
|
) |
|
tcSslDefaultHelper::~tcSslDefaultHelper |
( |
|
) |
|
Member Function Documentation
bool tcSslDefaultHelper::createContext |
( |
void ** |
apContext |
) |
|
This method creates a tsSslData structure (and its various sub-structures), and initializes it to default values. The location of the newly created structure is returned in the provided pointer.
- Parameters:
-
[out] | apContext | Location of a pointer to store address of tsSslData. |
- Returns:
- True if successful, false otherwise.
void tcSslDefaultHelper::deleteContext |
( |
void * |
apContext |
) |
|
This method deletes a previously created tsSslData structure (and its various sub-structures).
- Parameters:
-
[in] | apContext | Pointer to the copy of tsSslData to destroy. |
- Returns:
- None.
bool tcSslDefaultHelper::initSsl |
( |
void * |
apContext, |
|
|
int * |
apSocket | |
|
) |
| | |
This method initializes the SSL context, associates it to a given socket, and sets the SSL parameters. This is the most likely area that would need customization from project to project. Especially the settings to verify certificates with a CA chain, which ciphers to offer, and the session timeout values.
- Parameters:
-
[in] | apContext | Pointer to the copy of tsSslData to initialize. |
[in] | apSocket | Pointer to the socket to associate with the SSL context. |
- Returns:
- True if successful, false otherwise.
int tcSslDefaultHelper::readSsl |
( |
void * |
apContext, |
|
|
void * |
apBuffer, |
|
|
int |
anLength | |
|
) |
| | |
This method performs an encrytped read operation, using a previously- defined and initialized SSL context.
- Parameters:
-
[in] | apContext | Pointer to the copy of tsSslData to use. |
[in] | apBuffer | Pointer to location to store received data. |
[in] | anLength | Number of bytes to attempt to read. |
- Returns:
- Number of bytes actually read.
int tcSslDefaultHelper::writeSsl |
( |
void * |
apContext, |
|
|
void * |
apBuffer, |
|
|
int |
anLength | |
|
) |
| | |
This method performs an encrytped write operation, using a previously- defined and initialized SSL context.
- Parameters:
-
[in] | apContext | Pointer to the copy of tsSslData to use. |
[in] | apBuffer | Pointer to location of data to send. |
[in] | anLength | Number of bytes to write. |
- Returns:
- Number of bytes actually written.