kaoh / globalplatform

C library + command-line for Open- / GlobalPlatform smart cards
https://kaoh.github.io/globalplatform/
Other
72 stars 30 forks source link

1.4.1 breaks OpenSC Cyberflex instructions #8

Closed kaoh closed 4 years ago

kaoh commented 15 years ago

What works with 1.4.0, gives an error with 1.4.1 and 1.4.2: install -file CardEdgeII.ijc -nvDataLimit 12000 -instParam 00 -priv 2 Command --> 80E602001B05A00000000107A0000000030000000AEF08C6023100C8022EE00000 Wrapped command --> 84E602002305A00000000107A0000000030000000AEF08C6023100C8022EE0002C197064B44B6AC700 Response <-- 6A80 install_for_load() returns 0x80206A80 (6A80: Wrong data / Incorrect values in command data.)

More info @ http://www.opensc-project.org/opensc/wiki/Cyberflex?version=22

Reported by: pisi

kaoh commented 15 years ago

Hi,

I don't know the reason (maybe I have fixed something, but this breaks some other thing), but beginning with 1.4.1 there are new instructions for the cyberflex cards:

The installation steps must be done one by one:

enable_trace establish_context card_connect select -AID a0000000030000 open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4f -enc_key 404142434445464748494a4b4c4d4e4f // Open secure channel delete -AID a00000006203010c0101 delete -AID a00000006203010c01 install_for_load -pkgAID a00000006203010c01 -nvCodeLimit 500 load -file HelloWorld.cap.transf install_for_install -instParam 00 -priv 02 -AID a00000006203010c0101 -pkgAID a00000006203010c01 -instAID a00000006203010c0101 -nvDataLimit 500 card_disconnect release_context

But can you please provide a trace for the version 1.4.0 if you have it handy? So I can compare it.

Regards, Karsten

Original comment by: kaoh

kaoh commented 14 years ago

Cyberflex does not accept non volatile data limit in install_for_load. This is now alway set to 0.

Please check it out by testing the globalplatform-6.0.0 branch in SVN.

Original comment by: kaoh