小程序的安全问题
我开发了一个小程序。但是当我的浏览器从网络服务器获取它时,它会弹出安全警告。我不想收到这个消息。这意味着小程序应该在没有最终用户许可的情况下运行。我怎样才能做到这一点?我需要对我的小程序进行签名吗?如果是,从哪里可以签名?签字的费用是多少?
I have developed an applet. But when my browser fetches it from the webserver it pops a security warring. I don't want this message to come. Meaning applet should run without the end users permession. How can I do that? Do I need to get my applet signed? If yes, from where can i get it signed? What's the cost of geting it signed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的描述可能涉及许多问题,例如尝试执行需要信任的操作的代码。在本例中,情况听起来并非如此。如果您的未签名代码尝试执行需要信任的操作,则它不会在启动时提示用户,而是在尝试可信操作时提示用户(例如,在以后的 JRE 中进行跨站点访问),或者只是失败并出现 AccessControlException 或相似的。
您的小程序可能使用多个 Jars 并遇到
您的小程序是公开可用的吗?我/我们可以访问它的 URL 是什么?
顺便说一句,如果您的小程序试图突破安全沙箱,它必须是可信的。这意味着代码必须经过数字签名,并由最终用户根据提示进行确定。没有办法解决这个问题。
但它不需要 CA 颁发的代码签名证书。您可以使用 SDK 的工具推出自己的代码签名证书。我有一些小演示。在签名之前编译和构建代码的代码项目。
Your description might relate to a number of problems, such as the code trying to do things which require trust. That does not sound like the case in this instance. If your unsigned code tried to do things that required trust, it would not prompt the user at start-up, but either prompt them when the trusted action is attempted (e.g. for cross site access in later JREs) or just fail with an AccessControlException or similar.
It could be that your applet uses multiple Jars and has run into the mixed code restrictions introduced in Java 1.6.0_20. But the symptoms do not sound quite right for that either.
Is your applet publicly available? What is the URL where I/we can visit it?
As an aside, if your applet tries to break out of the security sand-box, it must be trusted. That means the code must be digitally signed, and OK'd by the end user at the prompt. There is no way around it.
But it does not require a code signing certificate issued from a CA. You can roll your own code signing certificate using the tools of the SDK. I have a few small demos. of code projects that compile and build code before signing it.
您需要为自己获取代码签名证书。如果您想避免所有警告,可能是由一些“知名”CA 提供的。证书本身需要花钱,但是一旦拥有它,您就可以使用它来签署任意数量的小程序(您自己进行签名)。
You need to get yourself a code-signing certificate. Probably by some "well-known" CA if you want to avoid all warnings. The certificate itself costs money, but once you have it, you can use it to sign as many applets as you want (you do the signing yourself).