tldr/pages.zh/common/jarsigner.md

17 lines
428 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# jarsigner
> 签名并验证 Java 存档JAR文件。
> 更多信息见: <https://docs.oracle.com/javase/9/tools/jarsigner.htm>.
- 签名一个 `JAR` 文件:
`jarsigner {{path/to/file.jar}} {{keystore_alias}}`
- 使用特定算法对 `JAR` 文件进行签名:
`jarsigner -sigalg {{algorithm}} {{path/to/file.jar}} {{keystore_alias}}`
- 验证 `JAR` 文件的签名:
`jarsigner -verify {{path/to/file.jar}}`