HI all
 
I have been try to develop a basic epurse using the Gemplus purse demo
on a Gemplus GemXpresso Pro  card and ChipDrive 100 reader.
 
I have tested the javacard applet within gemplus jcardmanger, and it
works fine loaded on the card.
 
I am trying design a swing UI to interact with the card and return the
value back to the text boxes within the UI.  I am having problems
verifying the pin and selecting the AID.  Please can anyone with a bit
of experience offer any advice as to where I am going wrong.
 
Sorry about posting such as large post, but I needed to offers all the
details.
 
 
Many Thanks in advanced
 
Sean
 
 
Here is the on card applet.
 
package epurse;
 
/*
 * Imported packages
 */
// specific import for Javacard API access
import javacard.framework.*;
// specific import for OpenPlatform API access
import visa.openplatform.*;
import javax.swing.*;
 
public class Epurse extends javacard.framework.Applet{
 
 
 
   // The APDU constants for all the commands.
    private final static byte EPURSE      = (byte)0x90;
    private final static byte GET_BALANCE = (byte)0x10;
    private final static byte DEBIT       = (byte)0x12;
    private final static byte CREDIT      = (byte)0x14;
    private final static byte VERIFY_PIN  = (byte)0x16;
 
    // the OP/VOP specific instruction set for mutual authentication if
used
    private final static byte CLA_INITIALIZE_UPDATE     = (byte)0x80 ;
    private final static byte INS_INITIALIZE_UPDATE     = (byte)0x50 ;
    private final static byte CLA_EXTERNAL_AUTHENTICATE = (byte)0x84 ;
    private final static byte INS_EXTERNAL_AUTHENTICATE = (byte)0x82 ;
 
     //SW bytes for PIN Failed condition
    //The last nibble is replaced with the
    //number of remaining tries
    private final static short           SW_PIN_FAILED = (short)0x63C0;
 
    // The illegal amount value for the exceptions.
    private final static short ILLEGAL_AMOUNT = 1 ;
 
    // The maximum balance in this purse.
    private static final short maximumBalance = 30000 ;
 
    //The initial balance value. This is the amount of purse at creation
    private static final short initialBalance = 1000 ;
 
    // The current balance in this card applet "Purse".
    private short balance ;
 
    // The master pin code validation is necessary to credit the purse
    private OwnerPIN masterPIN;
 
 
 
    /**
     * Epurse default constructor
     * Only this class's install method should create the applet object.
     */
    protected Epurse(byte[] buffer, short offset, byte length)
    {
        // data offset is used for application specific parameter.
        // initialization with default offset (AID offset).
        short dataOffset = offset;
 
        if(length > 9) {
            // Install parameter detail. Compliant with OP 2.0.1.
 
            // | size | content
            // |------|---------------------------
            // |  1   | [AID_Length]
            // | 5-16 | [AID_Bytes]
            // |  1   | [Privilege_Length]
            // | 1-n  | [Privilege_Bytes] (normally 1Byte)
            // |  1   | [Application_Proprietary_Length]
            // | 0-m  | [Application_Proprietary_Bytes]
 
            // shift to privilege offset
            dataOffset += (short)( 1 + buffer[offset]);
            // finally shift to Application specific offset
            dataOffset += (short)( 1 + buffer[dataOffset]);
 
            // checks wrong data length
            if(buffer[dataOffset] != 4)
                // return received proprietary data length in the reason
                ISOException.throwIt((short)(ISO7816.SW_WRONG_LENGTH +
offset + length - dataOffset));
                dataOffset++;
 
            } else {
                // if(length != installtion parms )
                if(length != 4)
                ISOException.throwIt((short)(ISO7816.SW_WRONG_LENGTH +
length));
            }
 
            // creates and initialize the master pin:  try limit is 3
and PIN length is 4
                masterPIN = new OwnerPIN ((byte)3, (byte)4);
                masterPIN.update(buffer, dataOffset,(byte)4);
 
                // Initializes this counter with a balance set to 100.
            balance = initialBalance;
 
            // register this instance
            register(buffer, (short)(offset + 1), (byte)buffer[offset]);
 
 
        }
 
 
 
 
    /**
     * Method installing the applet.
     * @param bArray the array constaining installation parameters
     * @param bOffset the starting offset in bArray
     * @param bLength the length in bytes of the data parameter in
bArray
     */
    public static void install(byte[] bArray, short bOffset, byte
bLength) throws ISOException
    {
        /* applet  instance creation */
        new Epurse (bArray, bOffset, (byte)bLength );
    }
 
    /**
     * Select method re  turns true if applet selection is supported.
     * @return boolean status of selection.
     */
    public boolean select()
    {
 
        // In case of reset deselect is not called
 
        // return status of selection
        return true;
    }
 
    /**
     * Deselect method called by the system in the deselection process.
     */
    public void deselect()
    {
        // reset security if used.
        masterPIN.reset();
 
        return;
    }
 
    /**
     * Method processing an incoming APDU.
     * @see APDU
     * @param apdu the incoming APDU
     * @exception ISOException with the response bytes defined by ISO
7816-4
     */
    public void process(APDU apdu) throws ISOException{
 
      // get the APDU buffer
        byte[] apduBuffer = apdu.getBuffer();
        byte dataLength = apduBuffer[ISO7816.OFFSET_LC];
        // the APDU data is available in 'apduBuffer'
 
        //checks the Instruction Class
        if( apduBuffer[ISO7816.OFFSET_CLA] != this.EPURSE &&
apduBuffer[ISO7816.OFFSET_CLA] != 0)
            ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
 
        // This "try" is mandatory because a method (debit)
        // can throw a javacard.framework.UserException
        try
        {
                switch(apdu.getBuffer()[ISO7816.OFFSET_INS])
                {
                case VERIFY_PIN:
                    processVerifyPIN(apdu);
                    break;
 
                case GET_BALANCE:
                    getBalance(apdu);
                    break;
 
                case DEBIT:
                    debit(apdu);
                    break;
 
                case CREDIT:
                    credit(apdu);
                    break;
 
                case ISO7816.INS_SELECT:
                    break;
 
                default:
                    // The INS code is not supported by the dispatcher
                    ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
                    break;
                }       // end of the switch
        } // end of the try
        catch (UserException e)
        { // Translates the UserException in an ISOException.
            if (e.getReason() == ILLEGAL_AMOUNT)     // illegal amount
                throw new ISOException (ISO7816.SW_DATA_INVALID) ;
        }
    }
 
 
//----------------------------------------------------------------------
---
    //-               P R I V A T E     M E T H O D S
-
 
//----------------------------------------------------------------------
---
 
    /**
     * Handles Verify Pin APDU.
     *
     * @param apdu APDU object
     */
    private void processVerifyPIN(APDU apdu)
    {
        byte[] buffer = apdu.getBuffer();
        byte pinLength = buffer[ISO7816.OFFSET_LC];
        byte triesRemaining = (byte)0;
        short count = apdu.setIncomingAndReceive();    // get expected
data
        if(count < pinLength)
ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
        if(!masterPIN.check(buffer, ISO7816.OFFSET_CDATA, pinLength)){
            triesRemaining = masterPIN.getTriesRemaining();
            //The last nibble of return            code is  number of
remaining tries
            ISOException.throwIt((short)(SW_PIN_FAILED +
triesRemaining));
        }
    }
 
    /**
     * Performs the "getBalance" operation on this counter.
     *
     * @param apdu The APDU to process.
     */
    private void getBalance(APDU apdu)
    {
        // Gets the APDU buffer zone
        byte[] apduBuffer = apdu.getBuffer();
 
        // Writes the balance into the APDU buffer after the APDU
command part
        apduBuffer[5] = (byte)(balance >> 8);
        apduBuffer[6] = (byte)balance;
 
 
        // Sends the APDU response
        apdu.setOutgoing(); // Switches to output mode
        apdu.setOutgoingLength((short)2); // 2 bytes to return
        // Offset and length of bytes to return in the APDU buffer
        apdu.sendBytes((short)5, (short)2);
    }
 
    /**
     * Performs the "debit" operation on this counter.
     *
     * @param apdu The APDU to process.
     * @exception ISOException If the APDU is invalid.
     * @exception UserException If the amount to debit is invalid.
     */
    private void debit(APDU apdu) throws ISOException, UserException
    {
        // The operation is allowed only if master pin is validated
        if (!masterPIN.isValidated())
 
ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
 
        // Gets the APDU buffer zone
        byte[] apduBuffer = apdu.getBuffer();
 
        // Gets the length of bytes to received from the terminal and
receives them
        // If does not receive 4 bytes throws an ISO.SW_WRONG_LENGTH
exception
        if(apduBuffer[4] != 2 || apdu.setIncomingAndReceive() != 2)
        { // A first way to throw an exception in Java Card
            ISOException.throwIt(ISO7816.SW_WRONG_LENGTH) ;
        }
 
            // Reads the debit amount from the APDU buffer
        // Starts at offset 5 in the APDU buffer since the 5 first bytes
        // are used by the APDU command part
        short amount =  (short)(((apduBuffer[6]) & (short)0x00FF) |
                        ((apduBuffer[5] << 8) & (short)0xFF00));
 
 
        // Tests if the debit is valid
        if((balance >= amount) && (amount > 0))
        { // Does the debit operation
              balance -= amount ;
 
              // Writes the new balance into the APDU buffer
              // (Writes after the debit amount in the APDU buffer)
 
              apduBuffer[9] = (byte)(balance >> 8);
              apduBuffer[10] = (byte)balance;
 
              // Sends the APDU response
              apdu.setOutgoing(); // Switches to output mode
              apdu.setOutgoingLength((short)2); // 4 bytes to return
              // Offset and length of bytes to return in the APDU buffer
              apdu.sendBytes((short)9, (short)2);
        }
        else
        { // An other way to throw an exception in JavaCard.
            throw new UserException(ILLEGAL_AMOUNT);
            // Makes no real sense here: just to illustrate the
"try...catch" in process!
        }
    }
 
    /**
     * Performs the "credit" operation on this counter. The operation is
allowed only
     * if master pin is validated
     *
     * @param apdu             The APDU to process.
     * @exception ISOException If the APDU is invalid or if the amount
to credit
     *                         is invalid.
     */
    private void credit(APDU apdu) throws ISOException
    {
        // The operation is allowed only if master pin is validated
        if (!masterPIN.isValidated())
 
ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
 
        // Gets the APDU buffer zone
        byte[] apduBuffer = apdu.getBuffer();
 
        // Gets the length of bytes to received from the terminal and
receives them
        // If does not receive 4 bytes throws an ISO.SW_WRONG_LENGTH
exception
        if( apduBuffer[4] != 2 || apdu.setIncomingAndReceive() != 2 )
        { // A second way to throw an exception in Java Card
            throw new ISOException( ISO7816.SW_WRONG_LENGTH );
        }
 
        // Reads the credit amount from the APDU buffer
        // Starts at offset 5 in the APDU buffer since the 5 first bytes
        // are used by the APDU command part
        short amount =  (short)(((apduBuffer[6] ) & (short)0x00FF) |
                                ((apduBuffer[5] << 8) & (short)0xFF00));
 
        // Tests if the credit is valid
        if(((short)(balance + amount) >  maximumBalance) || (amount <=
(short)0))
            throw new ISOException(ISO7816.SW_DATA_INVALID);
        else // does the credit operation
            balance += amount;
    }
 
}
 
 
Here is the  verify Pin  UserInterface.
package epurse;
 
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import opencard.core.*;
import opencard.opt.*;
import java.lang.*;
import java.lang.String;
 
 
public class VerifyPin extends JFrame {
  JPanel contentPane;
  JLabel Pin = new JLabel();
  JPasswordField jPasswordField2 = new JPasswordField();
  JButton enterPin = new JButton();
  JLabel jLabel2 = new JLabel();
  JLabel jLabel1 = new JLabel();
  JTextField testOut = new JTextField();
   byte bArray[] = new byte[32];
   String tmp = "";
  /**Construct the frame*/
  public VerifyPin() {
    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    try {
      jbInit();
    }
    catch(Exception e) {
      e.printStackTrace();
    }
  }
  /**Component initialization*/
  private void jbInit() throws Exception  {
 
//setIconImage(Toolkit.getDefaultToolkit().createImage(VerifyPin.class.g
etResource("[YourIcon]")));
    contentPane = (JPanel) this.getContentPane();
    jLabel1.setBounds(new Rectangle(63, 30, 401, 28));
    jLabel1.setFont(new java.awt.Font("DialogInput", 0, 24));
    jLabel1.setText("Welcome to Epurse System Inc");
    jLabel2.setBounds(new Rectangle(372, 127, 157, 25));
    jLabel2.setText("Please Enter PIN Code");
    enterPin.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        enterPin_actionPerformed(e);
      }
    });
    enterPin.setBounds(new Rectangle(221, 258, 90, 32));
    enterPin.setText("Enter Pin");
    jPasswordField2.addActionListener(new
java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        jPasswordField2_actionPerformed(e);
      }
    });
    jPasswordField2.setBounds(new Rectangle(190, 127, 156, 21));
    jPasswordField2.setText("jPasswordField2");
    Pin.setBounds(new Rectangle(111, 130, 48, 15));
    Pin.setText("Pin");
    contentPane.setLayout(null);
    this.setSize(new Dimension(568, 350));
    this.setTitle("Login");
    contentPane.setBorder(BorderFactory.createRaisedBevelBorder());
    contentPane.setToolTipText("");
    testOut.setBounds(new Rectangle(176, 197, 163, 24));
    testOut.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        testOut_actionPerformed(e);
      }
    });
    contentPane.add(jPasswordField2, null);
    contentPane.add(jLabel1, null);
    contentPane.add(jLabel2, null);
    contentPane.add(Pin, null);
    contentPane.add(enterPin, null);
    contentPane.add(testOut, null);
  }
  /**Overridden so we can exit when window is closed*/
  protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
      System.exit(0);
    }
  }
 
  void VerifyPin_actionPerformed(ActionEvent e)
  System.out.println("Start!");
 
  PassThruService card = new  PassThruService();  
  card.select();
  card.verifyPin(jPasswordField2.getPassword());
 // jTextField1.setText(card.getName());
  card.shutdown();
 
 
  }
 
 
public static void main(String args[]) {
new VerifyPin().show();
VerifyPin vp = new VerifyPin();
}
 
  void enterPin_actionPerformed(ActionEvent e) {
  System.out.println("Start!");
  PassThruService card = new  PassThruService();{ //<<<<<<<<<<<here call
to the  to the PassThruService
  card.select();
  tmp = card.verifyPin(jPasswordField2.getPassword());   //here is the
call to get user input
  testOut.setText(card.verifyPin(jPasswordField2.getPassword()));
 
   System.out.println("tmp");
  //testOut.setText(String.valueOf(tmp));
 
  card.shutdown();
 
  }
  void jPasswordField2_actionPerformed(ActionEvent e) {
 
  }
 
  void testOut_actionPerformed(ActionEvent e) {
 
  }
 
 
  }
 
 
Here is the  PassthruCardService that is being called from the
UserInterface above.
 
package epurse;
 
 
 
import java.io.ByteArrayOutputStream;
import opencard.core.service.SmartCard;
import opencard.core.service.CardRequest;
import opencard.opt.util.PassThruCardService;
import opencard.opt.util.PassThruCardServiceFactory;
import opencard.core.terminal.APDU;
import opencard.core.terminal.CommandAPDU;
import opencard.core.terminal.ResponseAPDU;
import opencard.opt.database.DataObject;
import java.lang.*;
import java.io.*;
 
public class PassThruService extends DataObject {
 
 public ResponseAPDU response;
 public CardRequest cr;
 public SmartCard sc;
 public CommandAPDU request, request1;
 public static PassThruCardService ptcs;
 static final byte[] CMD_VERIFY_CHV = {(byte)0x90, (byte)0x10,
                                        (byte)0x00, (byte)0x01,
(byte)0x04,
                                        (byte)0x31, (byte)0x31,
(byte)0x31, (byte)0x31 };
 
 
 
 
 
 
 
     PassThruService()
     {
      System.out.println("wait for card! ");
      try
      {
      SmartCard.start();
 
      CardRequest cr = new CardRequest (CardRequest.ANYCARD,null,null);
      System.out.println ("Wait for a card");
      SmartCard sc = SmartCard.waitForCard (cr);
 
 
 
 
 
 
    if (sc != null) {
 
      ptcs = (PassThruCardService)
sc.getCardService(PassThruCardService.class, true);
 
    }
  } catch (Exception e) {
    e.printStackTrace();
 
  }
 }
 
 
     public void select() {
 
     try {
      byte data[] = new byte[]{(byte)0x6D, (byte)0x79, (byte)0x70,
(byte)0x61, (byte)0x63, (byte)0x30, (byte)0x30, (byte)0x30, (byte)0x31};
      APDU(this.ptcs,0x00,0xA4,0x00,0x00,data.length,data);
      }
 
    catch (Exception e) {
    e.printStackTrace();
 
    }
    }
 
 
 
 
   public String verifyPin(char pin[]) {
   System.out.print("VerifyPIN");
   String output = new String();
   String pinNo = new String();
   pinNo = pinNo.copyValueOf(pin);
   System.out.println("pinNo");
 
    try{
        byte[] data = new String("pinNo").getBytes();
        output = APDU(this.ptcs,0x90,0x16,0x00,0x00,data.length,data);
 
 
    System.out.println("output retunred");
    System.out.println(output);
 
 
 
    }  catch (Exception e) {
      e.printStackTrace();
      }
      return output;
    }
 
 
/*     public static void  verifyPin(char pin[]){
          byte bArray[] = new byte[10];
          char cArray[] = new char[10];
          String pinNo = new String();
          pinNo = pinNo.copyValueOf(pin);
          byte[] data = new String( "Epurse").getBytes();
 
          try{
            CommandAPDU  request = new CommandAPDU(5);
             request.append(new byte[]{
                      (byte)0x90 ,
                      (byte)0x16 ,
                      (byte)0x00 ,
                      (byte)0x00 ,
                      (byte)0x04 });
                ResponseAPDU response = ptcs.sendCommandAPDU(request);
              //  ResponseAPDU response = ptcs.send(request);
                bArray = response.data();
                if (bArray != null){
                      for (int i =0 ; i < 6; i++)
                            cArray[i] = (char)bArray[i];
 
VerifyPin.testOut.setText(String.valueOf(cArray).trim());
 
 
                }
          }
 
          catch ( Exception e ) {
                System.out.println( "Exception: " );
                System.out.println( e.getMessage() );
          }
 
    }
 
*/
 
 
 
 
    public void pin(char[] spin) {
 
    String spinstring = new String();
    spinstring = spinstring.copyValueOf(spin);
 
    try{
      byte[] data = new String(spinstring).getBytes();
><DEFANGED.0 ><DEFANGED.5453
      APDU(this.ptcs,0x90,0x10,0x00,0x00,data.length,data);
      }
      catch (Exception e) {
      e.printStackTrace();
      }
    }
 
 
 
    public String getName() {
 
  String output= new String();
  try{
 
    byte[] data = null;
    output = APDU(this.ptcs,0x90,0x10,0x00,0x00,0x00,data);
//    output = APDU(this.ptcs,0x80,0x02,0x00,0x00,0x05,data);
    }
    catch (Exception e) {
    e.printStackTrace();
    }
  return output;
  }
 
 
 public String getBalance() {
 
  String output= new String();
  try{
 
    byte[] data = null;
    output = APDU(this.ptcs,0x90,0x10,0x00,0x00,0x00,data);
    }
    catch (Exception e) {
    e.printStackTrace();
    }
  return output;
  }
 
 
 
 
  private static String APDU(PassThruCardService ptcs,int cla, int ins,
int p1, int p2, int length, byte[] data)
  {
    String output= new String();
    try {
        CommandAPDU command;
 
        if (data!=null)
        {
 
            byte[] apdu = {(byte)cla,(byte)ins,(byte) p1,
(byte)p2,(byte)length};
            ByteArrayOutputStream apdudata = new
ByteArrayOutputStream(data.length + 6);
            apdudata.write(apdu);
            apdudata.write(data);
            byte[] nothing = {0x00};
            apdudata.write(nothing);
            byte[] apdubyte = apdudata.toByteArray();
            System.out.println();
            for (int i=0; i < (apdubyte.length);i++)
              {
              int byteAsInt = unsignedByteToInt(apdubyte[i]);
              System.out.print(Integer.toHexString(byteAsInt));
              }
            System.out.println();
            command = new CommandAPDU(apdubyte);
        }
        else
        {
            byte[] apdubyte = {(byte)cla,(byte)ins,(byte) p1,
(byte)p2,(byte)length};
            command = new CommandAPDU(apdubyte);
        }
        System.out.println("COMMAND");
        System.out.println(command);
 
      ResponseAPDU response= ptcs.sendCommandAPDU(command);
 
 
      System.out.println("Responce, " +response);
 
 
 
      System.out.println("---------------------");
      System.out.println(data);
 
      if (response.data()!=null) {
        byte [] databuffer = response.data();
        char [] charData = new char [databuffer.length];
        for (int i=0; i < (databuffer.length);i++)
          charData[i] = (char)databuffer[i];
          output = output.copyValueOf(charData);
          System.out.println(output);
      }
 
    }
    catch (Exception e) {
    e.printStackTrace();
    }
    return output;
  }
  public void shutdown() {
    try{
      SmartCard.shutdown();
    }
    catch(Exception e) {
      e.printStackTrace();
    }
  }
public static int unsignedByteToInt(byte b) {
     return (int) b & 0xFF;}
}
 
 
 
Error messages I am getting
 
C:\JBuilder6\jdk1.2.2\bin\javaw -classpath "C:\Documents and
Settings\sean\jbproject\epurse\classes;C:\Gemplus\GemXpresso.rad3\lib\ba
se-core.jar;C:\Gemplus\GemXpresso.rad3\lib\base-opt.jar;C:\Gemplus\GemXp
resso.rad3\lib\cryptix-jce-api.jar;C:\Gemplus\GemXpresso.rad3\lib\crypti
x-gemxpresso.jar;C:\Gemplus\GemXpresso.rad3\lib\vopcardservice.jar;C:\JB
uilder6\lib\jbcl.jar;C:\JBuilder6\lib\dx.jar;C:\JBuilder6\lib\beandt.jar
;C:\JBuilder6\jdk1.2.2\demo\jfc\Java2D\Java2Demo.jar;C:\JBuilder6\jdk1.2
.2\jre\lib\ext\comm.jar;C:\JBuilder6\jdk1.2.2\jre\lib\ext\iiimp.jar;C:\J
Builder6\jdk1.2.2\jre\lib\i18n.jar;C:\JBuilder6\jdk1.2.2\jre\lib\jaws.ja
r;C:\JBuilder6\jdk1.2.2\jre\lib\plugprov.jar;C:\JBuilder6\jdk1.2.2\jre\l
ib\rt.jar;C:\JBuilder6\jdk1.2.2\lib\dt.jar;C:\JBuilder6\jdk1.2.2\lib\ext
\comm.jar;C:\JBuilder6\jdk1.2.2\lib\tools.jar"  epurse.VerifyPin 
Start!
wait for card! 
java.lang.ClassNotFoundException:
com.gemplus.opencard.terminal.GemplusRadCardTerminalFactory
            at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
            at java.security.AccessController.doPrivileged(Native
Method)
            at
java.net.URLClassLoader.findClass(URLClassLoader.java:191)
            at java.lang.ClassLoader.loadClass(ClassLoader.java,
Compiled Code)
            at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:285)
><DEFANGED.1 ><DEFANGED.5454             at
java.lang.ClassLoader.loadClass(ClassLoader.java:255)
            at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:314)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:124)
            at
opencard.core.service.SmartCard.handleTerminalFactoryEntries(SmartCard.j
ava, Compiled Code)
            at
opencard.core.service.SmartCard.configureTerminalRegistry(SmartCard.java
, Compiled Code)
            at opencard.core.service.SmartCard.start(SmartCard.java:534)
            at epurse.PassThruService.<init>(PassThruService.java:39)
            at
epurse.VerifyPin.enterPin_actionPerformed(VerifyPin.java:112)
            at epurse.VerifyPin$1.actionPerformed(VerifyPin.java:50)
            at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1066)
            at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractB
utton.java:1101)
            at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.ja
va:378)
            at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
            at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonList
ener.java:204)
            at java.awt.Component.processMouseEvent(Component.java:3165)
            at java.awt.Component.processEvent(Component.java:3004)
            at java.awt.Container.processEvent(Container.java:1014)
            at java.awt.Component.dispatchEventImpl(Component.java,
Compiled Code)
            at java.awt.Container.dispatchEventImpl(Container.java,
Compiled Code)
            at java.awt.Component.dispatchEvent(Component.java, Compiled
Code)
            at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java,
Compiled Code)
            at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:1852)
            at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:1755)
            at java.awt.Container.dispatchEventImpl(Container.java,
Compiled Code)
            at java.awt.Window.dispatchEventImpl(Window.java:761)
            at java.awt.Component.dispatchEvent(Component.java, Compiled
Code)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java,
Compiled Code)
            at
java.awt.EventDispatchThread.pumpOneEventForComponent(EventDispatchThrea
d.java, Compiled Code)
            at
java.awt.EventDispatchThread.pumpEventsForComponent(EventDispatchThread.
java:95)
            at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:90)
            at
java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
java.lang.NullPointerException
            at epurse.PassThruService.APDU(PassThruService.java,
Compiled Code)
            at epurse.PassThruService.select(PassThruService.java:66)
            at
epurse.VerifyPin.enterPin_actionPerformed(VerifyPin.java:113)
            at epurse.VerifyPin$1.actionPerformed(VerifyPin.java:50)
            at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1066)
            at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractB
utton.java:1101)
            at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.ja
va:378)
            at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
            at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonList
ener.java:204)
            at java.awt.Component.processMouseEvent(Component.java:3165)
            at java.awt.Component.processEvent(Component.java:3004)
            at java.awt.Container.processEvent(Container.java:1014)
            at java.awt.Component.dispatchEventImpl(Component.java,
Compiled Code)
            at java.awt.Container.dispatchEventImpl(Container.java,
Compiled Code)
            at java.awt.Component.dispatchEvent(Component.java, Compiled
Code)
            at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java,
Compiled Code)
            at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:1852)
            at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:1755)
            at java.awt.Container.dispatchEventImpl(Container.java,
Compiled Code)
            at java.awt.Window.dispatchEventImpl(Window.java:761)
            at java.awt.Component.dispatchEvent(Component.java, Compiled
Code)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java,
Compiled Code)
            at
java.awt.EventDispatchThread.pumpOneEventForComponent(EventDispatchThrea
d.java, Compiled Code)
            at
java.awt.EventDispatchThread.pumpEventsForComponent(EventDispatchThread.
java:95)
            at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:90)
            at
java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
java.lang.NullPointerException
            at epurse.PassThruService.APDU(PassThruService.java,
Compiled Code)
            at epurse.PassThruService.verifyPin(PassThruService.java:87)
            at
epurse.VerifyPin.enterPin_actionPerformed(VerifyPin.java:114)
            at epurse.VerifyPin$1.actionPerformed(VerifyPin.java:50)
            at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1066)
            at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractB
utton.java:1101)
            at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.ja
va:378)
            at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
            at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonList
ener.java:204)
            at java.awt.Component.processMouseEvent(Component.java:3165)
            at java.awt.Component.processEvent(Component.java:3004)
            at java.awt.Container.processEvent(Container.java:1014)
            at java.awt.Component.dispatchEventImpl(Component.java,
Compiled Code)
            at java.awt.Container.dispatchEventImpl(Container.java,
Compiled Code)
            at java.awt.Component.dispatchEvent(Component.java, Compiled
Code)
            at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java,
Compiled Code)
            at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:1852)
            at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:1755)
            at java.awt.Container.dispatchEventImpl(Container.java,
Compiled Code)
            at java.awt.Window.dispatchEventImpl(Window.java:761)
            at java.awt.Component.dispatchEvent(Component.java, Compiled
Code)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java,
Compiled Code)
            at
java.awt.EventDispatchThread.pumpOneEventForComponent(EventDispatchThrea
d.java, Compiled Code)
            at
java.awt.EventDispatchThread.pumpEventsForComponent(EventDispatchThread.
java:95)
            at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:90)
            at
java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
java.lang.NullPointerException
            at epurse.PassThruService.APDU(PassThruService.java,
Compiled Code)
            at epurse.PassThruService.verifyPin(PassThruService.java:87)
            at
epurse.VerifyPin.enterPin_actionPerformed(VerifyPin.java:115)
            at epurse.VerifyPin$1.actionPerformed(VerifyPin.java:50)
            at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1066)
            at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractB
utton.java:1101)
            at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.ja
va:378)
            at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
            at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonList
ener.java:204)
            at java.awt.Component.processMouseEvent(Component.java:3165)
            at java.awt.Component.processEvent(Component.java:3004)
            at java.awt.Container.processEvent(Container.java:1014)
            at java.awt.Component.dispatchEventImpl(Component.java,
Compiled Code)
            at java.awt.Container.dispatchEventImpl(Container.java,
Compiled Code)
            at java.awt.Component.dispatchEvent(Component.java, Compiled
Code)
            at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java,
Compiled Code)
            at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:1852)
            at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:1755)
            at java.awt.Container.dispatchEventImpl(Container.java,
Compiled Code)
            at java.awt.Window.dispatchEventImpl(Window.java:761)
            at java.awt.Component.dispatchEvent(Component.java, Compiled
Code)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java, C
0a40096d79706163303030310 COMMAND
[EMAIL PROTECTED]
0000:  00 A4 00 00 09 6D 79 70 61 63 30 30 30 31 00     .....mypac0001. 
 
 
VerifyPINpinNo
 
 
901600570696e4e6f0
COMMAND
[EMAIL PROTECTED]
0000:  90 16 00 00 05 70 69 6E 4E 6F 00                 .....pinNo.     
 
 
output retunred
 
 
VerifyPINpinNo
 
 
901600570696e4e6f0
COMMAND
[EMAIL PROTECTED]
0000:  90 16 00 00 05 70 69 6E 4E 6F 00                 .....pinNo.     
 
 
output retunred
 
 
tmp
ompiled Code)
            at
java.awt.EventDispatchThread.pumpOneEventForComponent(EventDispatchThrea
d.java, Compiled Code)
            at
java.awt.EventDispatchThread.pumpEventsForComponent(EventDispatchThread.
java:95)
            at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:90)
            at
java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
 




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