Hello,

Following is the list of APDU commands sent to the card and their response,
while signing data ('Hello!' string) with the key stored in file
':3F00:3F11:3F03:0012'. New PC/SC card terminal driver is used in this case.


[DEBUG    ] opencard.core.service.CardChannel.sendCommandAPDU
--- message   opencard.core.terminal.CommandAPDU@90e722b3
0000:  00 F2 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................

[DEBUG    ] opencard.core.service.CardChannel.response: 
--- message   opencard.core.terminal.ResponseAPDU@a24322b3
0000:  67 17                                            g.              



[DEBUG    ] opencard.core.service.CardChannel.sendCommandAPDU
--- message   opencard.core.terminal.CommandAPDU@90e722b3
0000:  00 A4 00 00 02 3F 00 00 00 00 00 00 00 00 00 00  .....?..........

[DEBUG    ] opencard.core.service.CardChannel.response: 
--- message   opencard.core.terminal.ResponseAPDU@a1c322b3
0000:  61 17                                            a.              



[DEBUG    ] opencard.core.service.CardChannel.sendCommandAPDU
--- message   opencard.core.terminal.CommandAPDU@90e722b3
0000:  00 A4 00 00 02 3F 11 00 00 00 00 00 00 00 00 00  .....?..........

[DEBUG    ] opencard.core.service.CardChannel.response: 
--- message   opencard.core.terminal.ResponseAPDU@ba9722b3
0000:  61 17                                            a.              



[DEBUG    ] opencard.core.service.CardChannel.sendCommandAPDU
--- message   opencard.core.terminal.CommandAPDU@90e722b3
0000:  00 A4 00 00 02 3F 03 00 00 00 00 00 00 00 00 00  .....?..........

[DEBUG    ] opencard.core.service.CardChannel.response: 
--- message   opencard.core.terminal.ResponseAPDU@a78b22b3
0000:  61 17                                            a.              



[DEBUG    ] opencard.core.service.CardChannel.sendCommandAPDU
--- message   opencard.core.terminal.CommandAPDU@90e722b3
0000:  00 A4 00 00 02 00 12 00 00 00 00 00 00 00 00 00  ................

[DEBUG    ] opencard.core.service.CardChannel.response: 
--- message   opencard.core.terminal.ResponseAPDU@a7ab22b3
0000:  61 0F                                            a.              



[DEBUG    ] opencard.core.service.CardChannel.sendCommandAPDU
--- message   opencard.core.terminal.CommandAPDU@90e722b3
0000:  00 C0 00 00 0F 00 12 00 00 00 00 00 00 00 00 00  ................

[DEBUG    ] opencard.core.service.CardChannel.response: 
--- message   opencard.core.terminal.ResponseAPDU@a6f722b3
0000:  00 00 04 0C 00 12 04 00 F1 00 11 01 01 00 00 90  ................
0010:  00                                               .               



[DEBUG    ] opencard.core.service.CardChannel.sendCommandAPDU
--- message   opencard.core.terminal.CommandAPDU@90e722b3
0000:  00 FE 00 00 08 00 12 00 00 00 00 00 00 00 00 00  ................

[DEBUG    ] opencard.core.service.CardChannel.response: 
--- message   opencard.core.terminal.ResponseAPDU@a8e722b3
0000:  00 1A 1A 00 00 00 00 00 90 00                    ..........      



[DEBUG    ] opencard.core.service.CardChannel.sendCommandAPDU
--- message   opencard.core.terminal.CommandAPDU@b06322b3
0000:  00 88 C8 02 80 48 65 6C 6C 6F 21 00 00 00 00 00  .....Hello!.....
0010:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0020:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0030:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0040:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0050:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................

EXCEPTION
Did not recognize the APDU command
opencard.core.terminal.CardTerminalException: Did not recognize the APDU
command         
at
com.ibm.opencard.terminal.pcsc10.Pcsc10CardTerminal.internalSendAPDU(Pcsc10C
ardTerminal.java:808) 


Thank you,

Smita

-----Original Message-----
From: Christophe Muller [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 03, 2001 12:05 PM
To: Smita Ayyadevara
Cc: [EMAIL PROTECTED]
Subject: Re: [OCF] Signing data using Schlumberger Cyberflex Access
Smart Cards


Hello Smita,

Smita Ayyadevara wrote:
> I used the new PC/SC CardTerminal version that you have sent,
> it does not give SCardTransmit error. But it gives error saying 'Did
> not recognize the APDU command'.
> [...]
> In this case the execution thread do not even reach to the 
> SCardTransmit method call.
> 
> In file Pcsc10CardTerminal.java the values of variables 'lenbuf' (85
> d) and 'le' (128 d), makes the execution thread to skip all if/else
> cases, which decide the caseAPDU, and take to last 'else' which
> executes this statement: throw new CardTerminalException("Did not
> recognize the APDU command");

So in fact here the code in "Pcsc10CardTerminal" sets the 'le'
local variable to apduCommand[4] and then tries to identify in 
which ISO case we are. If it's case 4, this variable does not
indeed contain Le but Lc :-(, the 'le' variable is then redefined
to apduCommand[apduCommand.length - 1]. What does that mean? It means
that you are (or an application) trying to send an APDU to the card
that is a Case 4 but do not seem to fulfill the ISO requirements
(i.e., you should have 4 bytes, then Lc, then data, and at the end,
Le and -the most important- Lc should be the total length of the
buffer (85?)-5-1=79 which does not seem to be the case..).

I'm not a good specialist in T=0 but I believe the code is right..
Could you send us the APDU you are trying to send to the card ?
(in hexa) by using the trace facility (settings in the
opencard.properties file) ? That would help. And if I don't see
I will get back to the T=0 experts I know (thanks Thierry! :-).

In an other mail you wrote:
> If I choose to use Gemplus smart card reader, then along with the
> card reader what all components I need to have?

If you are using any type of serial reader, you can use the pure
java driver and have no more need for PC/SC ;-), you will find the
pure java CardTerminal at:

http://www.gemplus.fr/developers/technologies/opencard/cardterminals/downloa
d.html

and if you are using GPK, you will find the relevant CardServices at:

http://www.gemplus.fr/developers/technologies/opencard/cardservices/download
.html

Hope it'll help.

Cheers,
Christophe.

 = "Knowledge is the only fountain both of love and the principles =
 =  of human liberty."       -- Daniel Webster, 1843               =
--
-------------------------------------------------------------
[EMAIL PROTECTED] - Gemplus Research Lab
Phone: +33 4-42-36-57-83 | Disclaimer: I don't speak for Gemplus
Gemplus doesn't speak for me... it is better that way!
-------------------------------------------------------------


---
> Visit the OpenCard web site at http://www.opencard.org/ for more
> information on OpenCard---binaries, source code, documents.
> This list is being archived at http://www.opencard.org/archive/opencard/

! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
! to
!                           [EMAIL PROTECTED]
! containing the word
!                           unsubscribe 
! in the body.

Reply via email to