diff --git a/include/polarssl/aes.h b/include/polarssl/aes.h index 7399995f2..ffba7bf2e 100644 --- a/include/polarssl/aes.h +++ b/include/polarssl/aes.h @@ -129,6 +129,7 @@ int aes_crypt_cbc( aes_context *ctx, unsigned char *output ); #endif /* POLARSSL_CIPHER_MODE_CBC */ +#if defined(POLARSSL_CIPHER_MODE_CFB) /** * \brief AES-CFB128 buffer encryption/decryption. * @@ -176,7 +177,9 @@ int aes_crypt_cfb8( aes_context *ctx, unsigned char iv[16], const unsigned char *input, unsigned char *output ); +#endif /*POLARSSL_CIPHER_MODE_CFB */ +#if defined(POLARSSL_CIPHER_MODE_CTR) /** * \brief AES-CTR buffer encryption/decryption * @@ -206,6 +209,7 @@ int aes_crypt_ctr( aes_context *ctx, unsigned char stream_block[16], const unsigned char *input, unsigned char *output ); +#endif /* POLARSSL_CIPHER_MODE_CTR */ #ifdef __cplusplus } diff --git a/library/aes.c b/library/aes.c index f516fba67..fb211fe3c 100644 --- a/library/aes.c +++ b/library/aes.c @@ -982,6 +982,7 @@ int aes_crypt_ctr( aes_context *ctx, return( 0 ); } #endif /* POLARSSL_CIPHER_MODE_CTR */ + #endif /* !POLARSSL_AES_ALT */ #if defined(POLARSSL_SELF_TEST)