签名的java小程序有限制吗?
我写了一个java小程序并对其进行了自签名。当我在 eclipse 中运行它或作为可执行 jar 运行它时,它工作正常。但是当我上传它时,它什么也没做。它加载了,并且确实出现了自签名证书警告,我单击“是”但没有任何反应。我的印象是签名的小程序没有任何限制。可能是什么问题?
I wrote a java applet and self signed it. When I run it in eclipse or as a executable jar it works fine. But when I upload it, it doesn't do anything. It loads, and the self signed cert warning does come up and I click yes but nothing. I was under the impression that signed applets had no restrictions. What could be the problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您使用证书签署您的小程序。如果该证书不是来自“现实生活”情况下的 Thawte 等权威机构,则您的小程序将不会被浏览器认为是安全的,除非用户通过放宽 Jaca 策略(或接受自签名证书)明确授予您访问权限。 Eclipse 等开发工具内置了宽松的策略,因此您不会遇到问题,
而且定价为 相当僵硬
You sign your applet with a certificate. If that cert doesn't come from authority such as Thawte in "real life" situation your applet will not be considered safe by your browser without user explicitly granting you access by relaxing Jaca policy (or accepting self-signed cert). Dev tools such as Eclipse have that relaxed policy built in so that's why you don't have a problem
And the pricing is pretty stiff
请参阅 http://java.sun.com/docs/books /tutorial/deployment/applet/security.html。我引用:
像这样签署小程序代码除了弹出安全警告对话框之外没有任何效果。
除了“我创建一个 applet jar 并将其上传到我的服务器,然后在 HTML 页面的 applet 标记中引用它”之外,“当我上传它时,它不会执行任何操作”可能意味着很多事情当我打开页面时,会弹出安全警告对话框,但我单击它,但没有进一步发生”。
See http://java.sun.com/docs/books/tutorial/deployment/applet/security.html. I quote:
Signing applet code like this has no effect except popping a security warning dialog.
There are a number of things you might have meant by "when I upload it, it doesn't do anything" other than "I create an applet jar and upload it to my server, then reference it in an applet tag of an HTML page and when I open the page, the security warning dialog pops up but I click it and nothing further occurs".
当您希望小程序存储信息(例如cookie)时,您需要参数“mayscript”。
希望这有帮助
You need The parameter "mayscript" when you want your applet to store information e.g. on cookies.
Hope this helps