Fix returning error message.
If return code is not 0x9000, RAPDU is cleared. Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
8bdcfa1041
commit
07305e6fd7
1 changed files with 2 additions and 0 deletions
|
|
@ -340,6 +340,8 @@ int process_apdu() {
|
|||
|
||||
uint16_t set_res_sw(uint8_t sw1, uint8_t sw2) {
|
||||
apdu.sw = (sw1 << 8) | sw2;
|
||||
if (sw1 != 0x90 || sw2 != 0x00)
|
||||
res_APDU_size = 0;
|
||||
return make_uint16_t(sw1, sw2);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue