-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for JC2.2.1 #2
Comments
Without knowing which card you are using it is impossible to help |
Does this help at all?
|
I'm experiencing that same error code on a card that only supports JavaCard 2.2.1. I'm working on a fork of PivApplet that supports 2.2.1 and very low memory cards. It loses extended APDU support, but I think I can keep the applet mostly the same. The errors seem to come from things like JC2.2.1 not having the classes for Extended length APDUs, or the convenience methods that parse the APDUs. If you'd like to test if this is the problem, I'd suggest trying JCAlgTest: https://github.com/crocs-muni/JCAlgTest/releases/tag/v1.7.1.1 If AlgTest_v1.7.1_jc221.cap will install, but AlgTest_v1.7.6_jc222.cap won't, this is probably your issue. |
@kategray Is your fork with 2.2.1 support around anywhere? Also, I'm curious -- do you know anywhere to buy 2.2.1 only cards online? I'd be tempted to fix it up for you if I had one. The build properties system in master and 0.8.0 lets you turn off the extended APDU bits now. |
I ended up not finishing my 2.2.1 fork. I ended up using GIDSapplet, though I much prefer PIVApplet, obviously. This is the card. https://www.cardlogix.com/product/cardlogix-credentsys-lite-java-card-72k/ I’ve got a pile of sim cut ones, if you would like me to ship you a dozen or so. |
If 2.2.1 were supported, I’d be really tempted to do a proper programming utility. |
@kategray If you could send one or two cards for testing purposes, would be cool. |
@kategray I'd love to get a few to test with. In the mean time, I did make two .cap files for JC221 in the latest release -- you can get the smallest of the two at https://github.com/arekinath/PivApplet/releases/download/v0.8.1/PivApplet-0.8.1-jc221-RESL.cap I tested it on a JC222 card and it works there at least, so it might be worth a shot if you have any time. |
@arekinath @martinpaljak Let me know where to send them, and I'll get them out. |
@arekinath I'll test it as soon as I can get access to a reader. |
It kinda worked, but then it borked.
|
I have no clue why uninstalling and reinstalling the applet doesn't work. |
Fresh card - can generate but not sign.
|
Importing a cert fails, too.
PuTTY-CAC:
|
@kategray Can you run |
|
And "gp -ldvi" after an install and uninstall would also be of interest (to understand why the install-loading issue might happen) |
|
Ok, well, I can see at least one problem here with an easy-ish solution. Would you mind trying https://lax.manta.blenco.net.au/alex/public/PivApplet-git339e473-jc221-RESL.cap for me? Hopefully that will fix up the issue with signing.
|
As far as the install failure, once I uninstall the applet, they don't want to install anymore. They work on first install, though. Whatever you just did helped. I'm going to test signing with SSH, but it didn't error out this time.
|
That works! These were some very cost-competitive cards, and available in large quantities, so I'm absolutely stoked that PIVApplet works. Now to work on a nice automatic PIV configuration app :)
|
Maybe manually running garbage collection after uninstall would help? https://www.win.tue.nl/pinpasjc/docs/apis/jc221/javacard/framework/JCSystem.html#requestObjectDeletion() |
Is that something that has to be done on the uninstalling applet side, or is that something that can be done by the newly-installed applet? |
Out of curiosity, what was the problem? |
See 339e473 -- just me forgetting how sign-extension works. |
That might have been what broke my fork, actually. I fixed the compilation errors, but was running into issues actually using the card. |
It may be off topic for the JC 2.2.1 fork, as it's for yet another version, but if there is interest, I have written mods for the project to support the NXP proprietary EC functionality in the J2D081/J3D081 (and could support a few other older versions as well) to do the full precomputed hash signatures using the NXP function on those cards, even though they are only JC 3.0.1. I can certainly distribute my code, though I doubt I could distribute the NXP library .exp (export) files necessary to compile. Is there any interest in this or would it just be pollution in the project? |
@mhardeman moving that to its own issue |
Would it be possible to get this on a release? The applet from this issue works well, but I have accidentally tried to use the release .cap a couple times. |
@kategray Sorry for the delay. 0.8.2 is on the releases now. |
Should this be marked as fixed now? It seems to work. |
Hello,
Great work on these projects! I'm getting into JavaCard Development and would like to start playing around with this applet however it appears I seem to be hitting an error when trying to load the cap onto my card.
I think I'm missing a dependency perhaps?
0x6438 == Imported package not found.
Any help with this would be appreciated, cheers!
The text was updated successfully, but these errors were encountered: