mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-03-23 09:55:06 +00:00
psa: cipher: Remove unused key_set
operation field
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
parent
8d310ad2e6
commit
06aa442bef
|
@ -144,7 +144,6 @@ static inline struct psa_mac_operation_s psa_mac_operation_init( void )
|
||||||
struct psa_cipher_operation_s
|
struct psa_cipher_operation_s
|
||||||
{
|
{
|
||||||
psa_algorithm_t alg;
|
psa_algorithm_t alg;
|
||||||
unsigned int key_set : 1;
|
|
||||||
unsigned int iv_required : 1;
|
unsigned int iv_required : 1;
|
||||||
unsigned int iv_set : 1;
|
unsigned int iv_set : 1;
|
||||||
unsigned int mbedtls_in_use : 1; /* Indicates mbed TLS is handling the operation. */
|
unsigned int mbedtls_in_use : 1; /* Indicates mbed TLS is handling the operation. */
|
||||||
|
@ -158,7 +157,7 @@ struct psa_cipher_operation_s
|
||||||
} ctx;
|
} ctx;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define PSA_CIPHER_OPERATION_INIT {0, 0, 0, 0, 0, 0, 0, {0}}
|
#define PSA_CIPHER_OPERATION_INIT {0, 0, 0, 0, 0, 0, {0}}
|
||||||
static inline struct psa_cipher_operation_s psa_cipher_operation_init( void )
|
static inline struct psa_cipher_operation_s psa_cipher_operation_init( void )
|
||||||
{
|
{
|
||||||
const struct psa_cipher_operation_s v = PSA_CIPHER_OPERATION_INIT;
|
const struct psa_cipher_operation_s v = PSA_CIPHER_OPERATION_INIT;
|
||||||
|
|
|
@ -3408,7 +3408,6 @@ static psa_status_t psa_cipher_setup( psa_cipher_operation_t *operation,
|
||||||
/* Initialize the operation struct members, except for alg. The alg member
|
/* Initialize the operation struct members, except for alg. The alg member
|
||||||
* is used to indicate to psa_cipher_abort that there are resources to free,
|
* is used to indicate to psa_cipher_abort that there are resources to free,
|
||||||
* so we only set it after resources have been allocated/initialized. */
|
* so we only set it after resources have been allocated/initialized. */
|
||||||
operation->key_set = 0;
|
|
||||||
operation->iv_set = 0;
|
operation->iv_set = 0;
|
||||||
operation->mbedtls_in_use = 0;
|
operation->mbedtls_in_use = 0;
|
||||||
operation->iv_size = 0;
|
operation->iv_size = 0;
|
||||||
|
@ -3444,12 +3443,7 @@ static psa_status_t psa_cipher_setup( psa_cipher_operation_t *operation,
|
||||||
}
|
}
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
if( status == PSA_SUCCESS )
|
if( status != PSA_SUCCESS )
|
||||||
{
|
|
||||||
/* Update operation flags for both driver and software implementations */
|
|
||||||
operation->key_set = 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
psa_cipher_abort( operation );
|
psa_cipher_abort( operation );
|
||||||
|
|
||||||
unlock_status = psa_unlock_key_slot( slot );
|
unlock_status = psa_unlock_key_slot( slot );
|
||||||
|
@ -3607,7 +3601,6 @@ psa_status_t psa_cipher_abort( psa_cipher_operation_t *operation )
|
||||||
psa_driver_wrapper_cipher_abort( operation );
|
psa_driver_wrapper_cipher_abort( operation );
|
||||||
|
|
||||||
operation->alg = 0;
|
operation->alg = 0;
|
||||||
operation->key_set = 0;
|
|
||||||
operation->iv_set = 0;
|
operation->iv_set = 0;
|
||||||
operation->mbedtls_in_use = 0;
|
operation->mbedtls_in_use = 0;
|
||||||
operation->iv_size = 0;
|
operation->iv_size = 0;
|
||||||
|
|
Loading…
Reference in a new issue