From: Amit <ami...@re...> - 2018-08-13 14:35:33
|
Thanks Douglas, https://www.iso.org/standard/70479.html This is to be paid version. >From where you get ISO 7816-4 [1] On 08/13/2018 07:25 PM, Douglas E Engert wrote: > ISO 7816-4 [1] answers most of your questions in Section "5.3 APDU > message structure" > and Section 6 - Basic Interindustry Commands" > > Note the class of the command determines if Lc and/or Le are present. > The command your > are looking at is "CA" see "6.9 GET DATA command" The protocol T=0 or > T=1 also comes > into play. > > As you read through 7816 you will not how complicated it is. And even > worse when it is > a proprietary command, where CLA byte is 8X or 9X. Thus there is a lot > of code that > your card may not be using, but other cards do. > > [1] http://cardwerk.com/iso-7816-smart-card-standard/ > or other source. > > > On 8/8/2018 7:38 AM, Amit wrote: >> Dear Devels, >> >> I see this after connecting Atos card 5.3 >> # /usr/local/bin/opensc-tool -a -vvv >> 0x7fd485e77880 17:20:53.811 [opensc-tool] >> apdu.c:378:sc_single_transmit: CLA:0, INS:CA, P1:1, P2:8D, data(0) (nil) >> 0x7fd485e77880 17:20:53.811 [opensc-tool] >> reader-pcsc.c:284:pcsc_transmit: reader 'Gemalto PC Twin Reader 00 00' >> 0x7fd485e77880 17:20:53.811 [opensc-tool] >> reader-pcsc.c:285:pcsc_transmit: >> Outgoing APDU (5 bytes): >> 00 CA 01 8D 02 ..... >> 0x7fd485e77880 17:20:53.811 [opensc-tool] >> reader-pcsc.c:213:pcsc_internal_transmit: called >> 0x7fd485e77880 17:20:53.815 [opensc-tool] >> reader-pcsc.c:294:pcsc_transmit: >> Incoming APDU (4 bytes): >> 01 80 90 00 .... >> >> What is 02 in CAPDU (00 CA 01 8D 02)? Is this Le? >> P1=01(1st parameter), P2=8D(2nd parameter) >> >> Is RAPDU correct? (01 80 90 00) >> a. Asked P2 was 8D, but came=80. Does this mean card does not have >> data starting from 01 8D? >> b. Do I need to ask communication specs from manufacturer of card for >> same. >> >> Too early to say but sorry I feel there is lot of repetitive code we >> can optimize it. >> >> >> -- >> Thanks >> Amit Kumar >> !!If you stumble, get back up. >> What happened yesterday, no longer matters. >> Today is another day to move closer to your GOAL!! >> >> >> >> ------------------------------------------------------------------------------ >> >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> >> >> >> _______________________________________________ >> Opensc-devel mailing list >> Ope...@li... >> https://lists.sourceforge.net/lists/listinfo/opensc-devel >> > -- Thanks Amit Kumar !!If you stumble, get back up. What happened yesterday, no longer matters. Today is another day to move closer to your GOAL!! |