Fixes based on peer review (thanks).

This commit is contained in:
David Garske 2017-07-12 09:04:10 -07:00
parent a5cdbb18cb
commit 5bb8de627e
2 changed files with 6 additions and 20 deletions

View File

@ -29,7 +29,6 @@
#ifndef NO_AES
#include <wolfssl/wolfcrypt/aes.h>
#ifndef WOLFSSL_ARMASM
/* fips wrapper calls, user can call direct */
#ifdef HAVE_FIPS
@ -190,6 +189,8 @@
#include <wolfcrypt/src/misc.c>
#endif
#ifndef WOLFSSL_ARMASM
#ifdef DEBUG_AESNI
#include <stdio.h>
#endif
@ -5256,10 +5257,8 @@ int wc_AesGetKeySize(Aes* aes, word32* keySize)
return ret;
}
#endif /* !WOLFSSL_TI_CRYPT */
#endif /* HAVE_FIPS */
#endif /* !WOLFSSL_ARMASM */
#endif /* !WOLFSSL_TI_CRYPT */
#ifdef HAVE_AES_KEYWRAP
@ -5433,4 +5432,5 @@ int wc_AesKeyUnWrap(const byte* key, word32 keySz, const byte* in, word32 inSz,
#endif /* HAVE_AES_KEYWRAP */
#endif /* HAVE_FIPS */
#endif /* !NO_AES */

View File

@ -1287,20 +1287,13 @@ static INLINE int Sha256Final(Sha256* sha256, byte* hash)
int wc_InitSha256_ex(Sha256* sha256, void* heap, int devId)
{
int ret = 0;
if (sha256 == NULL)
return BAD_FUNC_ARG;
sha256->heap = heap;
ret = InitSha256(sha256);
if (ret != 0)
return ret;
(void)devId;
return ret;
return InitSha256(sha256);
}
int wc_InitSha256(Sha256* sha256)
@ -1395,20 +1388,13 @@ int wc_Sha256Copy(Sha256* src, Sha256* dst)
int wc_InitSha224_ex(Sha224* sha224, void* heap, int devId)
{
int ret = 0;
if (sha224 == NULL)
return BAD_FUNC_ARG;
sha224->heap = heap;
ret = InitSha224(sha224);
if (ret != 0)
return ret;
(void)devId;
return ret;
return InitSha224(sha224);
}
int wc_InitSha224(Sha224* sha224)