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:
@ -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;
|
||||
|
@ -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) {
|
||||
|
Reference in New Issue
Block a user