mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-21 15:41:00 +00:00
Fix return value handling
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
parent
5b8b890a61
commit
103e08aab9
@ -138,7 +138,7 @@ static int ssl_ticket_update_keys( mbedtls_ssl_ticket_context *ctx )
|
|||||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||||
if( ( status = psa_destroy_key( ctx->keys[ctx->active].key ) ) != PSA_SUCCESS )
|
if( ( status = psa_destroy_key( ctx->keys[ctx->active].key ) ) != PSA_SUCCESS )
|
||||||
{
|
{
|
||||||
return psa_ssl_status_to_mbedtls( ret );
|
return psa_ssl_status_to_mbedtls( status );
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
||||||
|
|
||||||
@ -185,9 +185,9 @@ int mbedtls_ssl_ticket_rotate( mbedtls_ssl_ticket_context *ctx,
|
|||||||
psa_set_key_type( &attributes, key->key_type );
|
psa_set_key_type( &attributes, key->key_type );
|
||||||
psa_set_key_bits( &attributes, key->key_bits );
|
psa_set_key_bits( &attributes, key->key_bits );
|
||||||
|
|
||||||
if( ( ret = psa_import_key( &attributes, k,
|
if( ( status = psa_import_key( &attributes, k,
|
||||||
PSA_BITS_TO_BYTES( key->key_bits ),
|
PSA_BITS_TO_BYTES( key->key_bits ),
|
||||||
&key->key ) ) != PSA_SUCCESS )
|
&key->key ) ) != PSA_SUCCESS )
|
||||||
{
|
{
|
||||||
ret = psa_ssl_status_to_mbedtls( status );
|
ret = psa_ssl_status_to_mbedtls( status );
|
||||||
return( ret );
|
return( ret );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user