MityDSP Documentation Index

MityDSP::tcSslDefaultHelper Class Reference

#include <XySSL_port/SslDefaultHelper.h>

List of all members.

Classes

struct  tsSslData

Public Member Functions

 tcSslDefaultHelper ()
 ~tcSslDefaultHelper ()
bool createContext (void **apContext)
void deleteContext (void *apContext)
bool initSsl (void *apContext, int *apSocket)
int readSsl (void *apContext, void *apBuffer, int anLength)
int writeSsl (void *apContext, void *apBuffer, int anLength)

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 (  ) 

Default constructor.

tcSslDefaultHelper::~tcSslDefaultHelper (  ) 

Default destructor.


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.

  
Generated on Fri Sep 23 16:34:04 2011 for MityDSP XySSL Port by  Doxygen Version 1.6.1
Copyright © 2009, Critical Link LLC, All rights reserved.