Add sanity check for FFDH key excercise
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
parent
9e65a81ef8
commit
7cf26dfca3
1 changed files with 3 additions and 0 deletions
|
@ -789,6 +789,9 @@ int mbedtls_test_psa_exported_key_sanity_check(
|
||||||
TEST_EQUAL(1 + 2 * PSA_BITS_TO_BYTES(bits), exported_length);
|
TEST_EQUAL(1 + 2 * PSA_BITS_TO_BYTES(bits), exported_length);
|
||||||
TEST_EQUAL(exported[0], 4);
|
TEST_EQUAL(exported[0], 4);
|
||||||
}
|
}
|
||||||
|
} 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));
|
||||||
} else {
|
} else {
|
||||||
(void) exported;
|
(void) exported;
|
||||||
TEST_ASSERT(!"Sanity check not implemented for this key type");
|
TEST_ASSERT(!"Sanity check not implemented for this key type");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue