Link to home
Start Free TrialLog in
Avatar of dyma82
dyma82

asked on

Sign Applets

I coded an applet which writes a executable file to the client's directory system and then executes this file.

How can I sign this applet, so that it could work.

Can anybody give me the whole procedure to do this???

I read about in Sun's site and it was really confusing.


Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of bobbit31
bobbit31
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mallyh
mallyh

Hi,

Just of the bat, you are going to need a certificate first (thawte, verisign), you then need to
import that into netscape and IE.

You will need extra security source code for Netscape:

import netscape.security.PrivilegeManager;
Your Code . . . . . . .

                    System.out.println("Trying to acquire permission to read system files...");

                    try
                    {
                         PrivilegeManager.enablePrivilege("UniversalFileRead");
                         // PrivilegeManager.enablePrivilege("SuperUser");
                         System.out.println("\tSuccess! Privilege is enabled.");
                    }
                    catch (netscape.security.ForbiddenTargetException ee)
                    {
                         System.out.println("\tFailed! Permission to read system files denied by user.");
                    }
                    catch (Exception pe)
                    {
                         System.out.println("\tFailed! Unknown exception while enabling privilege.");
                         pe.printStackTrace();
                    }

You are going to need the netscape signtool to create and sign your jar for netscape

and you will need the cabsdk (cabarc and signcode) to create and sign the cab file
for IE.

These methods are for 1.1 applets I think the process has possibly changed for 1.2
applets, but hey, who wants to deploy a swing applet on the internet, only 2% of users
would be able to use it and the others would all need to upgrade Internet connections,
VM's and the applets would still be to slow, what I am saying is, if an applet then keep
it AWT.

Of couse the above mentioned URL's will give you more detailed info.

Hope this helps

Malcolm
Any Progress dyma82????
i was first ;)
Admin notified of User neglect. Force-accepted by
Netminder
Community Support Moderator
Experts Exchange