philipWendland / IsoApplet

A Java Card PKI Applet aiming to be ISO 7816 compliant
GNU General Public License v3.0
165 stars 72 forks source link

Host Card Emulation (HCE) App with IsoApplet #5

Closed frankmorgner closed 9 years ago

frankmorgner commented 9 years ago

I created a simple Host Card Emulation (HCE) App for Android which integrates https://github.com/licel/jcardsim to emulate the IsoApplet (among others).

In order to make the IsoApplet compatible with jCardSim I had to ignore an error which is probably also usefull in other situations.

philipWendland commented 9 years ago

Hi, thanks for this PR.

The ObjectDeletion-call in the constructor was there to prevent the installation of the applet on smartcards which do not support the RequestObjectDeletion mechanism. I.e. the exception was wanted to be thrown. In fact, this mechanism only frees garbage in the current applets context, and there is none at this point.

But as 1) I have yet to see a JC 2.2.2 card that does not implement this, 2) Deletion of files is fairly uncommon, 3) Maybe some unreferenced files are better than an unsupported card 4) and there are use cases in simulators which have normal Java Garbage collection but do not "implement" the RequestObjectDeletion mechanism I think it is valid to loosen this up.

Does 2b4412984a496c256300855e981cb5cb0f029e9a (Note that it is in this branch) solve the issue for you as well? If so, I think it can be integrated in the master branch.

frankmorgner commented 9 years ago

yes, with 2b44129 it indeed works as expected. I fully agree with your arguments for not depending on RequestObjectDeletion

philipWendland commented 9 years ago

Thank you for re-testing.

Solved with 2b4412984a496c256300855e981cb5cb0f029e9a in master.