mirror of
https://github.com/espressif/openthread.git
synced 2026-08-15 15:17:46 +00:00
[efr32] fix for trng entropy API (#6050)
When obtaining entropy data, trng_get_random checks the status for any noise, and if so, cleans its queues and keeps the entropy accumulator of mbedtls running. In the process, TRNG might not have any new samples available, so a zero length output is valid, and we should keep running rather than exit fatally.
This commit is contained in:
@@ -51,7 +51,6 @@ otError otPlatEntropyGet(uint8_t *aOutput, uint16_t aOutputLength)
|
||||
// Non-zero return values for mbedtls_hardware_poll() signify an error has occurred
|
||||
otEXPECT_ACTION(0 == mbedtls_hardware_poll(NULL, &aOutput[outputLen], remaining, &partialLen),
|
||||
error = OT_ERROR_FAILED);
|
||||
otEXPECT_ACTION(partialLen > 0, error = OT_ERROR_FAILED);
|
||||
}
|
||||
|
||||
exit:
|
||||
|
||||
Reference in New Issue
Block a user