mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-21 10:20:51 +00:00
Merge pull request #4469 from xiaoxiang781216/padlock
aes: Check aes_padlock_ace > 0 before calling padlock
This commit is contained in:
commit
f1eb425782
@ -1005,7 +1005,7 @@ int mbedtls_aes_crypt_ecb( mbedtls_aes_context *ctx,
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PADLOCK_C) && defined(MBEDTLS_HAVE_X86)
|
||||
if( aes_padlock_ace )
|
||||
if( aes_padlock_ace > 0)
|
||||
{
|
||||
if( mbedtls_padlock_xcryptecb( ctx, mode, input, output ) == 0 )
|
||||
return( 0 );
|
||||
@ -1047,7 +1047,7 @@ int mbedtls_aes_crypt_cbc( mbedtls_aes_context *ctx,
|
||||
return( MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH );
|
||||
|
||||
#if defined(MBEDTLS_PADLOCK_C) && defined(MBEDTLS_HAVE_X86)
|
||||
if( aes_padlock_ace )
|
||||
if( aes_padlock_ace > 0 )
|
||||
{
|
||||
if( mbedtls_padlock_xcryptcbc( ctx, mode, length, iv, input, output ) == 0 )
|
||||
return( 0 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user