Lines Matching defs:tls12_prf

5497         if (operation->ctx.tls12_prf.secret != NULL) {
5498 mbedtls_zeroize_and_free(operation->ctx.tls12_prf.secret,
5499 operation->ctx.tls12_prf.secret_length);
5502 if (operation->ctx.tls12_prf.seed != NULL) {
5503 mbedtls_zeroize_and_free(operation->ctx.tls12_prf.seed,
5504 operation->ctx.tls12_prf.seed_length);
5507 if (operation->ctx.tls12_prf.label != NULL) {
5508 mbedtls_zeroize_and_free(operation->ctx.tls12_prf.label,
5509 operation->ctx.tls12_prf.label_length);
5512 if (operation->ctx.tls12_prf.other_secret != NULL) {
5513 mbedtls_zeroize_and_free(operation->ctx.tls12_prf.other_secret,
5514 operation->ctx.tls12_prf.other_secret_length);
5668 psa_tls12_prf_key_derivation_t *tls12_prf,
5682 if (tls12_prf->block_number == 0xff) {
5687 ++tls12_prf->block_number;
5688 tls12_prf->left_in_block = hash_length;
5709 tls12_prf->secret,
5710 tls12_prf->secret_length);
5715 /* Calculate A(i) where i = tls12_prf->block_number. */
5716 if (tls12_prf->block_number == 1) {
5721 tls12_prf->label,
5722 tls12_prf->label_length);
5727 tls12_prf->seed,
5728 tls12_prf->seed_length);
5734 status = psa_mac_update(&hmac, tls12_prf->Ai, hash_length);
5741 tls12_prf->Ai, hash_length,
5753 tls12_prf->secret,
5754 tls12_prf->secret_length);
5758 status = psa_mac_update(&hmac, tls12_prf->Ai, hash_length);
5762 status = psa_mac_update(&hmac, tls12_prf->label, tls12_prf->label_length);
5766 status = psa_mac_update(&hmac, tls12_prf->seed, tls12_prf->seed_length);
5771 tls12_prf->output_block, hash_length,
5788 psa_tls12_prf_key_derivation_t *tls12_prf,
5798 switch (tls12_prf->state) {
5800 tls12_prf->state = PSA_TLS12_PRF_STATE_OUTPUT;
5810 if (tls12_prf->left_in_block == 0) {
5811 status = psa_key_derivation_tls12_prf_generate_next_block(tls12_prf,
5820 if (tls12_prf->left_in_block > output_length) {
5823 length = tls12_prf->left_in_block;
5826 offset = hash_length - tls12_prf->left_in_block;
5827 memcpy(output, tls12_prf->output_block + offset, length);
5830 tls12_prf->left_in_block -= length;
6050 status = psa_key_derivation_tls12_prf_read(&operation->ctx.tls12_prf,
7322 status = psa_tls12_prf_input(&operation->ctx.tls12_prf,
7328 status = psa_tls12_prf_psk_to_ms_input(&operation->ctx.tls12_prf,