AES: add config option for 128-bit keys

Add configuration options to support only 128-bit key lengths in AES
calculation.
This commit is contained in:
Arto Kinnunen 2019-08-30 11:43:21 +03:00
parent e2bf54d3d1
commit 77b9cfcea9
6 changed files with 85 additions and 1 deletions

View file

@ -2930,6 +2930,14 @@ int query_config( const char *config )
}
#endif /* MBEDTLS_PK_SINGLE_TYPE */
#if defined(MBEDTLS_AES_ONLY_128_BIT_KEY_LENGTH)
if( strcmp( "MBEDTLS_AES_ONLY_128_BIT_KEY_LENGTH", config ) == 0 )
{
MACRO_EXPANSION_TO_STR( MBEDTLS_AES_ONLY_128_BIT_KEY_LENGTH );
return( 0 );
}
#endif /* MBEDTLS_AES_ONLY_128_BIT_KEY_LENGTH */
/* If the symbol is not found, return an error */
return( 1 );
}