Click to See Complete Forum and Search --> : Sign an applet in 1.1.7 with Netscape 4.5 and IE 5 (Windows NT 4)


August 11th, 1999, 07:01 AM
Hi,

I want to sign my applet (java 1.1.7 with Netscape 4.5 and IE 5 under Windows NT 4) to launch programs like Excel, read and write local files and print one of my applet's panel. Can you tell me precisely the correct procedure and the necesary programs to download ? Must I use the java's procedure with javakey, or follow the specific Netscape process ?

Thanks you very much,

Paul-Emile Veuve

August 11th, 1999, 09:52 AM
hai,
We are sailing in the same boat. I have the same problem. I found that changing the security options both in InternetExplorer and NetscapeNavigator are not working out. I have even tried out with the lowest level of security for all web sites. Hence I concluded that this is impossible. Can u pls let me know as soon as u achieve it ?
thanx in advance,
devi prasad
devi_prasad@mailcity.com

August 13th, 1999, 11:55 AM
Hello again,

I have found on the web after a long trip the good informations on a web site.
Each browser have a particular procedure to sign applets, and the sites below deals with Internet explorer and Netscape navigator (what we want !).

Here are the useful addresses :

http://www.suitable.com/Doc_codeSigning.shtml (personal site which describe the procedures and give a lot of useful links).
http://ourworld.compuserve.com/homepages/jozart/article/index.html
and the sites of Netscape, Microsoft.

For instance, I try to sign my applet without buying a certificate to a CA (It's quite expensive : $20 a year!), but I don't succeed. It is possible, but the process looks a bit more complicated.

However, I have succeeded in signing my applet on the server with Internet Explorer. It's a good beginning !

Good luck and take heart! we're almost there!

Paul-Emile Veuve

paulemile.veuve@bnpgroup.com

August 16th, 1999, 05:51 PM
Ok, this was a chore for me, so I'll save everyone else the trouble
I went through...

It's different for each browser.

Microsoft
1. Obtain a Authenticode certificate from Verisign (or use test certificate)
2. Enable priviledges in the java code

import com.ms.security.PolicyEngine;
import com.ms.security.PermissionID;

// Assert whatever permission you need
// Look at help for PermissionID class for
// available permissions
PolicyEngine.assertPermission(PermissionID.SYSTEM);



3. Create and sign the CAB file
(Here's a small batch file I use to do it...
del Test.cab
D:\MSJava3.2\bin\cabarc -s 6144 N Test.cab Test.inf
D:\MSJava3.2\bin\signcode -n "Test" -j javasign.dll -jp low.ini -spc TTICredentials.spc -v TTIPrivateKey.pvk WebPurchase.cab
D:\MSJava3.2\bin\setreg 1 TRUE
D:\MSJava3.2\bin\chkjava Test.cab
D:\MSJava3.2\bin\setreg 1 FALSE
4. Distribute on Web
(Example applet Tag to support both browsers in one below...)

Netscape
1. Obtain a Object-Signing certificate from Verisign (or use test certificate)
2. Enable priviledges in the java code

netscape.security.PrivilegeManager.enablePrivilege("UniversalExecAccess");



3. Create and sign the JAR file
(Here's a small batch file I use to do it...
del signdir\Test.class
del signdir\Test.jar
copy Test.class signdir\Test.class
signtool -k"Key Name" -d. -Z"signdir\Test.jar" signdir
4. Distribute on Web
(Example applet Tag to support both browsers in one below...)

Example Applet tag to support both browsers at once
<applet NAME="Test" CODE="Test.class" codebase="/java/" archive="Test.jar" WIDTH="169" HEIGHT="50" MAYSCRIPT VIEWASTEXT id="Applet1">
<param NAME="cabbase" VALUE="Test.cab">
</applet>

Hope this helps...
Direct any other questions to sstephens@touchtechnology.com