Skip to content

Commit bb641ee

Browse files
authored
Merge pull request #43 from al-heisner/master
Fix for multiples of 64 bytes on cmd_list_keys
2 parents 4a40ceb + 99c777c commit bb641ee

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)