From 7b7fbd03589be3a30fe9e88eeccda1584c424c4a Mon Sep 17 00:00:00 2001 From: Carl Lundin <53273776+lundinc2@users.noreply.github.com> Date: Mon, 21 Sep 2020 17:00:31 -0700 Subject: [PATCH] Sync PKCS repo with AFR. (#6) --- README.md | 2 +- source/portable/mbedtls/iot_pkcs11_mbedtls.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6129b422..655be463 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Doxygen pages, please run the following command from the root of this repository ```shell doxygen docs/doxygen/config.doxyfile ``` -t + ## Security See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information. diff --git a/source/portable/mbedtls/iot_pkcs11_mbedtls.c b/source/portable/mbedtls/iot_pkcs11_mbedtls.c index 54eb2b1c..211dc597 100644 --- a/source/portable/mbedtls/iot_pkcs11_mbedtls.c +++ b/source/portable/mbedtls/iot_pkcs11_mbedtls.c @@ -929,7 +929,7 @@ static void prvFindObjectInListByHandle( CK_OBJECT_HANDLE xAppHandle, static CK_RV prvDeleteObjectFromList( CK_OBJECT_HANDLE xAppHandle ) { CK_RV xResult = CKR_OK; - uint32_t ulGotSemaphore = 0UL; + int32_t lGotSemaphore = 0UL; uint32_t ulIndex = xAppHandle - 1UL; if( ulIndex >= pkcs11configMAX_NUM_OBJECTS ) @@ -939,10 +939,10 @@ static CK_RV prvDeleteObjectFromList( CK_OBJECT_HANDLE xAppHandle ) if( xResult == CKR_OK ) { - ulGotSemaphore = mbedtls_mutex_lock( &xP11Context.xObjectList.xMutex ); + lGotSemaphore = mbedtls_mutex_lock( &xP11Context.xObjectList.xMutex ); } - if( ulGotSemaphore == 0 ) + if( lGotSemaphore == 0 ) { if( xP11Context.xObjectList.xObjects[ ulIndex ].xHandle != CK_INVALID_HANDLE ) {