mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
psa: cipher: Dispatch based on driver identifier
For cipher multi-part operations, dispatch based on the driver identifier even in the case of the Mbed TLS software implementation (viewed as a driver). Also use the driver identifier to check that an cipher operation context is active or not. This aligns the way hash and cipher multi-part operations are dispatched. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
@ -49,13 +49,7 @@ static psa_status_t cipher_setup(
|
||||
* available for the given algorithm & key. */
|
||||
mbedtls_cipher_init( &operation->ctx.cipher );
|
||||
|
||||
/* Once the cipher context is initialised, it needs to be freed using
|
||||
* psa_cipher_abort. Indicate there is something to be freed through setting
|
||||
* alg, and indicate the operation is being done using mbedtls crypto through
|
||||
* setting mbedtls_in_use. */
|
||||
operation->alg = alg;
|
||||
operation->mbedtls_in_use = 1;
|
||||
|
||||
key_bits = attributes->core.bits;
|
||||
cipher_info = mbedtls_cipher_info_from_psa( alg, key_type,
|
||||
key_bits, NULL );
|
||||
|
Reference in New Issue
Block a user