I am working on enabling secure boot using HAB in my project. I have two OS images in my board. One will be used as the main image and other will act as a back up. The idea is to jump to back up image if the main image authentication fails.
I could able to successfully authenticate both images separately from reset. Now I want to authenticate the back up image if the authentication of main image fails. However, I am getting previous errors/hab events, if I authenticate back up OS image after the main image authentication fail. Is there a way to clear the previous authentication errors in HAB?
I have gone through the HAB API manual. The only relevant information about the HAB initialization is mentioned below.
"The authentication of each image in a boot sequence must be bracketed by its own hab_rvt.entry() ... hab_rvt.exit() pair in order to ensure that security state information gathered for one image cannot be misapplied to another image."
I have checked my source and ensured that I am calling hab_rvt.entry() ... hab_rvt.exit() each time I authenticate an image.
Is there any API/mechanism I can use to reset/clear the HAB errors?
Appreciate your help...