Applet Signing and Printing

Srikanth. S. (sriks@its.soft.net)
Thu, 11 Dec 1997 10:26:06 +0530

Message-Id: <01BD061F.9BE57160@1234>
From: "Srikanth. S." <sriks@its.soft.net>
To: "'java-security@java.sun.com'" <java-security@web1.javasoft.com>
Subject: Applet Signing and Printing
Date: Thu, 11 Dec 1997 10:26:06 +0530

Hi,

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)
....

Can u suggest some technique for signing and printing.

I went through the Signing Example quite a few times but am not able to crack it.

Thanks in advance.

Srikanth. S.

/*---------------------------------------------------------*/

Its the journey and not the destination which matters...

S. Srikanth
Software Engineer
IT Solutions India Pvt Ltd
17, South End Road, Basavanagudi,
Bangalore - 4.

EMail : sriks@its.soft.net

/*---------------------------------------------------------*/