diff options
author | Przemek Stekiel <przemyslaw.stekiel@mobica.com> | 2022-06-14 11:41:52 +0200 |
---|---|---|
committer | Przemek Stekiel <przemyslaw.stekiel@mobica.com> | 2022-06-14 11:41:52 +0200 |
commit | d898745f706f5bb9e8f9cc6cd0cc9e65caf5864b (patch) | |
tree | 34f8281ee20698e1afc016d4e6a979a844e215b1 /tests/src | |
parent | 69c4679b227128429dc84d0af1782cdacde0e26f (diff) | |
download | mbedtls-d898745f706f5bb9e8f9cc6cd0cc9e65caf5864b.zip mbedtls-d898745f706f5bb9e8f9cc6cd0cc9e65caf5864b.tar.gz mbedtls-d898745f706f5bb9e8f9cc6cd0cc9e65caf5864b.tar.bz2 |
exercise_key_agreement_key: provide SALT for HKDF_EXTRACT
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/psa_exercise_key.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/src/psa_exercise_key.c b/tests/src/psa_exercise_key.c index 9576afd..20d3102 100644 --- a/tests/src/psa_exercise_key.c +++ b/tests/src/psa_exercise_key.c @@ -641,6 +641,13 @@ static int exercise_key_agreement_key( mbedtls_svc_key_id_t key, input, sizeof( input ) ) ); } + if( PSA_ALG_IS_HKDF_EXTRACT( kdf_alg ) ) + { + PSA_ASSERT( psa_key_derivation_input_bytes( + &operation, PSA_KEY_DERIVATION_INPUT_SALT, + input, sizeof( input ) ) ); + } + PSA_ASSERT( mbedtls_test_psa_key_agreement_with_self( &operation, key ) ); if( PSA_ALG_IS_TLS12_PRF( kdf_alg ) || |