将自签名证书添加到Java证书管理器作为“签名者CA”会破坏我的applet(Win7 64位)

时间:2013-11-09 21:19:01

标签: java security applet certificate

我正在创建一个Java applet,它连接到本地文件系统上的SQLite数据库。我已经使用keytool创建了一个签名证书。我已经签署了我使用的每个Jar文件,我可以启动applet,并且在Google Chrome和IE中运行良好

我确实得到了标准的安全警告对话框,我必须在每次加载页面时单击“确定”,但就是这样。它有效。

为了避免此安全警告,我已将相同的证书(通过Java控制面板)添加到Signer CA证书存储区。现在,当浏览页面时,我收到安全警告,允许我检查“不要问我同一个发布者(或类似的东西)”。但applet不再有效,我在Java控制台中得到以下异常列表

basic: Plugin2ClassLoader.getPermissions CeilingPolicy allPerms
security: SHA-256Certificate finger print: 7478E95FEAC103F0934BD2DDB669DE9A6105AD26ABA30C0C9F3A61107BFEBF4D
network: Cache entry not found [url: file:/C:/Work/Projects/OP/SPA_Notes/web/web/java/SPA_NotesApplet.jar, version: null]
basic: exception: java.lang.reflect.InvocationTargetException.
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at sun.plugin2.applet.Plugin2ClassLoader.defineClassHelper(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.access$100(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    ... 14 more
Caused by: java.lang.NullPointerException
    at sun.plugin2.applet.Plugin2ClassLoader.loadAllowedCodebases(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.getPermissions(Unknown Source)
    at sun.plugin2.applet.Applet2ClassLoader.getPermissions(Unknown Source)
    at java.security.SecureClassLoader.getProtectionDomain(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    ... 18 more
basic: Removed progress listener: sun.plugin.util.ProgressMonitorAdapter@175db37
security: Reset deny session certificate store

我不是真的在家里使用Java或其安全设置,所以任何帮助将不胜感激。

再次重复:如果我不将证书添加到“Signer CA”证书存储区,一切正常。所以我不认为签署JAR文件是个问题。我猜测,我自己创建的证书不适合用作签名者CA证书,或者因为没有信任链来验证CA(但我不知道为什么会这么重要)。

0 个答案:

没有答案