mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 15:25:29 +00:00
adjust indentation per Mbed TLS standards
This commit is contained in:
parent
ae382791fb
commit
395db875e6
|
@ -1455,9 +1455,11 @@ psa_status_t psa_cipher_update(psa_cipher_operation_t *operation,
|
|||
size_t *output_length)
|
||||
{
|
||||
int ret = MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE;
|
||||
|
||||
if( ( ( PSA_ALG_IS_STREAM_CIPHER( operation->alg ) ) && ( output_size < input_length ) )
|
||||
|| ( ( PSA_ALG_IS_BLOCK_CIPHER(operation->alg)) && ( output_size < ((operation->ctx.cipher.unprocessed_len + input_length)/16)*16 ) ) )
|
||||
size_t expected_output_size = ( ( operation->ctx.cipher.unprocessed_len + input_length )/operation->block_size )*operation->block_size;
|
||||
if( ( ( PSA_ALG_IS_STREAM_CIPHER( operation->alg ) ) &&
|
||||
( output_size < input_length ) ) ||
|
||||
( ( PSA_ALG_IS_BLOCK_CIPHER( operation->alg ) ) &&
|
||||
( output_size < expected_output_size ) ) )
|
||||
return( PSA_ERROR_BUFFER_TOO_SMALL );
|
||||
|
||||
ret = mbedtls_cipher_update( &operation->ctx.cipher, input,
|
||||
|
|
Loading…
Reference in a new issue