mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-23 16:20:49 +00:00
Add interuptible export public-key testing to invalid key tests
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
This commit is contained in:
parent
f466a284c1
commit
54ba963575
@ -222,6 +222,9 @@ static int test_operations_on_invalid_key(mbedtls_svc_key_id_t key)
|
||||
{
|
||||
psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
|
||||
mbedtls_svc_key_id_t key_id = mbedtls_svc_key_id_make(1, 0x6964);
|
||||
#if defined(MBEDTLS_ECP_RESTARTABLE)
|
||||
psa_export_public_key_iop_t export_key_iop = PSA_EXPORT_PUBLIC_KEY_IOP_INIT;
|
||||
#endif
|
||||
uint8_t buffer[1];
|
||||
size_t length;
|
||||
int ok = 0;
|
||||
@ -248,6 +251,11 @@ static int test_operations_on_invalid_key(mbedtls_svc_key_id_t key)
|
||||
buffer, sizeof(buffer), &length),
|
||||
PSA_ERROR_INVALID_HANDLE);
|
||||
|
||||
#if defined(MBEDTLS_ECP_RESTARTABLE)
|
||||
TEST_EQUAL(psa_export_public_key_iop_setup(&export_key_iop, key),
|
||||
PSA_ERROR_INVALID_HANDLE);
|
||||
#endif
|
||||
|
||||
ok = 1;
|
||||
|
||||
exit:
|
||||
|
Loading…
x
Reference in New Issue
Block a user