User data is stored in the HiTLS Config. The user data can be obtained from the callback registered with the HiTLS.
- 注意
- must be called before HITLS_Connect and HITLS_Accept. The life cycle of the user identifier must be longer than that 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.
- 参数
-
config | [OUT] TLS connection handle. |
userData | [IN] User identifier. |
- 返回值
-
HITLS_SUCCESS,if | successful. |
HITLS_NULL_INPUT,The | TLS object pointer of the input parameter is null. |