From 45a3838433119b620ed0a214c7369ccef632f82b Mon Sep 17 00:00:00 2001 From: Takashi Kojo Date: Sat, 20 Jun 2015 10:59:08 +0900 Subject: [PATCH] missed wolfSSL_TI_CCMInit in wc_xxxHash --- wolfcrypt/src/port/ti/ti-hash.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/wolfcrypt/src/port/ti/ti-hash.c b/wolfcrypt/src/port/ti/ti-hash.c index c60f86423..59edd3b0a 100644 --- a/wolfcrypt/src/port/ti/ti-hash.c +++ b/wolfcrypt/src/port/ti/ti-hash.c @@ -61,6 +61,7 @@ bool wolfSSL_TI_CCMInit(void) { return true ; } #endif static int hashInit(wolfssl_TI_Hash *hash) { + if(!wolfSSL_TI_CCMInit())return ; hash->used = 0 ; hash->msg = 0 ; hash->len = 0 ; @@ -154,7 +155,6 @@ WOLFSSL_API void wc_InitMd5(Md5* md5) { if (md5 == NULL) return ; - if(!wolfSSL_TI_CCMInit())return ; hashInit((wolfssl_TI_Hash *)md5) ; } @@ -189,7 +189,6 @@ WOLFSSL_API int wc_InitSha(Sha* sha) { if (sha == NULL) return 1 ; - if(!wolfSSL_TI_CCMInit())return 1 ; return hashInit((wolfssl_TI_Hash *)sha) ; } @@ -224,7 +223,6 @@ WOLFSSL_API int wc_InitSha224(Sha224* sha224) { if (sha224 == NULL) return 1 ; - if(!wolfSSL_TI_CCMInit())return 1 ; return hashInit((wolfssl_TI_Hash *)sha224) ; } @@ -259,7 +257,6 @@ WOLFSSL_API int wc_InitSha256(Sha256* sha256) { if (sha256 == NULL) return 1 ; - if(!wolfSSL_TI_CCMInit())return 1 ; return hashInit((wolfssl_TI_Hash *)sha256) ; }