mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 17:25:55 +00:00
[MBEDTLS] Update to version 2.7.14. CORE-16787
This commit is contained in:
parent
040546d8ff
commit
1b00a1f50f
8 changed files with 115 additions and 52 deletions
14
dll/3rdparty/mbedtls/cipher.c
vendored
14
dll/3rdparty/mbedtls/cipher.c
vendored
|
@ -284,6 +284,10 @@ int mbedtls_cipher_update( mbedtls_cipher_context_t *ctx, const unsigned char *i
|
|||
|
||||
*olen = 0;
|
||||
block_size = mbedtls_cipher_get_block_size( ctx );
|
||||
if ( 0 == block_size )
|
||||
{
|
||||
return( MBEDTLS_ERR_CIPHER_INVALID_CONTEXT );
|
||||
}
|
||||
|
||||
if( ctx->cipher_info->mode == MBEDTLS_MODE_ECB )
|
||||
{
|
||||
|
@ -310,11 +314,6 @@ int mbedtls_cipher_update( mbedtls_cipher_context_t *ctx, const unsigned char *i
|
|||
}
|
||||
#endif
|
||||
|
||||
if ( 0 == block_size )
|
||||
{
|
||||
return MBEDTLS_ERR_CIPHER_INVALID_CONTEXT;
|
||||
}
|
||||
|
||||
if( input == output &&
|
||||
( ctx->unprocessed_len != 0 || ilen % block_size ) )
|
||||
{
|
||||
|
@ -373,11 +372,6 @@ int mbedtls_cipher_update( mbedtls_cipher_context_t *ctx, const unsigned char *i
|
|||
*/
|
||||
if( 0 != ilen )
|
||||
{
|
||||
if( 0 == block_size )
|
||||
{
|
||||
return MBEDTLS_ERR_CIPHER_INVALID_CONTEXT;
|
||||
}
|
||||
|
||||
/* Encryption: only cache partial blocks
|
||||
* Decryption w/ padding: always keep at least one whole block
|
||||
* Decryption w/o padding: only cache partial blocks
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue