Function Prototypes:ttUserSslPskCBFuncPtr

Jump to: navigation, search

Table of Contents >> SSL Programmer's Reference >> tfSslPskRegisterCallback


int ttUserSslPskCBFuncPtr (ttUserSslPskCBDataPtr pskDataPtr);


Function Description

To support TLS Pre-Shared Key (PSK), the user provides a function with this prototype and binds it to a TLS session by calling tfSslPskRegisterCallback(). Treck will call the user's function when negotiating PSK during an initial TLS handshake. If the TLS client and server agree on the PSK key, the handshake succeeds.


Parameters


Returns

  • TM_ENOERROR (0)
    Treck continues with the TLS handshake.
  • anything else (non-zero)
    Treck aborts and fails the handshake. This may produce an immediate TLS Alert message or set the PSK key to a random value to hide the specifics of the failure.


Table of Contents >> SSL Programmer's Reference >> tfSslPskRegisterCallback