I have a method whose code is more or less something like below:

         byte[] apduBuffer = apdu.getBuffer();

         apdu.setIncomingAndReceive();

         short sLc = (short)(apduBuffer[ISO7816.OFFSET_LC] & 0x00FF);

         if (sLc == (short) 0x0008) {
             // Do something  1
         } else if ((sLc > (short) 0x0008) && (sLc < (short) 0x0019)) {
             // Do something  2
         } else
             ISOException.throwIt(SW_WRONG_DATA);

The problem I have is that when I send an APDU with LC = 0x03, it should 
return SW_WRONG_DATA.
However it enters and return "Do something 2". I don't know why. Does 
anybody know the reason?

Any help is welcome.





-------------------------------------------

Jorge Lanza Calder�n
Departamento Ingenier�a Comunicaciones
Grupo de Ingenier�a Telem�tica
Universidad de Cantabria
Avda. de los Castros, s/n
39005 - Santander  (SPAIN)
Tel: +34 942 200914
Fax: +34 942 201488
mailto:[EMAIL PROTECTED]
Web: http://www.tlmat.unican.es

-------------------------------------------



---
> 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