DTLS cookie generation and verification callbacks.
更多...
DTLS cookie generation and verification callbacks.
◆ HITLS_AppGenCookieCb
| typedef int32_t(* HITLS_AppGenCookieCb) (HITLS_Ctx *ctx, uint8_t *cookie, uint32_t *cookieLen) |
Cookie callback prototype generated by the server.
- 参数
-
| ctx | [IN] Ctx context. |
| cookie | [OUT] Cookie written back by the user. |
| cookieLen | [OUT] Cookie length written back by the user. |
- 返回
- HITLS_COOKIE_GENERATE_SUCCESS, indicates that the generation is successful. HITLS_COOKIE_GENERATE_ERROR, indicates that the generation is failed.
◆ HITLS_AppVerifyCookieCb
| typedef int32_t(* HITLS_AppVerifyCookieCb) (HITLS_Ctx *ctx, const uint8_t *cookie, uint32_t cookieLen) |
The server verifies the cookie callback prototype.
- 参数
-
| ctx | [IN] Ctx context. |
| cookie | [IN] Cookie received by the server. |
| cookieLen | [IN] Cookie length received by the server. |
- 返回
- HITLS_COOKIE_VERIFY_SUCCESS, indicates that the verification is successful. HITLS_COOKIE_VERIFY_ERROR, indicates that the authentication fails.
◆ HITLS_CFG_SetCookieGenCb()
Sets the callback for generating cookies on the server.
- 参数
-
| config | [OUT] Config context. |
| callback | [IN] Cookie generate callback. |
- 返回
- HITLS_SUCCESS, if successful. For details about other error codes, see hitls_error.h.
◆ HITLS_CFG_SetCookieVerifyCb()
Set the cookie verification callback on the server.
- 参数
-
| config | [OUT] Config context. |
| callback | [IN] Cookie verification callback. |
- 返回
- HITLS_SUCCESS, if successful. For details about other error codes, see hitls_error.h.