v3.0.6 is restarting SC twice after KEYSET
Describe the bug When a new PD is connected, the SCBK-D will be used and KEYSET command will write the new SCBK to the device. After this has been done the stack restarts with SC_CHLNG twice.
Expected behavior I expect it to only restart once.
Additional context I assume this has to do with the CP_REQ_RESTART_SC request in cp_keyset_complete(). Is it maybe a leftover from last state machine? And a side note: the function cp_keyset_complete() is called twice in the new state machine (this is not causing this bug, but), is this really intended? It seems that it prints two LOG_INF and deactivates sc twice...
Hi @sebastianedse,
Sorry about the long wait. I tried reproducing this issue and failed. Can you please post some logs when you encounter this issue? Also, is there any other additional steps I need to perform to hit this problem?
the function cp_keyset_complete() is called twice in the new state machine
There are two ways to reach the keyset path:
- during CP setup time when we detect that PD is in install_mode: get_next_ok_state() -> cp_keyset_complete()
- when the application wants to set a new key from a secure channel: cp_check_online_response() -> cp_keyset_complete()
So I believe both calls are still relevant.
Closing as not reproducible. If you have more details, feel free to re-open this issue.