mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 22:45:48 +01:00
psa: Fix hash and mac operation type
The test entry points defined in psa_crypto_hash.c and psa_crypto_mac.c are supposed to be exact clones of the Mbed TLS driver entry points. Thus the operation type should be the Mbed TLS operation type not a test one. There was no compilation error as the hash and cipher operation test types are currently equal to the Mbed TLS ones. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
parent
fefa4580a5
commit
0c677c287b
@ -644,7 +644,7 @@ psa_status_t mbedtls_transparent_test_driver_hash_compute(
|
||||
}
|
||||
|
||||
psa_status_t mbedtls_transparent_test_driver_hash_setup(
|
||||
mbedtls_transparent_test_driver_hash_operation_t *operation,
|
||||
mbedtls_psa_hash_operation_t *operation,
|
||||
psa_algorithm_t alg )
|
||||
{
|
||||
if( is_hash_accelerated( alg ) )
|
||||
@ -654,8 +654,8 @@ psa_status_t mbedtls_transparent_test_driver_hash_setup(
|
||||
}
|
||||
|
||||
psa_status_t mbedtls_transparent_test_driver_hash_clone(
|
||||
const mbedtls_transparent_test_driver_hash_operation_t *source_operation,
|
||||
mbedtls_transparent_test_driver_hash_operation_t *target_operation )
|
||||
const mbedtls_psa_hash_operation_t *source_operation,
|
||||
mbedtls_psa_hash_operation_t *target_operation )
|
||||
{
|
||||
if( is_hash_accelerated( source_operation->alg ) )
|
||||
return( hash_clone( source_operation, target_operation ) );
|
||||
@ -664,7 +664,7 @@ psa_status_t mbedtls_transparent_test_driver_hash_clone(
|
||||
}
|
||||
|
||||
psa_status_t mbedtls_transparent_test_driver_hash_update(
|
||||
mbedtls_transparent_test_driver_hash_operation_t *operation,
|
||||
mbedtls_psa_hash_operation_t *operation,
|
||||
const uint8_t *input,
|
||||
size_t input_length )
|
||||
{
|
||||
@ -675,7 +675,7 @@ psa_status_t mbedtls_transparent_test_driver_hash_update(
|
||||
}
|
||||
|
||||
psa_status_t mbedtls_transparent_test_driver_hash_finish(
|
||||
mbedtls_transparent_test_driver_hash_operation_t *operation,
|
||||
mbedtls_psa_hash_operation_t *operation,
|
||||
uint8_t *hash,
|
||||
size_t hash_size,
|
||||
size_t *hash_length )
|
||||
@ -687,7 +687,7 @@ psa_status_t mbedtls_transparent_test_driver_hash_finish(
|
||||
}
|
||||
|
||||
psa_status_t mbedtls_transparent_test_driver_hash_abort(
|
||||
mbedtls_transparent_test_driver_hash_operation_t *operation )
|
||||
mbedtls_psa_hash_operation_t *operation )
|
||||
{
|
||||
return( hash_abort( operation ) );
|
||||
}
|
||||
|
@ -246,26 +246,26 @@ psa_status_t mbedtls_transparent_test_driver_hash_compute(
|
||||
size_t *hash_length);
|
||||
|
||||
psa_status_t mbedtls_transparent_test_driver_hash_setup(
|
||||
mbedtls_transparent_test_driver_hash_operation_t *operation,
|
||||
mbedtls_psa_hash_operation_t *operation,
|
||||
psa_algorithm_t alg );
|
||||
|
||||
psa_status_t mbedtls_transparent_test_driver_hash_clone(
|
||||
const mbedtls_transparent_test_driver_hash_operation_t *source_operation,
|
||||
mbedtls_transparent_test_driver_hash_operation_t *target_operation );
|
||||
const mbedtls_psa_hash_operation_t *source_operation,
|
||||
mbedtls_psa_hash_operation_t *target_operation );
|
||||
|
||||
psa_status_t mbedtls_transparent_test_driver_hash_update(
|
||||
mbedtls_transparent_test_driver_hash_operation_t *operation,
|
||||
mbedtls_psa_hash_operation_t *operation,
|
||||
const uint8_t *input,
|
||||
size_t input_length );
|
||||
|
||||
psa_status_t mbedtls_transparent_test_driver_hash_finish(
|
||||
mbedtls_transparent_test_driver_hash_operation_t *operation,
|
||||
mbedtls_psa_hash_operation_t *operation,
|
||||
uint8_t *hash,
|
||||
size_t hash_size,
|
||||
size_t *hash_length );
|
||||
|
||||
psa_status_t mbedtls_transparent_test_driver_hash_abort(
|
||||
mbedtls_transparent_test_driver_hash_operation_t *operation );
|
||||
mbedtls_psa_hash_operation_t *operation );
|
||||
|
||||
#endif /* PSA_CRYPTO_DRIVER_TEST */
|
||||
|
||||
|
@ -600,7 +600,7 @@ psa_status_t mbedtls_transparent_test_driver_mac_compute(
|
||||
}
|
||||
|
||||
psa_status_t mbedtls_transparent_test_driver_mac_sign_setup(
|
||||
mbedtls_transparent_test_driver_mac_operation_t *operation,
|
||||
mbedtls_psa_mac_operation_t *operation,
|
||||
const psa_key_attributes_t *attributes,
|
||||
const uint8_t *key_buffer,
|
||||
size_t key_buffer_size,
|
||||
@ -614,7 +614,7 @@ psa_status_t mbedtls_transparent_test_driver_mac_sign_setup(
|
||||
}
|
||||
|
||||
psa_status_t mbedtls_transparent_test_driver_mac_verify_setup(
|
||||
mbedtls_transparent_test_driver_mac_operation_t *operation,
|
||||
mbedtls_psa_mac_operation_t *operation,
|
||||
const psa_key_attributes_t *attributes,
|
||||
const uint8_t *key_buffer,
|
||||
size_t key_buffer_size,
|
||||
@ -628,7 +628,7 @@ psa_status_t mbedtls_transparent_test_driver_mac_verify_setup(
|
||||
}
|
||||
|
||||
psa_status_t mbedtls_transparent_test_driver_mac_update(
|
||||
mbedtls_transparent_test_driver_mac_operation_t *operation,
|
||||
mbedtls_psa_mac_operation_t *operation,
|
||||
const uint8_t *input,
|
||||
size_t input_length )
|
||||
{
|
||||
@ -639,7 +639,7 @@ psa_status_t mbedtls_transparent_test_driver_mac_update(
|
||||
}
|
||||
|
||||
psa_status_t mbedtls_transparent_test_driver_mac_sign_finish(
|
||||
mbedtls_transparent_test_driver_mac_operation_t *operation,
|
||||
mbedtls_psa_mac_operation_t *operation,
|
||||
uint8_t *mac,
|
||||
size_t mac_size,
|
||||
size_t *mac_length )
|
||||
@ -651,7 +651,7 @@ psa_status_t mbedtls_transparent_test_driver_mac_sign_finish(
|
||||
}
|
||||
|
||||
psa_status_t mbedtls_transparent_test_driver_mac_verify_finish(
|
||||
mbedtls_transparent_test_driver_mac_operation_t *operation,
|
||||
mbedtls_psa_mac_operation_t *operation,
|
||||
const uint8_t *mac,
|
||||
size_t mac_length )
|
||||
{
|
||||
@ -662,7 +662,7 @@ psa_status_t mbedtls_transparent_test_driver_mac_verify_finish(
|
||||
}
|
||||
|
||||
psa_status_t mbedtls_transparent_test_driver_mac_abort(
|
||||
mbedtls_transparent_test_driver_mac_operation_t *operation )
|
||||
mbedtls_psa_mac_operation_t *operation )
|
||||
{
|
||||
return( mac_abort( operation ) );
|
||||
}
|
||||
|
@ -291,37 +291,37 @@ psa_status_t mbedtls_transparent_test_driver_mac_compute(
|
||||
size_t *mac_length );
|
||||
|
||||
psa_status_t mbedtls_transparent_test_driver_mac_sign_setup(
|
||||
mbedtls_transparent_test_driver_mac_operation_t *operation,
|
||||
mbedtls_psa_mac_operation_t *operation,
|
||||
const psa_key_attributes_t *attributes,
|
||||
const uint8_t *key_buffer,
|
||||
size_t key_buffer_size,
|
||||
psa_algorithm_t alg );
|
||||
|
||||
psa_status_t mbedtls_transparent_test_driver_mac_verify_setup(
|
||||
mbedtls_transparent_test_driver_mac_operation_t *operation,
|
||||
mbedtls_psa_mac_operation_t *operation,
|
||||
const psa_key_attributes_t *attributes,
|
||||
const uint8_t *key_buffer,
|
||||
size_t key_buffer_size,
|
||||
psa_algorithm_t alg );
|
||||
|
||||
psa_status_t mbedtls_transparent_test_driver_mac_update(
|
||||
mbedtls_transparent_test_driver_mac_operation_t *operation,
|
||||
mbedtls_psa_mac_operation_t *operation,
|
||||
const uint8_t *input,
|
||||
size_t input_length );
|
||||
|
||||
psa_status_t mbedtls_transparent_test_driver_mac_sign_finish(
|
||||
mbedtls_transparent_test_driver_mac_operation_t *operation,
|
||||
mbedtls_psa_mac_operation_t *operation,
|
||||
uint8_t *mac,
|
||||
size_t mac_size,
|
||||
size_t *mac_length );
|
||||
|
||||
psa_status_t mbedtls_transparent_test_driver_mac_verify_finish(
|
||||
mbedtls_transparent_test_driver_mac_operation_t *operation,
|
||||
mbedtls_psa_mac_operation_t *operation,
|
||||
const uint8_t *mac,
|
||||
size_t mac_length );
|
||||
|
||||
psa_status_t mbedtls_transparent_test_driver_mac_abort(
|
||||
mbedtls_transparent_test_driver_mac_operation_t *operation );
|
||||
mbedtls_psa_mac_operation_t *operation );
|
||||
|
||||
#endif /* PSA_CRYPTO_DRIVER_TEST */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user