missed wolfSSL_TI_CCMInit in wc_xxxHash

This commit is contained in:
Takashi Kojo
2015-06-20 10:59:08 +09:00
parent 48a42e1a75
commit 45a3838433

View File

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