Install applet in javacard

I created a .cap file from the popular javacard Hello World code via Eclipse

And now I want to download it in real javacard via GPShell smart card reader and ACR38.

Question: Do I need any key to download the .cap file on the card? I mean, do I have to authenticate before uploading my applet to the card or is it not necessary? I think for authentication. it is irrational to download .cap without authentication. but I do not know how to authenticate. Q: What's wrong with that?

C:\Users\ghasemi>java -jar e:\gpj\gpj.jar -load e:\helloWorld.cap -install Found terminals: [PC/SC terminal ACS CCID USB Reader 0] javax.smartcardio.CardException: connect() failed at sun.security.smartcardio.TerminalImpl.connect(Unknown Source) at net.sourceforge.gpj.cardservices.GlobalPlatformService.main(Unknown S ource) Caused by: sun.security.smartcardio.PCSCException: SCARD_E_SHARING_VIOLATION at sun.security.smartcardio.PCSC.SCardConnect(Native Method) at sun.security.smartcardio.CardImpl.<init>(Unknown Source) ... 2 more Found card in terminal: ACS CCID USB Reader 0 java.lang.NullPointerException at net.sourceforge.gpj.cardservices.GlobalPlatformService.main(Unknown S ource) C:\Users\ghasemi>java -jar e:\gpj\gpj.jar -load e:\helloWorld.cap -install Found terminals: [PC/SC terminal ACS CCID USB Reader 0] Found card in terminal: ACS CCID USB Reader 0 ATR: 3B 7F 94 00 00 80 31 80 65 B0 85 02 02 ED 12 0F FF 82 90 00 DEBUG: Command APDU: 00 A4 04 00 07 A0 00 00 01 51 00 00 DEBUG: Response APDU: 6A 82 Failed to select Security Domain GP211 A0 00 00 01 51 00 00 , SW: 6A 82 DEBUG: Command APDU: 00 A4 04 00 08 A0 00 00 00 18 43 4D 00 DEBUG: Response APDU: 6F 65 84 08 A0 00 00 00 18 43 4D 00 A5 59 73 4A 06 07 2A 8 6 48 86 FC 6B 01 60 0C 06 0A 2A 86 48 86 FC 6B 02 02 01 01 63 09 06 07 2A 86 48 86 FC 6B 03 64 0B 06 09 2A 86 48 86 FC 6B 04 01 05 65 0B 06 09 2B 85 10 86 48 64 02 01 03 66 0C 06 0A 2B 06 01 04 01 2A 02 6E 01 02 9F 6E 06 12 91 20 11 02 02 9 F 65 01 FF 90 00 Successfully selected Security Domain GemaltoXpressPro A0 00 00 00 18 43 4D 00 DEBUG: Command APDU: 80 50 00 00 08 17 2A 53 4F AC DF 8D 16 DEBUG: Response APDU: 69 82 javax.smartcardio.CardException: Wrong initialize update, SW: 69 82 at net.sourceforge.gpj.cardservices.GlobalPlatformService.openSecureChan nel(Unknown Source) at net.sourceforge.gpj.cardservices.GlobalPlatformService.main(Unknown S ource) 

Tnx

+7
smartcard javacard globalplatform
source share
3 answers

You must claim the status of the global map platform. 6982 is a common status word that means "Security status is not satisfied," so your card may be in an incorrect state (for example, the status of the global platform LOCKED or TERMINATED).

It may also be that you are using an invalid Global Platform key set or that the keys are not available.

Contact your smart card vendor about the status of the card and which keys you should use.

+2
source share

Response code 6A 82 used for Security_Status_Not_Satisfied .

When you select Security Domain this status word can occur for one of the following two reasons:

  • Any Life Cycle State (CLCS) card for the card is LOCKED or TERMINATED , therefore the choice of a security domain is not allowed, because if CLCS is LOCKED , then only this domain and / or security application can and if CLCS is TERMINATED , then if there is a security domain the privilege of the final application, only the GET DATA command should be processed, all other commands should be disabled and should return an error. If CLCS is LOCKED then try to select this security domain and / or application with the privilege of blocking the card and try to transfer the card life cycle state (CLCS) to SECURED using the SETSTATUS command using SCP session , otherwise CLCS TERMINATED , then CLCS cannot return to SECURED , since this condition is irreversible.

  • OR The Security Domain that you are trying to select is itself in the LOCKED state, in which case the security domain protection can be prevented from further selection with OPEN and the error status word.

@CLCS - Map Lifecycle Status.

Happy to help.

+2
source share

AID Card Manager shows that it is a Gemalto XPresso card. The default card for this card is 47454d5850524553534f53414d504c45 try installing these keys. in case it does not work, the card has changed CM Keys or the card may be blocked, be careful that too often authentication attempts with incorrect keys can block the card.

+1
source share

All Articles