Home
last modified time | relevance | path

Searched refs:hmac_ctx (Results 1 – 6 of 6) sorted by relevance

/net-tools-latest/mbedtls-2.4.0/library/
Dssl_cookie.c80 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()
[all …]
Dmd.c194 if( ctx->hmac_ctx != NULL ) in mbedtls_md_free()
196 mbedtls_zeroize( ctx->hmac_ctx, 2 * ctx->md_info->block_size ); in mbedtls_md_free()
197 mbedtls_free( ctx->hmac_ctx ); in mbedtls_md_free()
235 ctx->hmac_ctx = mbedtls_calloc( 2, md_info->block_size ); in mbedtls_md_setup()
236 if( ctx->hmac_ctx == NULL ) in mbedtls_md_setup()
336 if( ctx == NULL || ctx->md_info == NULL || ctx->hmac_ctx == NULL ) in mbedtls_md_hmac_starts()
349 ipad = (unsigned char *) ctx->hmac_ctx; in mbedtls_md_hmac_starts()
350 opad = (unsigned char *) ctx->hmac_ctx + ctx->md_info->block_size; in mbedtls_md_hmac_starts()
371 if( ctx == NULL || ctx->md_info == NULL || ctx->hmac_ctx == NULL ) in mbedtls_md_hmac_update()
384 if( ctx == NULL || ctx->md_info == NULL || ctx->hmac_ctx == NULL ) in mbedtls_md_hmac_finish()
[all …]
/net-tools-latest/tinydtls-0.8.2/
Dcrypto.c266 dtls_mac(dtls_hmac_context_t *hmac_ctx, in dtls_mac() argument
273 assert(hmac_ctx); in dtls_mac()
274 dtls_hmac_update(hmac_ctx, record +3, sizeof(uint16) + sizeof(uint48)); in dtls_mac()
275 dtls_hmac_update(hmac_ctx, record, sizeof(uint8) + sizeof(uint16)); in dtls_mac()
276 dtls_hmac_update(hmac_ctx, L, sizeof(uint16)); in dtls_mac()
277 dtls_hmac_update(hmac_ctx, packet, length); in dtls_mac()
279 dtls_hmac_finalize(hmac_ctx, buf); in dtls_mac()
Dcrypto.h239 void dtls_mac(dtls_hmac_context_t *hmac_ctx,
/net-tools-latest/mbedtls-2.4.0/include/mbedtls/
Dssl_cookie.h54 mbedtls_md_context_t hmac_ctx; /*!< context for the HMAC portion */ member
Dmd.h74 void *hmac_ctx; member