Move definition of MBEDTLS_CIPHER_MODE_STREAM

Move definition of `MBEDTLS_CIPHER_MODE_STREAM` to header file
(`mbedtls_cipher_internal.h`), because it is used by more than
one file. Raised by TrinityTonic in #1719
This commit is contained in:
Ron Eldor 2018-06-17 14:39:30 +03:00
parent 6856c2ebb5
commit 8c02dd1709
2 changed files with 4 additions and 4 deletions

View File

@ -34,6 +34,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

View File

@ -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;