Validate Signature Problem

P

pat_cdp

I am trying to validate a digital signature of an XML file in an
applet. The code successfully passes or fails the signature when I run
the applet from appletviewer using an unsigned jar file. As soon as I
sign the jar file from the same keystore so it can access the file
from a browser, too, it produces the following exception:

C:\dev\Java\signxml>appletviewer ValidateXmlX509.html
java.lang.SecurityException: class "ValidateXmlX509$X509KeySelector"'s
signer information does not match signer information of other classes
in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:775)
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:487)
at java.lang.ClassLoader.defineClass(ClassLoader.java:614)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:
124)
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:178)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:127)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.newInstance0(Class.java:326)
at java.lang.Class.newInstance(Class.java:308)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:778)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:707)
at sun.applet.AppletPanel.run(AppletPanel.java:361)
at java.lang.Thread.run(Thread.java:619)

Any ideas as to what I might be doing wrong?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top