Hello, dear friends!
I have strange problems on loading applets to card. Card issues error
6985. A requirement for using the command is not satisfied. For example:
� Command issued outside of a secure channel.
� Current application does not have the required application privilege
or life cycle state.
� The required preceding command was not present.
� The object to delete is referenced by another object on the card.
just after last LOAD command. But, however, this happen not on all applets. Some of my applets can be loaded to card.
In general, I have two cards: one old CyberFlex and one new. Old have no CodeShield and applets can be loaded to it and managed very easy. But new one causes this charming :) 6985 error sometimes.
Could somebody explain me the logic, CodeShield is using? CyberFlex support told me, that all ok, and nothing to worry about and that the error is not in CodeShield if I use their SDK to compile and make IJC files. I do, but problem remains! After some minutes of our talk they simply hung up! Very good support!
I guess, that CodeShield is a simple implementation if byte-code verifier written especially for java cards, right? Does it have algos, similiar to described here:
http://pauillac.inria.fr/~xleroy/publi/bytecode-verification-JAR.pdf ?
If so,
If the abstract interpreter gets �stuck�, i.e. cannot make a transition from one of the intermediate states, then verification fails and the code is rejected.
So, I think, some constructing in my applets gets this CodeShield into stuck and it rejects the code.
Could you please tell me, what instructions can confuse this CodeShield?
I guess, that some of the switch instructions does, but I can't catch the idea...
Thank you.