Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
secure_chip random function uses atca library for randomness, but this call to library may not be successful and error codes might be returned by atca. In this case, firmware was also calling `Abort()`. This stops the usb connection and terminates the program. Should it happen during a factory reset, then it means the device is left in a half-reset state. That's why it is a good practice to try this atca library call for randomness multiple times, making it possible to avoid rare unexpected errors from atca random implementation. Furthermore, the primary factory reset functions `securechip_update_keys` and `securechip_u2f_counter_set` are also retried to avoid unexpected errors in them, quitting the execution half-reset. Signed-off-by: asi345 <[email protected]>
- Loading branch information