arbeeorlar / jcardsim

Automatically exported from code.google.com/p/jcardsim
1 stars 0 forks source link

CommandAPDU corruption when Lc is used as third param instead of length #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Description:
--> SimulatorRuntime::transmitCommand() recalculates the Lc parameter when 
copying from CommandAPDU commandAPDU to byte[] commandBuffer 
(SimulatorRuntime.java ~line 211).  This breaks applets that expect Lc to be 
used as a third parameter instead of Nc for certain commands.  For example, 
refer to "CKYListObjects" (section 2.6.17) in the following document: 
http://pki.fedoraproject.org/images/7/7a/CoolKeyApplet.pdf

What steps will reproduce the problem?
--> Generate CommandAPDU - 0xb0 0x58 0x00 0x00 0x0e (CKYListObjects).  APDU is 
converted to 0xb0 0x58 0x00 0x00 0x00.  Coolkey result:  0x67 0x00 
(SW_WRONG_LENGTH).

What is the expected output? 
--> Generate CommandAPDU - 0xb0 0x58 0x00 0x00 0x0e (CKYListObjects).  Lc 
remains unaltered.  Coolkey result:  <response payload> 0x90 0x00

What version of the product are you using? On what operating system?
--> JCardSim 2.2.1, Windows 7 x64, JRE/JDK 7u25

Original issue reported on code.google.com by accw...@gmail.com on 10 Sep 2013 at 7:48

GoogleCodeExporter commented 9 years ago

Original comment by jcard...@licel.ru on 17 Sep 2013 at 10:14

GoogleCodeExporter commented 9 years ago
We moved to GitHub, in this connection we are closing issue tracker here. Your 
issue available here now - https://github.com/licel/jcardsim/issues/13. Become 
a watcher and you will be able to receive all updates on the project. To check 
progress on your issue click the link above.

Original comment by jcard...@licel.ru on 25 Oct 2013 at 2:19