mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-01-17 09:28:05 +00:00
Merge branch 'master' into development
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
commit
d1fb4d0c65
2 changed files with 10 additions and 0 deletions
|
|
@ -36,6 +36,10 @@ int cmd_extras() {
|
|||
return SW_SECURITY_STATUS_NOT_SATISFIED();
|
||||
}
|
||||
#endif
|
||||
//check button (if enabled)
|
||||
if (wait_button_pressed() == true) {
|
||||
return SW_SECURE_MESSAGE_EXEC_ERROR();
|
||||
}
|
||||
if (P1(apdu) == 0xA) { //datetime operations
|
||||
if (P2(apdu) != 0x0) {
|
||||
return SW_INCORRECT_P1P2();
|
||||
|
|
|
|||
|
|
@ -60,5 +60,11 @@ int cmd_list_keys() {
|
|||
res_APDU[res_APDU_size++] = f->fid & 0xff;
|
||||
}
|
||||
}
|
||||
#if !defined(ENABLE_EMULATION)
|
||||
if ((apdu.rlen + 2 + 10) % 64 == 0) { // FIX for strange behaviour with PSCS and multiple of 64
|
||||
res_APDU[res_APDU_size++] = 0;
|
||||
res_APDU[res_APDU_size++] = 0;
|
||||
}
|
||||
#endif
|
||||
return SW_OK();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue