TrustCore SDK NanoSSL API reference  version 7.0
Asynchronous Server Callbacks

Customizable asynchronous NanoSSL server callbacks. More...

Variables

sbyte4(* sslSettings::funcPtrOpenStateUpcall )(sbyte4 connectionInstance, sbyte4 isRehandshake)
 Indicate successful asynchronous session establishment. More...
 
void(* sslSettings::funcPtrReceiveUpcall )(sbyte4 connectionInstance, ubyte *pMesg, ubyte4 mesgLen)
 Decrypt and return data received through a connection context. More...
 
void(* sslSettings::funcPtrStartTimer )(sbyte4 connectionInstance, ubyte4 msTimerExpire, sbyte4 future)
 Start a timer to use for timeout notifications. More...
 

Detailed Description

Variable Documentation

◆ funcPtrOpenStateUpcall

sbyte4(* sslSettings::funcPtrOpenStateUpcall) (sbyte4 connectionInstance, sbyte4 isRehandshake)

This callback indicates that a secure asynchronous session has been (re)established between peers (client and server). This function is called when an SSL-rehandshake has completed.

Since
1.41
Version
1.41 and later

To enable this callback, the following flag must be defined in moptions.h:

  • __ENABLE_MOCANA_SSL_ASYNC_SERVER_API__
Parameters
connectionInstanceConnection instance returned from SSL_ASYNC_acceptConnection().
isRehandshakeTrue (1) indicates a rehandshake notice.
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

ssl.h

◆ funcPtrReceiveUpcall

void(* sslSettings::funcPtrReceiveUpcall) (sbyte4 connectionInstance, ubyte *pMesg, ubyte4 mesgLen)

This callback decrypts and returns data received through a connection context.

Since
1.41
Version
1.41 and later

To enable this callback, the following flag must be defined in moptions.h:

  • __ENABLE_MOCANA_SSL_ASYNC_SERVER_API__
Parameters
connectionInstanceConnection instance returned from SSL_ASYNC_acceptConnection().
pMesgPointer to decrypted message.
mesgLenNumber of bytes in received message (pMesg).
Returns
None.

ssl.h

◆ funcPtrStartTimer

void(* sslSettings::funcPtrStartTimer) (sbyte4 connectionInstance, ubyte4 msTimerExpire, sbyte4 future)

This callback starts a timer to use for timeout notifications.

Since
1.41
Version
1.41 and later

To enable this callback, the following flag must be defined in moptions.h:

  • __ENABLE_MOCANA_SSL_ASYNC_SERVER_API__
Parameters
connectionInstanceConnection instance returned from SSL_ASYNC_acceptConnection().
msTimerExpireNumber of milliseconds until timer expires.
future(Reserved for future use.)
Returns
None.

ssl.h