check_config/block_cipher: minor improvements

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
Valerio Setti 2023-12-28 14:01:22 +01:00
parent ab0494f193
commit 1994e72e18
2 changed files with 5 additions and 7 deletions

View File

@ -334,16 +334,14 @@
#undef MBEDTLS_HAS_MEMSAN
#if defined(MBEDTLS_CCM_C) && \
!(defined(MBEDTLS_BLOCK_CIPHER_CAN_AES) || defined(MBEDTLS_AES_C) || \
defined(MBEDTLS_BLOCK_CIPHER_CAN_ARIA) || defined(MBEDTLS_ARIA_C) || \
defined(MBEDTLS_BLOCK_CIPHER_CAN_CAMELLIA) || defined(MBEDTLS_CAMELLIA_C))
!(defined(MBEDTLS_CCM_GCM_CAN_AES) || defined(MBEDTLS_CCM_GCM_CAN_ARIA) || \
defined(MBEDTLS_CCM_GCM_CAN_CAMELLIA))
#error "MBEDTLS_CCM_C defined, but not all prerequisites"
#endif
#if defined(MBEDTLS_GCM_C) && \
!(defined(MBEDTLS_BLOCK_CIPHER_CAN_AES) || defined(MBEDTLS_AES_C) || \
defined(MBEDTLS_BLOCK_CIPHER_CAN_ARIA) || defined(MBEDTLS_ARIA_C) || \
defined(MBEDTLS_BLOCK_CIPHER_CAN_CAMELLIA) || defined(MBEDTLS_CAMELLIA_C))
!(defined(MBEDTLS_CCM_GCM_CAN_AES) || defined(MBEDTLS_CCM_GCM_CAN_ARIA) || \
defined(MBEDTLS_CCM_GCM_CAN_CAMELLIA))
#error "MBEDTLS_GCM_C defined, but not all prerequisites"
#endif

View File

@ -42,7 +42,7 @@ static psa_key_type_t psa_key_type_from_block_cipher_id(mbedtls_block_cipher_id_
}
}
int mbedtls_cipher_error_from_psa(psa_status_t status)
static int mbedtls_cipher_error_from_psa(psa_status_t status)
{
return PSA_TO_MBEDTLS_ERR_LIST(status, psa_to_cipher_errors,
psa_generic_status_to_mbedtls);