mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-27 15:35:50 +00:00
Remove superfluous call in PSA cipher setup
As pointed out by Ronald. The key slot is populated using get_key_from_slot, and after calling the driver the slot is validated to not contain an external key, so calling get_transparent_key is superfluous. Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
This commit is contained in:
parent
16afd3d9b4
commit
b5e52f2e31
@ -4112,11 +4112,7 @@ static psa_status_t psa_cipher_setup( psa_cipher_operation_t *operation,
|
||||
* available for the given algorithm & key. */
|
||||
mbedtls_cipher_init( &operation->ctx.cipher );
|
||||
|
||||
status = psa_get_transparent_key( handle, &slot, usage, alg);
|
||||
if( status != PSA_SUCCESS )
|
||||
goto exit;
|
||||
key_bits = psa_get_key_slot_bits( slot );
|
||||
|
||||
cipher_info = mbedtls_cipher_info_from_psa( alg, slot->attr.type, key_bits, NULL );
|
||||
if( cipher_info == NULL )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user