Hello,
I knew to install the example HelloWorld.cap of gpshell examples, in a
gemXpressoPro card.
But, I try to install my .cap with the HelloWorld source and I receive this
error (this .cap have the code that you send me):
*6985* - Condition of use not satisfied.
This is the script of installation:
mode_201
gemXpressoPro
enable_trace
establish_context
card_connect
select -AID A000000018434D00
open_sc -security 3 -keyind 0 -keyver 0 -key
47454d5850524553534f53414d504c45 // Open secure channel
install -file HelloWorld.cap -sdAID A000000018434D00 -nvCodeLimit 100
card_disconnect
release_context
What happends?
thanks,
Cristiano
2007/11/20, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
> Hi,
>
> it is the sample project HelloWorld from the Sun Java Card download. I
> have attached the one I have found in version 2.2
>
> Regards,
> Karsten
> /*
> * Copyright (c) 2002 Sun Microsystems, Inc. All rights reserved.
> * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
> */
>
> // /*
> // Workfile:@(#)HelloWorld.java 1.5
> // Version:1.5
> // Date:02/01/02
> //
> // Archive:
>
> /Products/Europa/samples/com/sun/javacard/samples/HelloWorld/HelloWorld.java
>
> // Modified:02/01/02 16:39:05
> // Original author: Mitch Butler
> // */
>
> package com.sun.javacard.samples.HelloWorld;
>
> import javacard.framework.*;
>
> /**
> */
>
> public class HelloWorld extends Applet
> {
> private byte[] echoBytes;
> private static final short LENGTH_ECHO_BYTES = 256;
>
> /**
> * Only this class's install method should create the applet object.
> */
> protected HelloWorld()
> {
> echoBytes = new byte[LENGTH_ECHO_BYTES];
> register();
> }
>
> /**
> * Installs this applet.
> * @param bArray the array containing installation parameters
> * @param bOffset the starting offset in bArray
> * @param bLength the length in bytes of the parameter data in
> bArray
> */
> public static void install(byte[] bArray, short bOffset, byte
> bLength)
> {
> new HelloWorld();
> }
>
> /**
> * Processes an incoming APDU.
> * @see APDU
> * @param apdu the incoming APDU
> * @exception ISOException with the response bytes per ISO 7816-4
> */
> public void process(APDU apdu)
> {
> byte buffer[] = apdu.getBuffer();
>
> short bytesRead = apdu.setIncomingAndReceive();
> short echoOffset = (short)0;
>
> while ( bytesRead > 0 ) {
> Util.arrayCopyNonAtomic(buffer, ISO7816.OFFSET_CDATA,
> echoBytes, echoOffset, bytesRead);
> echoOffset += bytesRead;
> bytesRead = apdu.receiveBytes(ISO7816.OFFSET_CDATA);
> }
>
> apdu.setOutgoing();
> apdu.setOutgoingLength( (short) (echoOffset + 5) );
>
> // echo header
> apdu.sendBytes( (short)0, (short) 5);
> // echo data
> apdu.sendBytesLong( echoBytes, (short) 0, echoOffset );
> }
>
> }
>
>
> _______________________________________________
> Muscle mailing list
> [email protected]
> http://lists.drizzle.com/mailman/listinfo/muscle
>
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle