Lines Matching refs:hmac_ctx
80 mbedtls_md_init( &ctx->hmac_ctx ); in mbedtls_ssl_cookie_init()
98 mbedtls_md_free( &ctx->hmac_ctx ); in mbedtls_ssl_cookie_free()
117 ret = mbedtls_md_setup( &ctx->hmac_ctx, mbedtls_md_info_from_type( COOKIE_MD ), 1 ); in mbedtls_ssl_cookie_setup()
121 ret = mbedtls_md_hmac_starts( &ctx->hmac_ctx, key, sizeof( key ) ); in mbedtls_ssl_cookie_setup()
133 static int ssl_cookie_hmac( mbedtls_md_context_t *hmac_ctx, in ssl_cookie_hmac() argument
143 if( mbedtls_md_hmac_reset( hmac_ctx ) != 0 || in ssl_cookie_hmac()
144 mbedtls_md_hmac_update( hmac_ctx, time, 4 ) != 0 || in ssl_cookie_hmac()
145 mbedtls_md_hmac_update( hmac_ctx, cli_id, cli_id_len ) != 0 || in ssl_cookie_hmac()
146 mbedtls_md_hmac_finish( hmac_ctx, hmac_out ) != 0 ) in ssl_cookie_hmac()
191 ret = ssl_cookie_hmac( &ctx->hmac_ctx, *p - 4, in mbedtls_ssl_cookie_write()
227 if( ssl_cookie_hmac( &ctx->hmac_ctx, cookie, in mbedtls_ssl_cookie_check()