Function Prototypes:ttUserSslPskCBFuncPtr
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
- pskDataPtr
- Pointer to PSK information and storage (see ttUserSslPskCBData).
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