java - 删除 jre/lib/ext 的 Jarsigner 问题

标签 java java-9 jarsigner

根据这篇文章:https://blogs.oracle.com/java-platform-group/planning-safe-removal-of-under-used-endorsed-extension-directories

Java 9 中删除的 jre/lib/ext。

我的问题是我使用的是 Jarsigner,它在以前的 Java 版本中在 jre/lib/ext 文件夹中找到了我的提供程序 jar。

jarsigner -tsa timestamp.digicert.com -verbose -keystore NONE -storetype PKCS11 
      -storepass null -providername <MY_PROVIDER_NAME> <JAR_FILE> <CERTIFICATE_NAME> 

我该如何解决?

最佳答案

changes to the installed JDK/JRE image带来由目录组成的运行时图像,包括 -

conf — contains .properties, .policy, and other kinds of files intended to be edited by developers, deployers, and end users. These files were formerly found in the lib directory or its subdirectories.


JDK9 中的 java.security 文件(位于 .../Home/conf/security 下)在默认提供者列表中列出了 SunPKCS11 提供者

security.provider.13=SunPKCS11

#SunPKCS11 Configuration 在引用指南下详细说明了如何添加 jdk.crypto.cryptoki 中存在的提供程序。 JDK 模块。

因此,理想情况下,在 Java9 中也不需要配置到 sunpkcs11 提供程序的路径。


要添加提供程序如何捆绑到模块中的示例,请从 JEP 220: Modular Run-Time Images

Security-policy files and other uses of the CodeSource API can use jrt URLs to name specific modules for the purpose of granting permissions. The elliptic-curve cryptography provider, e.g., can now be identified by the jrt URL

jrt:/jdk.crypto.ec 

Other modules that are currently granted all permissions but do not actually require them can trivially be de-privileged, i.e., given precisely the permissions they require.

关于java - 删除 jre/lib/ext 的 Jarsigner 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47413076/

相关文章:

java - Junit 测试总是返回 false

java - 使用硬件 token 加速 jarsigner?

java - 用 while 循环结束我的游戏 -- java

java - 从 Java 字符串中删除无效的转义序列

java - 使用 Google Guava 进行 getIfPresent() 按枚举值进行搜索

java - JarSigner 在 java 中完成?

java - 在时间戳服务器上使用时间戳和身份验证对 jar 进行签名

java - Scala 与 Java 9 不兼容 - java.lang.NoClassDefFoundError

java - 如何从 Java 9 模块导出所有包?

java - 如何删除 Java 9 中的模块层?