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:
@@ -647,7 +647,9 @@ static const cmd_t cmds[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
int sc_hsm_process_apdu() {
|
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++) {
|
for (const cmd_t *cmd = cmds; cmd->ins != 0x00; cmd++) {
|
||||||
if (cmd->ins == INS(apdu)) {
|
if (cmd->ins == INS(apdu)) {
|
||||||
int r = cmd->cmd_handler();
|
int r = cmd->cmd_handler();
|
||||||
|
|||||||
Reference in New Issue
Block a user