Skip to content

Commit 99c777c

Browse files
committed
Fix for multiples of 64 bytes on cmd_list_keys
1 parent 4a40ceb commit 99c777c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/hsm/cmd_list_keys.c

+4
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,9 @@ int cmd_list_keys() {
6060
res_APDU[res_APDU_size++] = f->fid & 0xff;
6161
}
6262
}
63+
if ((apdu.rlen + 2 + 10) % 64 == 0) { // FIX for strange behaviour with PSCS and multiple of 64
64+
res_APDU[res_APDU_size++] = 0;
65+
res_APDU[res_APDU_size++] = 0;
66+
}
6367
return SW_OK();
6468
}

0 commit comments

Comments
 (0)