查看 JAR 签名信息
此模组允许在 NeoForge 内置的模组列表界面中查看 JAR 签名信息。
强烈建议您在了解 JAR 签名相关细节,以及其在模组开发环境中的注意事项后再使用本模组。
如果您对所签名的某个模组存疑,请事先使用 jarsigner 进行验证。本模组仅展示由 NeoForge 生成的结果,并不执行任何 JAR 验证操作。
如何解读输出内容
只有经过签名的模组才会显示签名信息。
状态:一目了然 [参见注释]
Leaf signer fingerprint(叶子签名者指纹):首个签名者叶子证书的 SHA256 指纹。
Signer(s) Format(签名者格式):<CodeSignerN>.<CertificateN> [Type]: <Signer Info> (CertAlg)
CodeSigner - 清单中存在的签名者。
Certificate - 签名者证书路径中的证书。
Type:CA - 证书颁发机构;Self - 自签名。
Signer Info:区分名称信息。
CertAlg - 用于创建证书使用的算法名称。
除非 JAR 仅包含一个签名者证书,否则每个叶子签名者的证书前都会添加 * 前缀。
默认情况下,仅显示叶子证书。通过配置可以启用列出所有证书链的功能。
注释
本模组使用了 Mixin 并调用了部分 NeoForge 和 SecureJarHandler 的内部 API 来获取并显示签名者的证书详情。因此,本模组的稳定性无法得到保证。
- 它仅验证
.class 文件,其他文件会被忽略。
- 模组可以在运行时被修改且仍然有效,因为验证是在实际的 JAR 文件中进行的。
- Minecraft 始终会显示
Invalid(无效)状态,因为其安装发生在安装时。
背景
该显示功能主要基于
NeoForge 的 ModListScreen。
该功能最早于 1.16 版本引入,但由于未执行实际检查,很快便在模组列表界面中被禁用。
从 1.17 版本开始,对 .class 文件的验证得以实施。
在 1.21 版本中,其逻辑保持不变,尽管代码已移至不同的包中。
View Jar Signing
This mod enables the ability to view JAR signing info in NeoForge built-in mod list screen.
It is highly recommended that you have some understanding of JAR signing related details,
and its caveats in a modding environment.
If you have doubts about a particular signed mod, please verify it
using jarsigner beforehand.
This mod only exposes the result produced by NeoForge and does not perform any JAR verification.
How to read its output
Only signed mod will have signing information displayed.
Status: self-explanatory [see note]
Leaf signer fingerprint: SHA256 fingerprint for the first signer's leaf certificate.
Signer(s) Format: <CodeSignerN>.<CertificateN> [Type]: <Signer Info> (CertAlg)
* will prefixed for each leaf signer's certificate, except for JAR that has only one signer certificate.
By default, only leaf certificate will be shown. Configuration is provided to enable listing of all certificate chain.
Note
This mod mixin and uses some internal NeoForge and SecureJarHandler APIs to obtain, display the signers' certificate
details. Therefore, stability of this mod is not guaranteed.
- It only verifies
.class files, other files is ignored.
- Mod can be modified in runtime and still be valid, since verification take place in actual JAR file.
- Minecraft will always show
Invalid status since its installation occurred during install-time.
Background
The display is mostly based on
NeoForge's ModListScreen.
It is first introduced in 1.16 but disabled in mod list screen due to it not perform actual checks,
shortly after implemented.
In 1.17 onwards, verification of .class is performed.
In 1.21, it remains unchanged, although it has moved to a different package.
评论 0
登录后参与评分
还没有评论,来抢沙发吧