mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2026-02-23 08:04:17 +01: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…
Reference in a new issue