diff --git a/ctaocrypt/benchmark/benchmark.c b/ctaocrypt/benchmark/benchmark.c index 55db8a4fc..f51966f49 100644 --- a/ctaocrypt/benchmark/benchmark.c +++ b/ctaocrypt/benchmark/benchmark.c @@ -259,6 +259,17 @@ enum BenchmarkBounds { static const char blockType[] = "megs"; /* used in printf output */ #endif + +/* use kB instead of mB for embedded benchmarking */ +#ifdef BENCH_EMBEDDED +static byte plain [1024]; +#else +static byte plain [1024*1024]; +#endif + + +#ifndef NO_AES + static const byte key[] = { 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef, @@ -277,15 +288,12 @@ static const byte iv[] = /* use kB instead of mB for embedded benchmarking */ #ifdef BENCH_EMBEDDED -static byte plain [1024]; static byte cipher[1024]; #else -static byte plain [1024*1024]; static byte cipher[1024*1024]; #endif -#ifndef NO_AES void bench_aes(int show) { Aes enc; diff --git a/src/internal.c b/src/internal.c index de61d86f3..cf4067a88 100644 --- a/src/internal.c +++ b/src/internal.c @@ -203,6 +203,7 @@ static INLINE void c16toa(word16 u16, byte* c) } +#if !defined(NO_OLD_TLS) || defined(HAVE_AESCCM) || defined(HAVE_AESGCM) /* convert 32 bit integer to opaque */ static INLINE void c32toa(word32 u32, byte* c) { @@ -211,6 +212,7 @@ static INLINE void c32toa(word32 u32, byte* c) c[2] = (u32 >> 8) & 0xff; c[3] = u32 & 0xff; } +#endif /* convert a 24 bit integer into a 32 bit one */ @@ -4675,6 +4677,7 @@ static int DoDtlsHandShakeMsg(CYASSL* ssl, byte* input, word32* inOutIdx, #endif +#if !defined(NO_OLD_TLS) || defined(HAVE_AESCCM) || defined(HAVE_AESGCM) static INLINE word32 GetSEQIncrement(CYASSL* ssl, int verify) { if (verify) @@ -4682,6 +4685,7 @@ static INLINE word32 GetSEQIncrement(CYASSL* ssl, int verify) else return ssl->keys.sequence_number++; } +#endif #ifdef HAVE_AEAD