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/