Fix particular case where an EF has masked types.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
46e7d3a181
commit
38283f588d
1 changed files with 6 additions and 3 deletions
|
|
@ -74,15 +74,18 @@ void process_fci(const file_t *pe, int fmd) {
|
|||
res_APDU[res_APDU_size++] = 0x82;
|
||||
res_APDU[res_APDU_size++] = 1;
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
else if (pe->type == FILE_TYPE_DF) {
|
||||
else if (pe->type & FILE_TYPE_DF) {
|
||||
res_APDU[res_APDU_size++] |= 0x38;
|
||||
}
|
||||
else {
|
||||
res_APDU_size++;
|
||||
}
|
||||
|
||||
res_APDU[res_APDU_size++] = 0x83;
|
||||
res_APDU[res_APDU_size++] = 2;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue