fix build warnings with lean-psk mode

This commit is contained in:
John Safranek 2014-07-16 14:40:41 -07:00
parent 99f6fd8450
commit 307e5f3bff
2 changed files with 15 additions and 3 deletions

View File

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

View File

@ -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 */
@ -4669,6 +4671,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)
@ -4676,6 +4679,7 @@ static INLINE word32 GetSEQIncrement(CYASSL* ssl, int verify)
else
return ssl->keys.sequence_number++;
}
#endif
#ifdef HAVE_AEAD