diff --git a/include/mbedtls/cipher_internal.h b/include/mbedtls/cipher_internal.h index 6c58bcc525..88baa82b47 100644 --- a/include/mbedtls/cipher_internal.h +++ b/include/mbedtls/cipher_internal.h @@ -33,6 +33,10 @@ #include "cipher.h" +#if defined(MBEDTLS_ARC4_C) || defined(MBEDTLS_CIPHER_NULL_CIPHER) +#define MBEDTLS_CIPHER_MODE_STREAM +#endif + #ifdef __cplusplus extern "C" { #endif diff --git a/library/cipher.c b/library/cipher.c index cf82a82582..fe34929c28 100644 --- a/library/cipher.c +++ b/library/cipher.c @@ -45,10 +45,6 @@ #include "mbedtls/ccm.h" #endif -#if defined(MBEDTLS_ARC4_C) || defined(MBEDTLS_CIPHER_NULL_CIPHER) -#define MBEDTLS_CIPHER_MODE_STREAM -#endif - /* Implementation that should never be optimized out by the compiler */ static void mbedtls_zeroize( void *v, size_t n ) { volatile unsigned char *p = v; while( n-- ) *p++ = 0;