Save the user data in the HiTLS context, which can be obtained from the callback registered with the HiTLS.
- Attention
- must be called before HITLS_Connect and HITLS_Accept. The life cycle of the user data pointer must be greater than the life cycle of the TLS object.
If the user data needs to be cleared, the HITLS_SetUserData(ctx, NULL) interface can be called directly. The Clean interface is not provided separately.
- Parameters
-
ctx | [OUT] TLS connection handle. |
userData | [IN] Pointer to the user data. |
- Return values
-
HITLS_SUCCESS,if | successful. |
HITLS_NULL_INPUT,the | TLS object pointer of the input parameter is null. |