mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-02-07 19:18:23 +00:00
Fix when secure message cannot be correctly processed.
It is discarded. Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
b2ac893efc
commit
eec4612a6f
1 changed files with 3 additions and 1 deletions
|
|
@ -647,7 +647,9 @@ static const cmd_t cmds[] = {
|
|||
};
|
||||
|
||||
int sc_hsm_process_apdu() {
|
||||
sm_unwrap();
|
||||
int r = sm_unwrap();
|
||||
if (r != CCID_OK)
|
||||
return SW_DATA_INVALID();
|
||||
for (const cmd_t *cmd = cmds; cmd->ins != 0x00; cmd++) {
|
||||
if (cmd->ins == INS(apdu)) {
|
||||
int r = cmd->cmd_handler();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue