Skip to Main Content

Java Card

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Use secure PIN commands with javax.smartcardio

843851Feb 6 2009 — edited Aug 5 2009
Hey there,

I try to use the Card.transmitControlCommand() to send ControlCommands to the cardterminal. In PC/SC v2 they say one has to use ScardControl() to commit Commands to the terminal and I found in this forum that Card.transmitControlCommand() is the javax.smartcardio equivalent.

Now I try to get a simple GET_FEATURE_REQUEST() command working. This command has control code 3400 and no data so i tried

Card.transmitControlCommand(3400, null)

and got a NullPointerException. Then I tried

Card.transmitControlCommand(3400, new byte[]{})

and got


javax.smartcardio.CardException: transmitControlCommand() failed
at sun.security.smartcardio.CardImpl.transmitControlCommand(Unknown Source)
at de.gematik.patientAtHome.analyse.TestCardConnection.run(TestCardConnection.java:68)
at java.lang.Thread.run(Unknown Source)
Caused by: sun.security.smartcardio.PCSCException: Unknown error 0x1
at sun.security.smartcardio.PCSC.SCardControl(Native Method)
... 3 more

Does anybody know how to use this command?

Thanks
Andreas

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 2 2009
Added on Feb 6 2009
1 comment
965 views