diff --git a/library/psa_crypto.c b/library/psa_crypto.c index e821ef682..953a3ede5 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -5012,8 +5012,10 @@ static psa_status_t psa_tls12_prf_psk_to_ms_input( size_t data_length ) { if( step == PSA_KEY_DERIVATION_INPUT_SECRET ) + { return( psa_tls12_prf_psk_to_ms_set_key( prf, hash_alg, data, data_length ) ); + } return( psa_tls12_prf_input( prf, hash_alg, step, data, data_length ) ); } diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function index 8e638b68d..48f533764 100644 --- a/tests/suites/test_suite_psa_crypto.function +++ b/tests/suites/test_suite_psa_crypto.function @@ -1803,10 +1803,12 @@ void derive_key_policy( int policy_usage, if( PSA_ALG_IS_TLS12_PRF( exercise_alg ) || PSA_ALG_IS_TLS12_PSK_TO_MS( exercise_alg ) ) + { PSA_ASSERT( psa_key_derivation_input_bytes( &operation, PSA_KEY_DERIVATION_INPUT_SEED, (const uint8_t*) "", 0) ); + } status = psa_key_derivation_input_key( &operation, PSA_KEY_DERIVATION_INPUT_SECRET,