diff --git a/tests/suites/test_suite_psa_crypto.data b/tests/suites/test_suite_psa_crypto.data index cdce15d414..894317e326 100644 --- a/tests/suites/test_suite_psa_crypto.data +++ b/tests/suites/test_suite_psa_crypto.data @@ -302,7 +302,7 @@ hash_setup:PSA_ALG_SHA_256:PSA_SUCCESS PSA hash setup: bad (unknown hash algorithm) depends_on:MBEDTLS_MD_C:MBEDTLS_SHA256_C -hash_setup:0x80000000 | PSA_ALG_SHA_256:PSA_ERROR_NOT_SUPPORTED +hash_setup:PSA_ALG_CATEGORY_HASH:PSA_ERROR_NOT_SUPPORTED PSA hash setup: bad (not a hash algorithm) depends_on:MBEDTLS_MD_C:MBEDTLS_SHA256_C @@ -1099,8 +1099,8 @@ generate_random:19 PSA generate random: 260 bytes generate_random:260 -PSA generate key: bad type (0xffffffff) -generate_key:0xffffffff:128:PSA_KEY_USAGE_EXPORT:0:PSA_ERROR_NOT_SUPPORTED +PSA generate key: bad type (PSA_KEY_TYPE_CATEGORY_MASK) +generate_key:PSA_KEY_TYPE_CATEGORY_MASK:128:PSA_KEY_USAGE_EXPORT:0:PSA_ERROR_NOT_SUPPORTED PSA generate key: bad type (RSA public key) generate_key:PSA_KEY_TYPE_RSA_PUBLIC_KEY:512:PSA_KEY_USAGE_EXPORT:0:PSA_ERROR_NOT_SUPPORTED @@ -1115,7 +1115,7 @@ PSA generate key: raw data, 8 bits generate_key:PSA_KEY_TYPE_RAW_DATA:8:PSA_KEY_USAGE_EXPORT:0:PSA_SUCCESS PSA generate key: AES, 128 bits, CTR -depends_on:MBEDTLS_AES_C +depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR generate_key:PSA_KEY_TYPE_AES:128:PSA_KEY_USAGE_EXPORT | PSA_KEY_USAGE_ENCRYPT | PSA_KEY_USAGE_DECRYPT:PSA_ALG_CTR:PSA_SUCCESS PSA generate key: AES, 128 bits, GCM diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function index 51144f9b28..2e0804bf5c 100644 --- a/tests/suites/test_suite_psa_crypto.function +++ b/tests/suites/test_suite_psa_crypto.function @@ -57,7 +57,7 @@ static int asn1_write_10x( unsigned char **p, return( MBEDTLS_ERR_ASN1_INVALID_DATA ); if( bits <= 8 && x >= 1 << ( bits - 1 ) ) return( MBEDTLS_ERR_ASN1_INVALID_DATA ); - if( *p < start || *p - start < (ssize_t) len ) + if( *p < start || *p - start < (ptrdiff_t) len ) return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL ); *p -= len; ( *p )[len-1] = x; @@ -530,7 +530,7 @@ void import_export( data_t *data, TEST_ASSERT( data != NULL ); TEST_ASSERT( PSA_CRYPTO_TEST_SIZE_T_RANGE( data->len ) ); - export_size = (ssize_t) data->len + export_size_delta; + export_size = (ptrdiff_t) data->len + export_size_delta; exported = mbedtls_calloc( 1, export_size ); TEST_ASSERT( exported != NULL ); if( ! canonical_input ) @@ -631,7 +631,7 @@ void import_export_public_key( data_t *data, TEST_ASSERT( data != NULL ); TEST_ASSERT( PSA_CRYPTO_TEST_SIZE_T_RANGE( data->len ) ); - export_size = (ssize_t) data->len; + export_size = (ptrdiff_t) data->len; exported = mbedtls_calloc( 1, export_size ); TEST_ASSERT( exported != NULL );