Update test
Testing the hash length in this context is not applicable because there is no way to specify it when calling mbedtls_psa_hkdf_extract. Change to test invalid `alg` parameter. Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
parent
ebc9368173
commit
5d7d201b87
2 changed files with 4 additions and 4 deletions
|
@ -4420,7 +4420,7 @@ SSL TLS 1.3 Key schedule: HKDF RFC5869 Test Vector #7 Extract
|
|||
depends_on:PSA_WANT_ALG_SHA_1
|
||||
psa_hkdf_extract:PSA_ALG_HMAC(PSA_ALG_SHA_1):"0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c":"":"2adccada18779e7c2077ad2eb19d3f3e731385dd"
|
||||
|
||||
SSL TLS 1.3 Key schedule: HKDF extract fails with hash_len of 0
|
||||
SSL TLS 1.3 Key schedule: HKDF extract fails with wrong hash alg
|
||||
psa_hkdf_extract_ret:0:MBEDTLS_ERR_SSL_BAD_INPUT_DATA
|
||||
|
||||
SSL TLS 1.3 Key schedule: HKDF RFC5869 Test Vector #1 Expand
|
||||
|
|
|
@ -3842,7 +3842,7 @@ exit:
|
|||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_TEST_HOOKS:MBEDTLS_SSL_PROTO_TLS1_3 */
|
||||
void psa_hkdf_extract_ret( int hash_len, int ret )
|
||||
void psa_hkdf_extract_ret( int alg, int ret )
|
||||
{
|
||||
int output_ret;
|
||||
unsigned char *salt = NULL;
|
||||
|
@ -3850,13 +3850,13 @@ void psa_hkdf_extract_ret( int hash_len, int ret )
|
|||
unsigned char *prk = NULL;
|
||||
size_t salt_len, ikm_len, prk_len;
|
||||
|
||||
salt_len = hash_len;
|
||||
ASSERT_ALLOC( prk, PSA_MAC_MAX_SIZE);
|
||||
salt_len = 0;
|
||||
ikm_len = 0;
|
||||
prk_len = 0;
|
||||
|
||||
PSA_ASSERT( psa_crypto_init() );
|
||||
output_ret = mbedtls_psa_hkdf_extract( 0, salt, salt_len,
|
||||
output_ret = mbedtls_psa_hkdf_extract( alg, salt, salt_len,
|
||||
ikm, ikm_len,
|
||||
prk, PSA_MAC_MAX_SIZE, &prk_len );
|
||||
TEST_ASSERT( output_ret == ret );
|
||||
|
|
Loading…
Reference in a new issue