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

SunPKCS11-Solaris provider tests failing on Solaris 11.4

XMLWordPrintable

    • b18
    • generic
    • solaris_11
    • Not verified

        Newer versions of Solaris 11 seem to offer functionality at pkcs11 level which allows for extra pkcs11 testing.

        e.g. on Solaris 11.3, the following message is displayed:
        ====
        Beginning test run TestKATForGCM...
        Running test with provider SunPKCS11-Solaris (security manager disabled) ...
        Skip testing SunPKCS11-Solaris, no support for AES/GCM/NoPadding
        Completed test with provider SunPKCS11-Solaris (262 ms).
        ====

        On Solaris 11.4, the SunPKCS11-Solaris provider is not skipped:
        e.g.
        ====
        Beginning test run TestKATForGCM...
        Running test with provider SunPKCS11-Solaris (security manager disabled) ...
        Failed Test Vector: key=11754cd72aec309bf52f7687212e8957, iv=3c819d9a9bed087615030b65, pt=null,aad=null, ct=null, tag=250327c674aaf477aef2675748cf6971
        ====

        On Solaris 11.4, the following tests seem to fail :
        sun/security/pkcs11/Cipher/ReinitCipher.java
        sun/security/pkcs11/Cipher/Test4512704.java
        sun/security/pkcs11/Cipher/TestCICOWithGCM.java
        sun/security/pkcs11/Cipher/TestCICOWithGCMAndAAD.java
        sun/security/pkcs11/Cipher/TestGCMKeyAndIvCheck.java
        sun/security/pkcs11/Cipher/TestKATForGCM.java
        sun/security/pkcs11/Cipher/TestSymmCiphers.java
        sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java
        sun/security/pkcs11/Mac/MacSameTest.java
        sun/security/pkcs11/MessageDigest/ByteBuffers.java
        sun/security/pkcs11/ec/ReadCertificates.java

        Errors such as following are seen:

        ----------System.err:(611/41794)----------
        java.security.InvalidKeyException: Could not initialize cipher
        at jdk.crypto.cryptoki/sun.security.pkcs11.P11AEADCipher.implInit(P11AEADCipher.java:327)
        at jdk.crypto.cryptoki/sun.security.pkcs11.P11AEADCipher.engineInit(P11AEADCipher.java:247)
        at java.base/javax.crypto.Cipher.init(Cipher.java:1445)
        at java.base/javax.crypto.Cipher.init(Cipher.java:1378)
        at TestKATForGCM.execute(TestKATForGCM.java:261)
        at TestKATForGCM.main(TestKATForGCM.java:318)
        at PKCS11Test.premain(PKCS11Test.java:183)
        at PKCS11Test.testDefault(PKCS11Test.java:270)
        at PKCS11Test.main(PKCS11Test.java:218)
        at TestKATForGCM.main(TestKATForGCM.java:303)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:567)
        at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
        at java.base/java.lang.Thread.run(Thread.java:830)
        Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_MECHANISM_PARAM_INVALID
        at jdk.crypto.cryptoki/sun.security.pkcs11.wrapper.PKCS11.C_EncryptInit(Native Method)
        at jdk.crypto.cryptoki/sun.security.pkcs11.P11AEADCipher.initialize(P11AEADCipher.java:394)
        at jdk.crypto.cryptoki/sun.security.pkcs11.P11AEADCipher.implInit(P11AEADCipher.java:325)
        ... 15 more

        Backports of PKCS11 v2.40 would also be impacted.

              valeriep Valerie Peng
              coffeys Sean Coffey
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: