Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Jun 1999 10:38:56 -0700
From:      Chris Andrichak <chrisx@ha2mpka.eng.sun.com>
To:        "Erwan Arzur" <erwan@netvalue.fr>, "Greg Lynn" <dglynn@vaview5.vavu.vt.edu>
Cc:        <java@FreeBSD.ORG>
Subject:   Re: Signing Applets with JDK 1.1.x...
Message-ID:  <199906011739.KAA18160@ha2mpka.eng.sun.com>

next in thread | raw e-mail | index | archive | help
You'll need the Netscape and MS security libs, certificates to sign for
both the Netscape Object Signing Format and the MS Authenticode signing
format.

Then you get to put fun code in your applet like this to ask for permissions
from both set of things:

try {
	// What perms you ask for here depends on what you want to do
	// read the NS/MS apis for the perms lists
	PrivilegeManager.enablePrivilege("UniversalConnect");
	com.ms.security.PolicyEngine.assertPermission(com.ms.security.PermissionID.NETIO);
}
catch (LinkageError i) {}  // in case class refs don't work
catch (SecurityException secx)
{
	// MS permission NOT granted
	return;
}
catch (ForbiddenTargetException fe)
{
	// Netscape permission NOT granted
	return;
}
catch (Exception e) {} // so Netscape doesn't complain about lack of com.ms classes

// next try and do your out-of-sandbox thing



You'll need to include the netscape.security stub classes (availible from
Netscape) in your CAB file for MSIE. You'll only need to have the MS
com.ms.security classes around for your compile.

Using signtool from Netscape for NSO siging is pretty easy, good luck
getting CAB signing to work with the MS JDK. It's pretty voodoo-ish.



"Erwan Arzur" <erwan@netvalue.fr> wrote:
]Date: Fri, 28 May 1999 16:53:25 +0200
]Greg Lynn wrote:
]
]> So what might be the solution?
]
]You may be able to develop a single class that will, by detecting the type of
]browser VM that is running it, dynamically invoke (using the java.reflect APIs)
]the right methods, using the right parameters. You have to do this dynamically
]because trying to create an instance of say netscape.security.SecurityManager
]will throw a ClassNotFoundException with IE, for instance ...
]
]Mhhh ... Maybe using Makefiles and the C preprocessor ?
]
]But you'll still have to develop multiple times ...
]
]
]
]
]
]To Unsubscribe: send mail to majordomo@FreeBSD.org
]with "unsubscribe freebsd-java" in the body of the message

 -----------------------------------------------
    chris   chrisx@eng.sun.com
 -----------------------------------------------



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906011739.KAA18160>