]> granicus.if.org Git - esp-idf/commit
hwcrypto sha: Allow SHA contexts to be shared between tasks
authorAngus Gratton <angus@espressif.com>
Fri, 21 Dec 2018 04:37:57 +0000 (15:37 +1100)
committerbot <bot@espressif.com>
Wed, 23 Jan 2019 04:59:44 +0000 (04:59 +0000)
commitf3277cf2dc2d8a69b04be55fcf7be6d31782b68f
treefd2e46c5a5cf9f19d8fb91da313b5b01fab83b91
parent52b27890def2045a059b86f3b6262c35561a054d
hwcrypto sha: Allow SHA contexts to be shared between tasks

Previously, hardware SHA engine "locks" were mutex semaphores. This meant that the task which
started a particular SHA session (in hardware) needed to finalise that session, or an invalid
FreeRTOS state was created.

Replace with binary semaphore which can be shared between tasks.

Includes a unit test, but unit test doesn't crash even without this fix
(some other unknown condition is required).
components/esp32/hwcrypto/sha.c
components/mbedtls/test/test_mbedtls_sha.c