1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

Finish backporting hits_export_public_key;

A previous commit backported the declaration of this field as part of
conflict resolution in the hope of preventing further conflicts in the
future. But if we backport it we should do it properly. This commit
finishes the job.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
Manuel Pégourié-Gonnard
2024-04-03 09:54:49 +02:00
parent d3590a8c09
commit 70d8fea2dc
2 changed files with 3 additions and 1 deletions

View File

@ -292,6 +292,7 @@ psa_status_t mbedtls_test_transparent_export_public_key(
uint8_t *data, size_t data_size, size_t *data_length)
{
++mbedtls_test_driver_key_management_hooks.hits;
++mbedtls_test_driver_key_management_hooks.hits_export_public_key;
if (mbedtls_test_driver_key_management_hooks.forced_status != PSA_SUCCESS) {
return mbedtls_test_driver_key_management_hooks.forced_status;

View File

@ -426,6 +426,7 @@ void export_key(int force_status_arg,
mbedtls_test_driver_key_management_hooks.hits = 0;
mbedtls_test_driver_key_management_hooks.forced_status = force_status;
mbedtls_test_driver_key_management_hooks.hits_export_public_key = 0;
if (PSA_KEY_TYPE_IS_ECC_PUBLIC_KEY(output_key_type)) {
actual_status = psa_export_public_key(handle,
@ -442,7 +443,7 @@ void export_key(int force_status_arg,
if (PSA_KEY_TYPE_IS_ECC_PUBLIC_KEY(output_key_type) &&
!PSA_KEY_TYPE_IS_ECC_PUBLIC_KEY(input_key_type)) {
TEST_EQUAL(mbedtls_test_driver_key_management_hooks.hits, 1);
TEST_EQUAL(mbedtls_test_driver_key_management_hooks.hits_export_public_key, 1);
}
if (actual_status == PSA_SUCCESS) {