From 1d14ac5ff37f2473cb40afe01b03e64b891e33ec Mon Sep 17 00:00:00 2001 From: David Garske Date: Mon, 5 Dec 2016 09:15:58 -0800 Subject: [PATCH] Fixes to include.am and sha256.c after master rebase. Retested on NXP K82 with and without HW accel (all tests/benchmarks pass). --- wolfcrypt/src/include.am | 2 +- wolfcrypt/src/sha256.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/wolfcrypt/src/include.am b/wolfcrypt/src/include.am index 25189119b..5c76a03b6 100644 --- a/wolfcrypt/src/include.am +++ b/wolfcrypt/src/include.am @@ -45,7 +45,7 @@ EXTRA_DIST += wolfcrypt/src/port/ti/ti-aes.c \ wolfcrypt/src/port/ti/ti-ccm.c \ wolfcrypt/src/port/pic32/pic32mz-hash.c \ wolfcrypt/src/port/nrf51.c \ - wolfcrypt/src/port/arm/armv8-aes.c + wolfcrypt/src/port/arm/armv8-aes.c \ wolfcrypt/src/port/arm/armv8-sha256.c \ wolfssl/wolfcrypt/port/nxp/ksdk_port.c diff --git a/wolfcrypt/src/sha256.c b/wolfcrypt/src/sha256.c index abe8c1d51..97697c26b 100644 --- a/wolfcrypt/src/sha256.c +++ b/wolfcrypt/src/sha256.c @@ -455,7 +455,7 @@ int wc_Sha256Update(Sha256* sha256, const byte* data, word32 len) return 0; } #else -int wc_Sha256Update(Sha256* sha256, const byte* data, word32 len) +static INLINE int Sha256Update(Sha256* sha256, const byte* data, word32 len) { /* do block size increments */ @@ -492,6 +492,12 @@ int wc_Sha256Update(Sha256* sha256, const byte* data, word32 len) return 0; } + +int wc_Sha256Update(Sha256* sha256, const byte* data, word32 len) +{ + return Sha256Update(sha256, data, len); +} + #endif /* FREESCALE_LTC_SHA */ #ifdef FREESCALE_LTC_SHA @@ -502,7 +508,7 @@ int wc_Sha256Final(Sha256* sha256, byte* hash) return wc_InitSha256(sha256); /* reset state */ } #else -int wc_Sha256Final(Sha256* sha256, byte* hash) +static INLINE int Sha256Final(Sha256* sha256) { byte* local = (byte*)sha256->buffer; int ret;