Skip to content

Commit

Permalink
Fix bug in SC setup due to missing call to cp_keyset_complete
Browse files Browse the repository at this point in the history
When SC is setup for the first time when the PD is in install mode, the
CP state machine should call cp_keyset_complete to clear the current SC
session so a new one can be setup.

During refactoring, this was broken and hence there was a failure during
initial SC handshake.

Signed-off-by: Siddharth Chandrasekaran <[email protected]>
  • Loading branch information
sidcha committed Mar 9, 2024
1 parent ea757f0 commit ec484ca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/osdp_cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,7 @@ static enum osdp_cp_state_e get_next_ok_state(struct osdp_pd *pd)
}
return OSDP_CP_STATE_ONLINE;
case OSDP_CP_STATE_SET_SCBK:
cp_keyset_complete(pd);
return OSDP_CP_STATE_SC_CHLNG;
case OSDP_CP_STATE_ONLINE:
if (cp_sc_should_retry(pd)) {
Expand Down

0 comments on commit ec484ca

Please sign in to comment.