From: Charlie.Lai@Eng
Message-Id: <199801131946.LAA03989@angeles.eng.sun.com>
Subject: Re: Applet Signing and Printing
To: sriks@its.soft.net (Srikanth. S.)
Date: Tue, 13 Jan 1998 11:46:49 -0800 (PST)
In-Reply-To: <01BD061F.9BE57160@1234> from "Srikanth. S." at Dec 11, 97 10:26:06 am
> I am trying to print from an Applet after signing it with Duke.
>
> I have followed the "DOIT" scirpt given in your security page
> "Signed Applet Example"
>
> I downloaded Duke.x509, sign_directive_Duke and cert_directive_Duke.
>
> The code i have used is :
>
> PrintJob p = getToolkit().getPrintJob(null, null, null);
>
> if ( p != null )
> {
> Graphics g = (Graphics)p.getGraphics();
> paint(g);
> g.dispose();
> }
>
> p.end();
>
> ..
>
> This is raising a Security Exception when run in HotJava as follows :
>
> sun.applet.AppletSecurityException: checkgetprintjob
> at sun.hotjava.security.PolicyHigh.checkPrintJobAccess(PolicyHigh.java:341)
> at sun.hotjava.security.HotjavaSecurity.checkPrintJobAccess(HotjavaSecurity.java:440)
hi,
if you have hotjava configured with a HIGH or MEDIUM security policy,
then applets can NOT initiate a print job request.
only at the LOW configuration can applets perform print job requests.
however, appletviewer would allow such a request if the applet is signed
and trusted.
thanks,
charlie