java.lang.SecurityException:管辖区策略文件未由可信签署者签名

编程入门 行业动态 更新时间:2024-10-10 13:16:35
本文介绍了java.lang.SecurityException:管辖区策略文件未由可信签署者签名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在处理不同的问题(与RMI相关)时,我使用无限强度策略文件升级了系统的安全文件夹,现在我的应用程序以不同的方式失败。我得到一个很长的堆栈转储,其后面的位似乎是相关的:

In working on a different problem (related to RMI), I upgraded the system's "security folder" with the "unlimited strength" policy files and now my applicaiton fails in a different way. I get a long stack dump, of which following bits appear pertinent:

Exception in thread "main" java.lang.ExceptionInInitializerError [...crop...] Caused by: java.lang.SecurityException: Can not initialize cryptographic mechanism at javax.crypto.JceSecurity.<clinit>(JceSecurity.java:86) ... 17 more Caused by: java.lang.SecurityException: The jurisdiction policy files are not signed by a trusted signer! [...crop...]

嗯,WTF?唯一的变化是我将orignal jar文件放在一边,并在$ JAVA_HOME / lib / security中添加了无限制的文件。该目录现在看起来像这样:

Um, WTF? The ONLY change was that I moved the orignal jar files aside and added the unlimited ones in $JAVA_HOME/lib/security. That directory now looks like this:

$ ls blacklist javaws.policy trusted.libraries cacerts local_policy.jar US_export_policy.jar java.policy local_policy.jar.strong US_export_policy.jar.strong java.security local_policy.jar.unlimited US_export_policy.jar.unlimited

当然,.strong和.unlimited版本都在那里,所以我可以快速切换回来。

Of course, the .strong and .unlimited version are there so I can switch back quickly.

方向简短明了,似乎只能设想替换这两个文件(local_policy.jar和US_exportpolicy.jar)。

The directions were short and plain, and it would appear that they ONLY envision the replacement of these two files (local_policy.jar and US_exportpolicy.jar).

还有什么其他的可以吗?

What else is there to do?

请注意,java和策略文件的版本是迄今为止最年轻的版本:1.7.0_03和jce_policy-6。

Note that the versions of java and the policy files are the very youngest to date: 1.7.0_03, and jce_policy-6, respectively.

PS相似标题的文章,发现这里,完全没有帮助。

P.S. The article of similar title, found here, was of no help at all.

推荐答案

您应该使用 Java 7的策略文件。

更多推荐

java.lang.SecurityException:管辖区策略文件未由可信签署者签名

本文发布于:2023-11-24 16:59:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1626073.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:辖区   可信   策略   文件   java

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!