Your demo failed...

David Boydston (dhboy@sb.net)
Thu, 06 Feb 1997 20:15:01 +0000

Date: Thu, 06 Feb 1997 20:15:01 +0000
From: David Boydston <dhboy@sb.net>
To: java-security@java
Subject: Your demo failed...

Greetings,

We just followed your online example. Duke was created, X509 downloaded,
etc. We are running Win95, and just tryed your demo signed applet
demo...it failed with the following:

G:\JDK1.1b3\JavaDev\SerPort\WinTerm\Applet>appletviewer
http://java.sun.com/secu
rity/signExample/signedWriteFile.html
loading G:\JDK1.1B3\JAVA\BIN\..\lib\awt.properties
sun.applet.AppletSecurityException: checkwrite
at sun.applet.AppletSecurity.checkWrite(AppletSecurity.java:427)
at java.io.FileOutputStream.<init>(FileOutputStream.java:53)
at writeFile.paint(writeFile.java:33)
at java.awt.Component.dispatchEvent(Component.java:1317)
at java.awt.Container.dispatchEvent(Container.java:796)
at
java.awt.EventDispatchThread.run(EventDispatchThread.java:109)
sun.applet.AppletSecurityException: checkwrite
at sun.applet.AppletSecurity.checkWrite(AppletSecurity.java:427)
at java.io.FileOutputStream.<init>(FileOutputStream.java:53)
at writeFile.paint(writeFile.java:33)
at java.awt.Component.dispatchEvent(Component.java:1317)
at java.awt.Container.dispatchEvent(Container.java:796)
at
java.awt.EventDispatchThread.run(EventDispatchThread.java:109)

The Duke.X509 as listed with javakey looks like this:

G:\JDK1.1b3\JavaDev\SerPort\WinTerm\Applet>javakey dc Duke.x509
[
X.509v1 certificate,
Subject is CN=Duke, OU="JavaSoft ", O=Sun MicroSystems, C=US
Key: Sun DSA Public Key
parameters:sun.security.provider.AlgIdDSA
p:
fca682ce8e12caba26efccf7110e526db078b05edecbcd1eb4a208f3ae1617ae01f35b91a47e6
df63413c5e12ed0899bcd132acd50d99151bdc43ee737592e17
q: 962eddcc369cba8ebb260ee6b6a126d9346e38c5
g:
678471b27a9cf44ee91a49c5147db1a9aaf244f05a434d6486931d2d14271b9e35030b71fd73d
a179069b32e2935630e1c2062354d0da20a6c416e50be794ca4

y:
dd5da581547aa326a9e38481dd09f673c14a6a26443f0783a15ef37862f58ea1085c3c3e08e99
c897649369221e399ecde22395a463a24bf40402edd88adbd79
Validity <Fri Jan 17 00:00:00 GMT+00:00 1997> until <Fri Jan 16
00:00:00 GMT+0
0:00 1998>
Issuer is CN=Duke, OU="JavaSoft ", O=Sun MicroSystems, C=US
Issuer signature used [SHA1withDSA]
Serial number = 03e9
]

What is the fix for this?

-- 
Dave Boydston
Solutions Consulting