-
Bug
-
Resolution: Fixed
-
P4
-
9, 11, 17
-
b05
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8265080 | 15.0.4 | Yuri Nesterenko | P4 | Resolved | Fixed | b01 |
JDK-8279897 | 11.0.15-oracle | Prasadarao Koppula | P4 | Resolved | Fixed | b03 |
JDK-8260383 | 11.0.11 | Martin Balao Alonso | P4 | Resolved | Fixed | b01 |
The current JDK -probably any after JDK-8- is not ready to go through the fallback scheme when a Security Manager is installed due to access checks. There are a few issues preventing it:
1) the 'java.base' module does not export 'com.sun.crypto.provider' package to the 'jdk.crypto.cryptoki' module;
2) the default policy does not grant 'jrt:/jdk.crypto.cryptoki' code base 'accessClassInPackage.com.sun.crypto.provider' RuntimePermission; and,
3) even if permission were granted, we need privileged access in P11Util::getProvider method to prevent the check from going through the stack until the AppClassLoader (which does not probably have this permission).
Please note that the 'jdk.crypto.cryptoki' module already has permissions to access other 'java.base' packages such as 'sun.security.*'. Also note how this access requires the package to be exported to the module. I.e.: the 'sun.security.jca' package (from the 'java.base' module) is exported to the 'jdk.crypto.cryptoki' module.
Update: while SunPKCS11 might need to directly create instances of SUN and SunRsaSign provider classes, it already has access permissions through the 'java.base' exported modules and the default policy.
- backported by
-
JDK-8260383 Illegal package access when SunPKCS11 requires SunJCE's classes
- Resolved
-
JDK-8265080 Illegal package access when SunPKCS11 requires SunJCE's classes
- Resolved
-
JDK-8279897 Illegal package access when SunPKCS11 requires SunJCE's classes
- Resolved
- relates to
-
JDK-8261534 Test sun/security/pkcs11/KeyAgreement/IllegalPackageAccess.java fails on platforms where no nsslib artifacts are defined
- Resolved
- links to
-
Commit openjdk/jdk15u-dev/ace2b56d
-
Commit openjdk/jdk/4be21734
-
Review openjdk/jdk15u-dev/22
-
Review openjdk/jdk/1961