-
Bug
-
Resolution: Fixed
-
P3
-
7, 8, 11, 17, 20, 21
-
b26
-
generic
-
linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8323979 | 21.0.3-oracle | Ramesh Gangadhar | P3 | Resolved | Fixed | b02 |
JDK-8324705 | 21.0.3 | Goetz Lindenmaier | P3 | Resolved | Fixed | b01 |
JDK-8325801 | 17.0.12-oracle | Weibing Xiao | P3 | Resolved | Fixed | b01 |
JDK-8330649 | 17.0.12 | Andrew Lu | P3 | Resolved | Fixed | b01 |
JDK-8325867 | 11.0.26-oracle | Weibing Xiao | P3 | Resolved | Fixed | b02 |
JDK-8331700 | 11.0.24 | Andrew Lu | P3 | Resolved | Fixed | b02 |
JDK-8341428 | 8-pool | Weibing Xiao | P3 | Open | Unresolved | |
JDK-8325892 | 8u421-perf | Weibing Xiao | P3 | Resolved | Fixed | b01 |
Below are a number of examples. It looks like the native libs of the system do not support any more RSA keys with 512 bit length.
Should the tests be adjusted so that some keys are not tested any more in case the system is too new?
Examples of errors :
sun/security/pkcs11/KeyStore/Basic.java
----------------------------------------------
....
test 31 passed
test 32 passed
test 33 passed
got [pk1] signing key: SunPKCS11-nss RSA private key, 512 bits token object, not sensitive, extractable)
test Basic.testBasic(): failure
java.security.InvalidKeyException: RSA key must be at least 1023 bits
at jdk.crypto.cryptoki/sun.security.pkcs11.P11Signature.checkKeySize(P11Signature.java:430)
at jdk.crypto.cryptoki/sun.security.pkcs11.P11Signature.engineInitSign(P11Signature.java:496)
at java.base/java.security.Signature$Delegate.engineInitSign(Signature.java:1357)
at java.base/java.security.Signature.initSign(Signature.java:636)
at Basic.signAlias(Basic.java:313)
at Basic.sign(Basic.java:287)
at Basic.doTest(Basic.java:234)
at Basic.main(Basic.java:190)
at PKCS11Test.premain(PKCS11Test.java:174)
at PKCS11Test.testNSS(PKCS11Test.java:550)
at PKCS11Test.main(PKCS11Test.java:210)
at Basic.testBasic(Basic.java:116)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599)
at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174)
at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822)
at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.testng.TestRunner.privateRun(TestRunner.java:764)
at org.testng.TestRunner.run(TestRunner.java:585)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
at org.testng.SuiteRunner.run(SuiteRunner.java:286)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
at org.testng.TestNG.runSuites(TestNG.java:1069)
at org.testng.TestNG.run(TestNG.java:1037)
at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:93)
at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:53)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
at java.base/java.lang.Thread.run(Thread.java:1591)
sun/security/pkcs11/rsa/TestKeyFactory.java
------------------------------------------------
java.security.InvalidKeyException: Could not create RSA public key
at jdk.crypto.cryptoki/sun.security.pkcs11.P11RSAKeyFactory.implTranslatePublicKey(P11RSAKeyFactory.java:70)
at jdk.crypto.cryptoki/sun.security.pkcs11.P11KeyFactory.engineTranslateKey(P11KeyFactory.java:153)
at java.base/java.security.KeyFactory.translateKey(KeyFactory.java:469)
at TestKeyFactory.testPublic(TestKeyFactory.java:164)
at TestKeyFactory.test(TestKeyFactory.java:221)
at TestKeyFactory.main(TestKeyFactory.java:241)
at PKCS11Test.premain(PKCS11Test.java:174)
at PKCS11Test.testNSS(PKCS11Test.java:550)
at PKCS11Test.main(PKCS11Test.java:210)
at TestKeyFactory.main(TestKeyFactory.java:228)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
at java.base/java.lang.Thread.run(Thread.java:1591)
Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_ATTRIBUTE_VALUE_INVALID
at jdk.crypto.cryptoki/sun.security.pkcs11.wrapper.PKCS11.C_CreateObject(Native Method)
at jdk.crypto.cryptoki/sun.security.pkcs11.P11RSAKeyFactory.generatePublic(P11RSAKeyFactory.java:193)
at jdk.crypto.cryptoki/sun.security.pkcs11.P11RSAKeyFactory.implTranslatePublicKey(P11RSAKeyFactory.java:59)
... 13 more
sun/security/pkcs11/rsa/TestKeyPairGenerator.java
-------------------------------------------------------
sunpkcs11: Initializing PKCS#11 library /usr/lib64/libsoftokn3.so
java.security.InvalidParameterException: RSA key must be at least 1023 bits. The specific key size 512 is not supported
at jdk.crypto.cryptoki/sun.security.pkcs11.P11KeyPairGenerator.initialize(P11KeyPairGenerator.java:154)
at java.base/java.security.KeyPairGenerator$Delegate.initialize(KeyPairGenerator.java:665)
at java.base/java.security.KeyPairGenerator.initialize(KeyPairGenerator.java:377)
at TestKeyPairGenerator.main(TestKeyPairGenerator.java:127)
at PKCS11Test.premain(PKCS11Test.java:174)
at PKCS11Test.testNSS(PKCS11Test.java:550)
at PKCS11Test.main(PKCS11Test.java:210)
at TestKeyPairGenerator.main(TestKeyPairGenerator.java:108)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
at java.base/java.lang.Thread.run(Thread.java:1591)
- backported by
-
JDK-8341428 sun/security/pkcs11 tests fail on Linux RHEL 8.6 and newer
- Open
-
JDK-8323979 sun/security/pkcs11 tests fail on Linux RHEL 8.6 and newer
- Resolved
-
JDK-8324705 sun/security/pkcs11 tests fail on Linux RHEL 8.6 and newer
- Resolved
-
JDK-8325801 sun/security/pkcs11 tests fail on Linux RHEL 8.6 and newer
- Resolved
-
JDK-8325867 sun/security/pkcs11 tests fail on Linux RHEL 8.6 and newer
- Resolved
-
JDK-8325892 sun/security/pkcs11 tests fail on Linux RHEL 8.6 and newer
- Resolved
-
JDK-8330649 sun/security/pkcs11 tests fail on Linux RHEL 8.6 and newer
- Resolved
-
JDK-8331700 sun/security/pkcs11 tests fail on Linux RHEL 8.6 and newer
- Resolved
- relates to
-
JDK-8296675 Exclude linux-aarch64 in NSS tests
- Resolved
-
JDK-8320690 sun/security/pkcs11/Provider/MultipleLogins.sh fails after 8295343
- Closed
-
JDK-8324841 PKCS11 tests still skip execution
- Resolved
-
JDK-8295405 Add cause in a couple of IllegalArgumentException and InvalidParameterException shown by sun/security/pkcs11 tests
- Closed
-
JDK-8296611 Problemlist several sun/security tests until JDK-8295343 is resolved
- Resolved
- links to
-
Commit openjdk/jdk11u-dev/1da8fd84
-
Commit openjdk/jdk17u-dev/d4512fe0
-
Commit openjdk/jdk21u-dev/cc189ffc
-
Commit openjdk/jdk/6ce0ebb8
-
Review openjdk/jdk11u-dev/2694
-
Review openjdk/jdk17u-dev/2412
-
Review openjdk/jdk21u-dev/186
-
Review openjdk/jdk/16294