Date: Mon, 8 Mar 1999 10:20:57 -0800 (PST)
From: Jan Luehe <Jan.Luehe@Eng>
Subject: Re: addProvider() exception in applet
To: java-security@java.sun.com, leo_trakhtenberg@prusec.com
Security.addProvider() is security-checked.
You need to grant your applet the "insertProvider" permission
for it to be able to install a provider.
See
http://java.sun.com/products/jdk/1.2/docs/guide/security/permissions.html#Securi
tyPermission
for more details.
Jan
> I am trying to setup SunJCE provider in an applet to have some basic
> encryption functionality.
> So when I call addProvider() the applet returns an exception.
>
> /* SAMPLE CODE */
> public class CryptApplet extends Applet
> {
> public void init()
> {
> Security.addProvider(new com.sun.crypto.provider.SunJCE());
> }
> }
>
> /* CONSOLE OUTPUT */
> java.lang.UnsatisfiedLinkError: java/security/AccessController.doPrivileged
> Possible causes: If you are trying to use J/Direct (@dll.import), check
> your compiler version (for JVC, requires 4336 or greater.) If you are
> trying to use RNI, there are new requirements: see documentation.
> at java/security/AccessController.doPrivileged (AccessController.java)
> at com/sun/crypto/provider/SunJCE.<init> (SunJCE.java:54)
> at CryptApplet.init (CryptApplet.java:36)
> at com/ms/applet/AppletPanel.securedCall0 (AppletPanel.java)
> at com/ms/applet/AppletPanel.securedCall (AppletPanel.java)
> at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
> at com/ms/applet/AppletPanel.run (AppletPanel.java)
> at java/lang/Thread.run (Thread.java)
>
>