JavacardOS will not accept order any more, please contact our partner Feitian online Store:
https://ftsafe.en.alibaba.com/index.html

Questions about shareable interface between two javacard applets

JavaCard Applet Development Related Questions and Answers.
Bodewes
Posts: 4
Joined: Wed Jun 10, 2015 4:44 am
Points :12
Contact:

Questions about shareable interface between two javacard applets

Post by Bodewes » Tue Sep 15, 2015 4:48 am

I want to call the commethod() of the second applet in the process() method of my first applet.
For example,
the first applet:

Code: Select all

package first;
public class firstapp extends Applet {

    private firstapp()
     {
     
     }

    public static void install(byte bArray[], short bOffset, byte bLength)
   {
        new firstapp().register();
    }

    public void process(APDU apdu)
     {
         if(selectingApplet())
         {
                 return;
         }
         byte[] buf = apdu.getBuffer();
         
        //call commethod() of the second applet
       
    }

}

the second applet

Code: Select all

package second;
public class secondapp extends Applet {

    private secondapp()
    {
   
    }

    public static void install(byte bArray[], short bOffset, byte bLength)
    {
        new secondapp().register();
    }

    public void process(APDU apdu)
     {

     }

    public void commethod()
    {
        ISOException.throwIt((short)0x6901);
    }

}

And I know that I need to implement Shareable interface.
My Qs:
1-The two applets are in two different packages. Should I implement it in each package?
2- If I implement Shareable, any other applet is also able to access this applet, isn't it? If so, how can i make this method only available for one applet?

predators
Posts: 21
Joined: Wed Aug 19, 2015 7:18 am
Points :12
Contact:

Re: Questions about shareable interface between two javacard applets

Post by predators » Mon Nov 02, 2015 8:39 am

I see there is a vedio "http://javacardos.com/javacardforum/viewtopic.php?f=31&t=86" about how to import another package, you can view it.
I feel it's very good, and will help to you.

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 29 guests

JavaCard OS : Disclaimer