diff --git a/ChangeLog b/ChangeLog index 0ffdbf7b9..89a9469b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,8 @@ Bugfix was creating an invalid ASN.1 tag. Found by Aryeh R. Fixes #1257. * Remove unused headers included in x509.c. Found by Chris Hanson and fixed by Brendan Shanks. Part of a fix for #992. + * Fix compilation error when MBEDTLS_ARC4_C is disabled and + MBEDTLS_CIPHER_NULL_CIPHER is enabled. Found by TrinityTonic in #1719. = mbed TLS 2.7.4 branch released 2018-06-18 diff --git a/include/mbedtls/cipher.h b/include/mbedtls/cipher.h index d1f4efef8..1c453a1d3 100644 --- a/include/mbedtls/cipher.h +++ b/include/mbedtls/cipher.h @@ -43,7 +43,7 @@ #define MBEDTLS_CIPHER_MODE_WITH_PADDING #endif -#if defined(MBEDTLS_ARC4_C) +#if defined(MBEDTLS_ARC4_C) || defined(MBEDTLS_CIPHER_NULL_CIPHER) #define MBEDTLS_CIPHER_MODE_STREAM #endif diff --git a/library/cipher.c b/library/cipher.c index 7369f4823..0d84ccf76 100644 --- a/library/cipher.c +++ b/library/cipher.c @@ -56,10 +56,6 @@ #define mbedtls_free free #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 = (unsigned char*)v; while( n-- ) *p++ = 0;