openHiTLS API openHiTLS 0.1.0-Alpha1

◆ HITLS_CFG_SetConfigUserData()

int32_t HITLS_CFG_SetConfigUserData ( HITLS_Config config,
void *  userData 
)

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,ifsuccessful.
HITLS_NULL_INPUT,TheTLS object pointer of the input parameter is null.