Fixes initialization of the Crypto HW protection, which could leak a mutex if two calls to "wolfSSL_CryptHwMutexLock()" occurred at the same time prior to calling "wolfSSL_CryptHwMutexInit()". Fixes #164.

This commit is contained in:
David Garske 2015-10-28 23:07:52 -07:00
parent 2c41a5b961
commit d31cec0df0
1 changed files with 5 additions and 0 deletions

View File

@ -45,6 +45,11 @@
*/
int wolfcrypt_Init()
{
#if WOLFSSL_CRYPT_HW_MUTEX
/* If crypto hardware mutex protection is enabled, then initialize it */
wolfSSL_CryptHwMutexInit();
#endif
/* if defined have fast RSA then initialize Intel IPP */
#ifdef HAVE_FAST_RSA
WOLFSSL_MSG("Setting up IPP Library");