Java Web Start Sign 库 Jars

标签 java security java-web-start sign jar-signing

我有一个 Java Web Start 应用程序,其中包含多个 JAR 库。现在我需要对 JAR 进行签名才能使其通过浏览器运行。

我的问题是:除了主要的 Jar 签名之外,我是否还需要对应用程序内的每个库 JAR 进行签名?

最佳答案

想象一下,如果您有一个农场并饲养有值(value)的鸵鸟。为了防止鸵鸟走失并被狮子吃掉,你在农场周围竖起了栅栏。但不幸的是,你只有足够的栅栏铁丝来围绕农场 4 个边中的 3 个边设置栅栏。鸵鸟(以及您的投资)安全吗?当然不是。

安全也是同样的原理。 任何未经数字签名的库 Jar 都是安全漏洞的潜在来源。通向底线..

应用程序中的每个 Jar。必须在应用程序之前进行数字签名。可以被认为是安全且值得信赖的。

..if I sign libraries that are already signed will the new signature override the old one?

不一定。来自 jarsigner docs: Multiple Signatures for a JAR File我们看到..

Multiple Signatures for a JAR File

A JAR file can be signed by multiple people by running the jarsigner command on the file multiple times and specifying the alias for a different person each time, as follows:

jarsigner myBundle.jar susan
jarsigner myBundle.jar kevin

When a JAR file is signed multiple times, there are multiple .SF and .DSA files in the resulting JAR file, one pair for each signature. In the previous example, the output JAR file includes files with the following names:

SUSAN.SF
SUSAN.DSA
KEVIN.SF
KEVIN.DSA

关于Java Web Start Sign 库 Jars,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27385736/

相关文章:

Java Web Start - 如何清除缓存(或从用户的角度更新应用程序)

java - JMathPlot 请问Maven依赖代码是什么

java - MapReduce适合调用Web服务和转换XML数据吗?

javascript - AJAX 请求的安全性

php - 可以将密码以纯文本形式存储在 php 变量或 php 常量中吗?

php - 使用 foreach 循环从 $_POST 安全问题中获取创建变量?

Java Web Start (JNLP) 加载消息

java - 如何将 WebStart JNLP 与 JRE 捆绑在一起

java - 是否有用于生成 MOBI 电子书文档的 Java 或 Ruby 库?

java - Android 服务未从设置中初始化变量