Lines Matching refs:md_ctx
416 mbedtls_md_context_t md_ctx; in tls1_prf() local
419 mbedtls_md_init( &md_ctx ); in tls1_prf()
447 if( ( ret = mbedtls_md_setup( &md_ctx, md_info, 1 ) ) != 0 ) in tls1_prf()
452 ret = mbedtls_md_hmac_starts( &md_ctx, S1, hs ); in tls1_prf()
455 ret = mbedtls_md_hmac_update( &md_ctx, tmp + 20, nb ); in tls1_prf()
458 ret = mbedtls_md_hmac_finish( &md_ctx, 4 + tmp ); in tls1_prf()
464 ret = mbedtls_md_hmac_reset ( &md_ctx ); in tls1_prf()
467 ret = mbedtls_md_hmac_update( &md_ctx, 4 + tmp, 16 + nb ); in tls1_prf()
470 ret = mbedtls_md_hmac_finish( &md_ctx, h_i ); in tls1_prf()
474 ret = mbedtls_md_hmac_reset ( &md_ctx ); in tls1_prf()
477 ret = mbedtls_md_hmac_update( &md_ctx, 4 + tmp, 16 ); in tls1_prf()
480 ret = mbedtls_md_hmac_finish( &md_ctx, 4 + tmp ); in tls1_prf()
490 mbedtls_md_free( &md_ctx ); in tls1_prf()
501 if( ( ret = mbedtls_md_setup( &md_ctx, md_info, 1 ) ) != 0 ) in tls1_prf()
506 ret = mbedtls_md_hmac_starts( &md_ctx, S2, hs ); in tls1_prf()
509 ret = mbedtls_md_hmac_update( &md_ctx, tmp + 20, nb ); in tls1_prf()
512 ret = mbedtls_md_hmac_finish( &md_ctx, tmp ); in tls1_prf()
518 ret = mbedtls_md_hmac_reset ( &md_ctx ); in tls1_prf()
521 ret = mbedtls_md_hmac_update( &md_ctx, tmp, 20 + nb ); in tls1_prf()
524 ret = mbedtls_md_hmac_finish( &md_ctx, h_i ); in tls1_prf()
528 ret = mbedtls_md_hmac_reset ( &md_ctx ); in tls1_prf()
531 ret = mbedtls_md_hmac_update( &md_ctx, tmp, 20 ); in tls1_prf()
534 ret = mbedtls_md_hmac_finish( &md_ctx, tmp ); in tls1_prf()
545 mbedtls_md_free( &md_ctx ); in tls1_prf()
699 mbedtls_md_context_t md_ctx; in tls_prf_generic() local
702 mbedtls_md_init( &md_ctx ); in tls_prf_generic()
725 if ( ( ret = mbedtls_md_setup( &md_ctx, md_info, 1 ) ) != 0 ) in tls_prf_generic()
728 ret = mbedtls_md_hmac_starts( &md_ctx, secret, slen ); in tls_prf_generic()
731 ret = mbedtls_md_hmac_update( &md_ctx, tmp + md_len, nb ); in tls_prf_generic()
734 ret = mbedtls_md_hmac_finish( &md_ctx, tmp ); in tls_prf_generic()
740 ret = mbedtls_md_hmac_reset ( &md_ctx ); in tls_prf_generic()
743 ret = mbedtls_md_hmac_update( &md_ctx, tmp, md_len + nb ); in tls_prf_generic()
746 ret = mbedtls_md_hmac_finish( &md_ctx, h_i ); in tls_prf_generic()
750 ret = mbedtls_md_hmac_reset ( &md_ctx ); in tls_prf_generic()
753 ret = mbedtls_md_hmac_update( &md_ctx, tmp, md_len ); in tls_prf_generic()
756 ret = mbedtls_md_hmac_finish( &md_ctx, tmp ); in tls_prf_generic()
767 mbedtls_md_free( &md_ctx ); in tls_prf_generic()