mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-15 02:01:57 -04:00
Move the setting of id in driver wrappers
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
parent
fcb5cdc954
commit
d7ab9f1260
@ -1458,26 +1458,25 @@ psa_status_t psa_driver_wrapper_aead_encrypt_setup(
|
|||||||
|
|
||||||
#if defined(PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT)
|
#if defined(PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT)
|
||||||
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
||||||
|
operation->id = PSA_CRYPTO_TRANSPARENT_TEST_DRIVER_ID;
|
||||||
status = mbedtls_test_transparent_aead_encrypt_setup(
|
status = mbedtls_test_transparent_aead_encrypt_setup(
|
||||||
&operation->ctx.transparent_test_driver_ctx,
|
&operation->ctx.transparent_test_driver_ctx,
|
||||||
attributes, key_buffer, key_buffer_size,
|
attributes, key_buffer, key_buffer_size,
|
||||||
alg );
|
alg );
|
||||||
/* Declared with fallback == true */
|
|
||||||
operation->id = PSA_CRYPTO_TRANSPARENT_TEST_DRIVER_ID;
|
|
||||||
|
|
||||||
|
/* Declared with fallback == true */
|
||||||
if( status != PSA_ERROR_NOT_SUPPORTED )
|
if( status != PSA_ERROR_NOT_SUPPORTED )
|
||||||
return( status );
|
return( status );
|
||||||
#endif /* PSA_CRYPTO_DRIVER_TEST */
|
#endif /* PSA_CRYPTO_DRIVER_TEST */
|
||||||
#endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
|
#endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
|
||||||
|
|
||||||
/* Fell through, meaning no accelerator supports this operation */
|
/* Fell through, meaning no accelerator supports this operation */
|
||||||
|
operation->id = PSA_CRYPTO_MBED_TLS_DRIVER_ID;
|
||||||
status = mbedtls_psa_aead_encrypt_setup(
|
status = mbedtls_psa_aead_encrypt_setup(
|
||||||
&operation->ctx.mbedtls_ctx, attributes,
|
&operation->ctx.mbedtls_ctx, attributes,
|
||||||
key_buffer, key_buffer_size,
|
key_buffer, key_buffer_size,
|
||||||
alg );
|
alg );
|
||||||
|
|
||||||
operation->id = PSA_CRYPTO_MBED_TLS_DRIVER_ID;
|
|
||||||
|
|
||||||
return( status );
|
return( status );
|
||||||
|
|
||||||
/* Add cases for opaque driver here */
|
/* Add cases for opaque driver here */
|
||||||
@ -1507,28 +1506,27 @@ psa_status_t psa_driver_wrapper_aead_decrypt_setup(
|
|||||||
|
|
||||||
#if defined(PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT)
|
#if defined(PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT)
|
||||||
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
||||||
|
operation->id = PSA_CRYPTO_TRANSPARENT_TEST_DRIVER_ID;
|
||||||
status = mbedtls_test_transparent_aead_decrypt_setup(
|
status = mbedtls_test_transparent_aead_decrypt_setup(
|
||||||
&operation->ctx.transparent_test_driver_ctx,
|
&operation->ctx.transparent_test_driver_ctx,
|
||||||
attributes,
|
attributes,
|
||||||
key_buffer, key_buffer_size,
|
key_buffer, key_buffer_size,
|
||||||
alg );
|
alg );
|
||||||
/* Declared with fallback == true */
|
|
||||||
operation->id = PSA_CRYPTO_TRANSPARENT_TEST_DRIVER_ID;
|
|
||||||
|
|
||||||
|
/* Declared with fallback == true */
|
||||||
if( status != PSA_ERROR_NOT_SUPPORTED )
|
if( status != PSA_ERROR_NOT_SUPPORTED )
|
||||||
return( status );
|
return( status );
|
||||||
#endif /* PSA_CRYPTO_DRIVER_TEST */
|
#endif /* PSA_CRYPTO_DRIVER_TEST */
|
||||||
#endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
|
#endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
|
||||||
|
|
||||||
/* Fell through, meaning no accelerator supports this operation */
|
/* Fell through, meaning no accelerator supports this operation */
|
||||||
|
operation->id = PSA_CRYPTO_MBED_TLS_DRIVER_ID;
|
||||||
status = mbedtls_psa_aead_decrypt_setup(
|
status = mbedtls_psa_aead_decrypt_setup(
|
||||||
&operation->ctx.mbedtls_ctx,
|
&operation->ctx.mbedtls_ctx,
|
||||||
attributes,
|
attributes,
|
||||||
key_buffer, key_buffer_size,
|
key_buffer, key_buffer_size,
|
||||||
alg );
|
alg );
|
||||||
|
|
||||||
operation->id = PSA_CRYPTO_MBED_TLS_DRIVER_ID;
|
|
||||||
|
|
||||||
return( status );
|
return( status );
|
||||||
|
|
||||||
/* Add cases for opaque driver here */
|
/* Add cases for opaque driver here */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user