2025-11-25 6:55 AM
Experimenting with lifecycle states, I occasionally (maybe 1 in 3) get an mbedtls error when performing regression. This is with Trustzone enabled, using a leaf certificate. Sometimes running the command a second time will cause it to pass (as in the log below), sometimes the board needs to be reset in order to pass. This also happens using the regression.sh script and keys/certificates bundled with STM32CubeH5/Projects/STM32H573I-DK/ROT_Provisioning.
A snippet of the error is below, and I've attached a log with the full command that failed, followed straight after by the same command that then passes.
```
STM32_Programmer_CLI -c port=SWD per=a key=Keys/leaf_priv.pem cert=Certificates/cert_leaf_chain.b64 debugauth=1
....
Certificates/cert_leaf_chain.b64
load_trust_chain : 200 : error : sdm : Error calling mbedtls_pk_load_file()
Error:
Debug Authentication Failed
```