diff --git a/wolfcrypt/src/port/ti/ti-aes.c b/wolfcrypt/src/port/ti/ti-aes.c index d38e7a3cb..fdf3c689b 100644 --- a/wolfcrypt/src/port/ti/ti-aes.c +++ b/wolfcrypt/src/port/ti/ti-aes.c @@ -250,6 +250,7 @@ static int AesAuthArgCheck(Aes* aes, byte* out, const byte* in, word32 inSz, const byte* authTag, word32 authTagSz, const byte* authIn, word32 authInSz, word32 *M, word32 *L) { + (void) authInSz ; if((aes == NULL)||(nonce == NULL)||(authTag== NULL)||(authIn == NULL)) return BAD_FUNC_ARG; if((inSz != 0) && ((out == NULL)||(in == NULL))) diff --git a/wolfcrypt/src/port/ti/ti-ccm.c b/wolfcrypt/src/port/ti/ti-ccm.c index 09705cfb8..2b25820c4 100644 --- a/wolfcrypt/src/port/ti/ti-ccm.c +++ b/wolfcrypt/src/port/ti/ti-ccm.c @@ -27,7 +27,7 @@ #if defined(WOLFSSL_TI_CRYPT) || defined(WOLFSSL_TI_HASH) - +#include "wolfssl/wolfcrypt/port/ti/ti-ccm.h" #include #include @@ -44,7 +44,7 @@ #define WAIT(stat) { volatile int i ; for(i=0; i #include #include +#include #ifndef TI_DUMMY_BUILD #include "inc/hw_memmap.h" @@ -61,7 +62,7 @@ bool wolfSSL_TI_CCMInit(void) { return true ; } #endif static int hashInit(wolfssl_TI_Hash *hash) { - if(!wolfSSL_TI_CCMInit())return ; + if(!wolfSSL_TI_CCMInit())return 1 ; hash->used = 0 ; hash->msg = 0 ; hash->len = 0 ; diff --git a/wolfssl/wolfcrypt/port/ti/ti-ccm.h b/wolfssl/wolfcrypt/port/ti/ti-ccm.h index f0fb24799..8e75e0d3e 100644 --- a/wolfssl/wolfcrypt/port/ti/ti-ccm.h +++ b/wolfssl/wolfcrypt/port/ti/ti-ccm.h @@ -19,6 +19,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#ifndef WOLF_CRYPT_TI_CCM_H +#define WOLF_CRYPT_TI_CCM_H + #ifdef HAVE_CONFIG_H #include #endif @@ -27,14 +30,17 @@ #if defined(WOLFSSL_TI_CRYPT) || defined(WOLFSSL_TI_HASH) -bool wolfSSL_TI_CCMInit(void) ; +int wolfSSL_TI_CCMInit(void) ; #ifndef SINGLE_THREADED -void wolfSSL_TI_lockCCM() ; -void wolfSSL_TI_unlockCCM() ; +void wolfSSL_TI_lockCCM(void) ; +void wolfSSL_TI_unlockCCM(void) ; #else #define wolfSSL_TI_lockCCM() #define wolfSSL_TI_unlockCCM() #endif #endif + +#endif +