I have an application with RESET Privilege being the default selected application after reset.
My application has a logging mechanism to tell exactly what were the requests made to the card. I have several dynamic responses depending on current state. I also checked the behavior with a card spy.
All APDUs are being correctly forwarded to my application including those SELECTs that don't belong to it and don't match any other application on card.
This however doesn't happen when receiving a SELECT DF Next Occurrence (A4 04 02). Instead, the following SW is returned by the card: 6A85-Conditions not satisfied.
Now.. I understand what the card might be doing, which is to check if there's an application currently selected with the same AID specified and would go try to select the next application with same id. (This is not the case. No conflicting AIDs on card).
My question is: Should the card OS not forward this APDU in case there is no matching application installed? This is the supposed behavior for selects where there is an application already selected.
Another question: Is there a way to fix/circumvent this or you think this could be an OS bug? Or is this not the case at all?
Example:
Card Reset
-> 00 A4 04 00 07 AIDx7..
<- My Applet 90 00
-> 00 A4 04 02 07 AIDx7...
<- Card 6A 85
Moves on to other selects
My applet is still selected.
I'm using a NXP JCOP3 card.
Thanks in advance.