Fix typos, comments, style, optimize macros

Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
Przemek Stekiel 2022-12-15 13:28:02 +01:00
parent 87d9a4a30c
commit 654bef0be0
7 changed files with 31 additions and 32 deletions

View file

@ -791,7 +791,10 @@ int mbedtls_test_psa_exported_key_sanity_check(
}
} else
if (PSA_KEY_TYPE_IS_DH_PUBLIC_KEY(type) || PSA_KEY_TYPE_IS_DH_KEY_PAIR(type)) {
TEST_LE_U(exported_length, PSA_BITS_TO_BYTES(bits));
TEST_ASSERT(exported_length <=
PSA_EXPORT_PUBLIC_KEY_OUTPUT_SIZE(type, bits));
TEST_ASSERT(exported_length <=
PSA_EXPORT_PUBLIC_KEY_MAX_SIZE);
} else {
(void) exported;
TEST_ASSERT(!"Sanity check not implemented for this key type");