mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-23 06:35:47 +01:00
Rename hash test driver functions to match auto-naming scheme
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
This commit is contained in:
parent
d029b60770
commit
25555227e5
@ -1084,7 +1084,7 @@ psa_status_t psa_driver_wrapper_hash_compute(
|
|||||||
|
|
||||||
/* Try accelerators first */
|
/* Try accelerators first */
|
||||||
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
||||||
status = test_transparent_hash_compute( alg, input, input_length,
|
status = mbedtls_transparent_test_driver_hash_compute( alg, input, input_length,
|
||||||
hash, hash_size, hash_length );
|
hash, hash_size, hash_length );
|
||||||
if( status != PSA_ERROR_NOT_SUPPORTED )
|
if( status != PSA_ERROR_NOT_SUPPORTED )
|
||||||
return( status );
|
return( status );
|
||||||
@ -1116,7 +1116,7 @@ psa_status_t psa_driver_wrapper_hash_setup(
|
|||||||
|
|
||||||
/* Try setup on accelerators first */
|
/* Try setup on accelerators first */
|
||||||
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
||||||
status = test_transparent_hash_setup( &operation->ctx.test_ctx, alg );
|
status = mbedtls_transparent_test_driver_hash_setup( &operation->ctx.test_ctx, alg );
|
||||||
if( status == PSA_SUCCESS )
|
if( status == PSA_SUCCESS )
|
||||||
operation->id = PSA_CRYPTO_TRANSPARENT_TEST_DRIVER_ID;
|
operation->id = PSA_CRYPTO_TRANSPARENT_TEST_DRIVER_ID;
|
||||||
|
|
||||||
@ -1149,7 +1149,7 @@ psa_status_t psa_driver_wrapper_hash_clone(
|
|||||||
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
||||||
case PSA_CRYPTO_TRANSPARENT_TEST_DRIVER_ID:
|
case PSA_CRYPTO_TRANSPARENT_TEST_DRIVER_ID:
|
||||||
target_operation->id = PSA_CRYPTO_TRANSPARENT_TEST_DRIVER_ID;
|
target_operation->id = PSA_CRYPTO_TRANSPARENT_TEST_DRIVER_ID;
|
||||||
return( test_transparent_hash_clone( &source_operation->ctx.test_ctx,
|
return( mbedtls_transparent_test_driver_hash_clone( &source_operation->ctx.test_ctx,
|
||||||
&target_operation->ctx.test_ctx ) );
|
&target_operation->ctx.test_ctx ) );
|
||||||
#endif
|
#endif
|
||||||
#if defined(MBEDTLS_PSA_BUILTIN_HASH)
|
#if defined(MBEDTLS_PSA_BUILTIN_HASH)
|
||||||
@ -1174,7 +1174,7 @@ psa_status_t psa_driver_wrapper_hash_update(
|
|||||||
{
|
{
|
||||||
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
||||||
case PSA_CRYPTO_TRANSPARENT_TEST_DRIVER_ID:
|
case PSA_CRYPTO_TRANSPARENT_TEST_DRIVER_ID:
|
||||||
return( test_transparent_hash_update( &operation->ctx.test_ctx,
|
return( mbedtls_transparent_test_driver_hash_update( &operation->ctx.test_ctx,
|
||||||
input, input_length ) );
|
input, input_length ) );
|
||||||
#endif
|
#endif
|
||||||
#if defined(MBEDTLS_PSA_BUILTIN_HASH)
|
#if defined(MBEDTLS_PSA_BUILTIN_HASH)
|
||||||
@ -1200,7 +1200,7 @@ psa_status_t psa_driver_wrapper_hash_finish(
|
|||||||
{
|
{
|
||||||
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
||||||
case PSA_CRYPTO_TRANSPARENT_TEST_DRIVER_ID:
|
case PSA_CRYPTO_TRANSPARENT_TEST_DRIVER_ID:
|
||||||
return( test_transparent_hash_finish( &operation->ctx.test_ctx,
|
return( mbedtls_transparent_test_driver_hash_finish( &operation->ctx.test_ctx,
|
||||||
hash, hash_size, hash_length ) );
|
hash, hash_size, hash_length ) );
|
||||||
#endif
|
#endif
|
||||||
#if defined(MBEDTLS_PSA_BUILTIN_HASH)
|
#if defined(MBEDTLS_PSA_BUILTIN_HASH)
|
||||||
@ -1225,7 +1225,7 @@ psa_status_t psa_driver_wrapper_hash_abort(
|
|||||||
{
|
{
|
||||||
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
||||||
case PSA_CRYPTO_TRANSPARENT_TEST_DRIVER_ID:
|
case PSA_CRYPTO_TRANSPARENT_TEST_DRIVER_ID:
|
||||||
return( test_transparent_hash_abort( &operation->ctx.test_ctx ) );
|
return( mbedtls_transparent_test_driver_hash_abort( &operation->ctx.test_ctx ) );
|
||||||
#endif
|
#endif
|
||||||
#if defined(MBEDTLS_PSA_BUILTIN_HASH)
|
#if defined(MBEDTLS_PSA_BUILTIN_HASH)
|
||||||
case PSA_CRYPTO_MBED_TLS_DRIVER_ID:
|
case PSA_CRYPTO_MBED_TLS_DRIVER_ID:
|
||||||
|
@ -46,7 +46,7 @@ typedef union {
|
|||||||
unsigned dummy; /* Make sure this structure is always non-empty */
|
unsigned dummy; /* Make sure this structure is always non-empty */
|
||||||
mbedtls_psa_hash_operation_t mbedtls_ctx;
|
mbedtls_psa_hash_operation_t mbedtls_ctx;
|
||||||
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
||||||
test_transparent_hash_operation_t test_ctx;
|
mbedtls_transparent_test_driver_hash_operation_t test_ctx;
|
||||||
#endif
|
#endif
|
||||||
} psa_driver_hash_context_t;
|
} psa_driver_hash_context_t;
|
||||||
|
|
||||||
|
@ -541,7 +541,7 @@ psa_status_t is_hash_accelerated( psa_algorithm_t alg )
|
|||||||
}
|
}
|
||||||
#endif /* INCLUDE_HASH_TEST_DRIVER */
|
#endif /* INCLUDE_HASH_TEST_DRIVER */
|
||||||
|
|
||||||
psa_status_t test_transparent_hash_compute(
|
psa_status_t mbedtls_transparent_test_driver_hash_compute(
|
||||||
psa_algorithm_t alg,
|
psa_algorithm_t alg,
|
||||||
const uint8_t *input,
|
const uint8_t *input,
|
||||||
size_t input_length,
|
size_t input_length,
|
||||||
@ -566,8 +566,8 @@ psa_status_t test_transparent_hash_compute(
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
psa_status_t test_transparent_hash_setup(
|
psa_status_t mbedtls_transparent_test_driver_hash_setup(
|
||||||
test_transparent_hash_operation_t *operation,
|
mbedtls_transparent_test_driver_hash_operation_t *operation,
|
||||||
psa_algorithm_t alg )
|
psa_algorithm_t alg )
|
||||||
{
|
{
|
||||||
#if defined(INCLUDE_HASH_TEST_DRIVER)
|
#if defined(INCLUDE_HASH_TEST_DRIVER)
|
||||||
@ -582,9 +582,9 @@ psa_status_t test_transparent_hash_setup(
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
psa_status_t test_transparent_hash_clone(
|
psa_status_t mbedtls_transparent_test_driver_hash_clone(
|
||||||
const test_transparent_hash_operation_t *source_operation,
|
const mbedtls_transparent_test_driver_hash_operation_t *source_operation,
|
||||||
test_transparent_hash_operation_t *target_operation )
|
mbedtls_transparent_test_driver_hash_operation_t *target_operation )
|
||||||
{
|
{
|
||||||
#if defined(INCLUDE_HASH_TEST_DRIVER)
|
#if defined(INCLUDE_HASH_TEST_DRIVER)
|
||||||
if( is_hash_accelerated( source_operation->operation.alg ) == PSA_SUCCESS )
|
if( is_hash_accelerated( source_operation->operation.alg ) == PSA_SUCCESS )
|
||||||
@ -599,8 +599,8 @@ psa_status_t test_transparent_hash_clone(
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
psa_status_t test_transparent_hash_update(
|
psa_status_t mbedtls_transparent_test_driver_hash_update(
|
||||||
test_transparent_hash_operation_t *operation,
|
mbedtls_transparent_test_driver_hash_operation_t *operation,
|
||||||
const uint8_t *input,
|
const uint8_t *input,
|
||||||
size_t input_length )
|
size_t input_length )
|
||||||
{
|
{
|
||||||
@ -618,8 +618,8 @@ psa_status_t test_transparent_hash_update(
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
psa_status_t test_transparent_hash_finish(
|
psa_status_t mbedtls_transparent_test_driver_hash_finish(
|
||||||
test_transparent_hash_operation_t *operation,
|
mbedtls_transparent_test_driver_hash_operation_t *operation,
|
||||||
uint8_t *hash,
|
uint8_t *hash,
|
||||||
size_t hash_size,
|
size_t hash_size,
|
||||||
size_t *hash_length )
|
size_t *hash_length )
|
||||||
@ -639,8 +639,8 @@ psa_status_t test_transparent_hash_finish(
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
psa_status_t test_transparent_hash_abort(
|
psa_status_t mbedtls_transparent_test_driver_hash_abort(
|
||||||
test_transparent_hash_operation_t *operation )
|
mbedtls_transparent_test_driver_hash_operation_t *operation )
|
||||||
{
|
{
|
||||||
#if defined(INCLUDE_HASH_TEST_DRIVER)
|
#if defined(INCLUDE_HASH_TEST_DRIVER)
|
||||||
return( mbedtls_psa_hash_abort( &operation->operation ) );
|
return( mbedtls_psa_hash_abort( &operation->operation ) );
|
||||||
|
@ -278,9 +278,9 @@ psa_status_t mbedtls_psa_hash_abort(
|
|||||||
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
||||||
typedef struct {
|
typedef struct {
|
||||||
mbedtls_psa_hash_operation_t operation;
|
mbedtls_psa_hash_operation_t operation;
|
||||||
} test_transparent_hash_operation_t;
|
} mbedtls_transparent_test_driver_hash_operation_t;
|
||||||
|
|
||||||
psa_status_t test_transparent_hash_compute(
|
psa_status_t mbedtls_transparent_test_driver_hash_compute(
|
||||||
psa_algorithm_t alg,
|
psa_algorithm_t alg,
|
||||||
const uint8_t *input,
|
const uint8_t *input,
|
||||||
size_t input_length,
|
size_t input_length,
|
||||||
@ -288,27 +288,27 @@ psa_status_t test_transparent_hash_compute(
|
|||||||
size_t hash_size,
|
size_t hash_size,
|
||||||
size_t *hash_length);
|
size_t *hash_length);
|
||||||
|
|
||||||
psa_status_t test_transparent_hash_setup(
|
psa_status_t mbedtls_transparent_test_driver_hash_setup(
|
||||||
test_transparent_hash_operation_t *operation,
|
mbedtls_transparent_test_driver_hash_operation_t *operation,
|
||||||
psa_algorithm_t alg );
|
psa_algorithm_t alg );
|
||||||
|
|
||||||
psa_status_t test_transparent_hash_clone(
|
psa_status_t mbedtls_transparent_test_driver_hash_clone(
|
||||||
const test_transparent_hash_operation_t *source_operation,
|
const mbedtls_transparent_test_driver_hash_operation_t *source_operation,
|
||||||
test_transparent_hash_operation_t *target_operation );
|
mbedtls_transparent_test_driver_hash_operation_t *target_operation );
|
||||||
|
|
||||||
psa_status_t test_transparent_hash_update(
|
psa_status_t mbedtls_transparent_test_driver_hash_update(
|
||||||
test_transparent_hash_operation_t *operation,
|
mbedtls_transparent_test_driver_hash_operation_t *operation,
|
||||||
const uint8_t *input,
|
const uint8_t *input,
|
||||||
size_t input_length );
|
size_t input_length );
|
||||||
|
|
||||||
psa_status_t test_transparent_hash_finish(
|
psa_status_t mbedtls_transparent_test_driver_hash_finish(
|
||||||
test_transparent_hash_operation_t *operation,
|
mbedtls_transparent_test_driver_hash_operation_t *operation,
|
||||||
uint8_t *hash,
|
uint8_t *hash,
|
||||||
size_t hash_size,
|
size_t hash_size,
|
||||||
size_t *hash_length );
|
size_t *hash_length );
|
||||||
|
|
||||||
psa_status_t test_transparent_hash_abort(
|
psa_status_t mbedtls_transparent_test_driver_hash_abort(
|
||||||
test_transparent_hash_operation_t *operation );
|
mbedtls_transparent_test_driver_hash_operation_t *operation );
|
||||||
|
|
||||||
#endif /* PSA_CRYPTO_DRIVER_TEST */
|
#endif /* PSA_CRYPTO_DRIVER_TEST */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user