mirror of
https://github.com/polhenarejos/pico-keys-sdk
synced 2026-05-10 17:28:27 +02:00
Fix particular case where an EF has masked types.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -74,15 +74,18 @@ void process_fci(const file_t *pe, int fmd) {
|
|||||||
res_APDU[res_APDU_size++] = 0x82;
|
res_APDU[res_APDU_size++] = 0x82;
|
||||||
res_APDU[res_APDU_size++] = 1;
|
res_APDU[res_APDU_size++] = 1;
|
||||||
res_APDU[res_APDU_size] = 0;
|
res_APDU[res_APDU_size] = 0;
|
||||||
if (pe->type == FILE_TYPE_INTERNAL_EF) {
|
if (pe->type & FILE_TYPE_INTERNAL_EF) {
|
||||||
res_APDU[res_APDU_size++] |= 0x08;
|
res_APDU[res_APDU_size++] |= 0x08;
|
||||||
}
|
}
|
||||||
else if (pe->type == FILE_TYPE_WORKING_EF) {
|
else if (pe->type & FILE_TYPE_WORKING_EF) {
|
||||||
res_APDU[res_APDU_size++] |= pe->ef_structure & 0x7;
|
res_APDU[res_APDU_size++] |= pe->ef_structure & 0x7;
|
||||||
}
|
}
|
||||||
else if (pe->type == FILE_TYPE_DF) {
|
else if (pe->type & FILE_TYPE_DF) {
|
||||||
res_APDU[res_APDU_size++] |= 0x38;
|
res_APDU[res_APDU_size++] |= 0x38;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
res_APDU_size++;
|
||||||
|
}
|
||||||
|
|
||||||
res_APDU[res_APDU_size++] = 0x83;
|
res_APDU[res_APDU_size++] = 0x83;
|
||||||
res_APDU[res_APDU_size++] = 2;
|
res_APDU[res_APDU_size++] = 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user