Our Online Store have the new products: RFID antenna board. Currently it can work with JC10M24R and JCOP4 card chips.
Compared with normal cards, the antenna board module has a smaller size and fixed holes, which is easy to integrate in the IOT(Internet Of Things) project.

Lock applet on card power transitions

JavaCard Applet Development Related Questions and Answers.
lefibr
Posts: 18
Joined: Thu Feb 18, 2016 2:38 am
Points :171
Contact:

Lock applet on card power transitions

Post by lefibr » Sun Oct 09, 2016 11:44 pm

Hello!

I want to make the applet be the locked state on card power transitions. I mean once the card loses power, the applet should be locked the next time it is powered. I have already looked at MultiSelectable and AppletEvent, but they all seem to trigger only when the applet is selected or deselected.

Anyone has the similar work experience before?

Tarantino
Posts: 101
Joined: Wed Aug 19, 2015 1:56 am
Points :478
Contact:

Re: Lock applet on card power transitions

Post by Tarantino » Mon Oct 10, 2016 5:13 am

As code can't be called after power is lost.

The simple method is to keep a magic in CLEAR_ON_RESET memory and always check for the presence of the magic cookie in either select() or process() and run your code if not.
The greatest glory in living lies not in never falling, but in rising every time we fall.--Nelson Mandela

lefibr
Posts: 18
Joined: Thu Feb 18, 2016 2:38 am
Points :171
Contact:

Re: Lock applet on card power transitions

Post by lefibr » Mon Oct 10, 2016 5:20 am

If I use a magic with CLEAR_ON_RESET, won't this also be reset for an ATR?

Tarantino
Posts: 101
Joined: Wed Aug 19, 2015 1:56 am
Points :478
Contact:

Re: Lock applet on card power transitions

Post by Tarantino » Mon Oct 10, 2016 5:52 am

Yes, it would also respond to a warm reset.
The greatest glory in living lies not in never falling, but in rising every time we fall.--Nelson Mandela

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 45 guests

JavaCard OS : Disclaimer