Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8309214

sun/security/pkcs11/KeyStore/CertChainRemoval.java fails after 8301154

    XMLWordPrintable

Details

    • b12
    • generic
    • linux
    • Verified

    Backports

      Description

        The new test sun/security/pkcs11/KeyStore/CertChainRemoval.java (introduced by JDK-8301154) fails on some tests systems.
        Failures can be seen for example on RHEL 8.5 and SUSE Linux 15.3 .
        Example output :

        config CertChainRemoval.setUp(): success
        Beginning test run CertChainRemoval...
        Cannot resolve artifact, please check if JIB jar is present in classpath.
        nssLibDir: /usr/lib64/
        Running test with provider SunPKCS11-nss (security manager disabled) ...
        Starting with:
        Entry# 1 = ca1
        Entry# 2 = root
        Entry# 3 = pk1
        ========
        Initial PKCS11 KeyStore:
        ========
        Add pk1, ca1 and root, then delete pk1
        test CertChainRemoval.test(): failure
        java.security.KeyStoreException: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_GENERAL_ERROR
        at jdk.crypto.cryptoki/sun.security.pkcs11.P11KeyStore.engineSetEntry(P11KeyStore.java:1121)
        at jdk.crypto.cryptoki/sun.security.pkcs11.P11KeyStore.engineSetKeyEntry(P11KeyStore.java:462)
        at java.base/java.security.KeyStore.setKeyEntry(KeyStore.java:1192)
        at CertChainRemoval.main(CertChainRemoval.java:141)
        at PKCS11Test.premain(PKCS11Test.java:174)
        at PKCS11Test.testNSS(PKCS11Test.java:550)
        at PKCS11Test.main(PKCS11Test.java:210)
        at PKCS11Test.main(PKCS11Test.java:186)
        at CertChainRemoval.test(CertChainRemoval.java:77)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        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:1593)
        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:102)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:58)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:578)
        at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
        at java.base/java.lang.Thread.run(Thread.java:1583)
        Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_GENERAL_ERROR
        at jdk.crypto.cryptoki/sun.security.pkcs11.wrapper.PKCS11.C_CreateObject(Native Method)
        at jdk.crypto.cryptoki/sun.security.pkcs11.P11KeyStore.storeCert(P11KeyStore.java:1576)
        at jdk.crypto.cryptoki/sun.security.pkcs11.P11KeyStore.storeChain(P11KeyStore.java:1591)
        at jdk.crypto.cryptoki/sun.security.pkcs11.P11KeyStore.storePkey(P11KeyStore.java:1814)
        at jdk.crypto.cryptoki/sun.security.pkcs11.P11KeyStore.engineSetEntry(P11KeyStore.java:1117)
        ... 37 more

        Attachments

          Issue Links

            Activity

              People

                valeriep Valerie Peng
                mbaesken Matthias Baesken
                Votes:
                1 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: