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

Failing tests in sun/security/pkcs11/Secmod with libnss 3.35

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P3 P3
    • None
    • 8u202, 9.0.4
    • security-libs
    • None

      We started running tests on a new Linux distro (based on debian testing) and noticed that two tests started failing on jdk8u (but jdk head seems OK). The most likely culprit is the change in libnss version. We're excluding them

      sun/security/pkcs11/Secmod/GetPrivateKey.java generic-all
      sun/security/pkcs11/Secmod/JksSetPrivateKey.java generic-all

      STDOUT:
      SunPKCS11-NSSKeyStore version 1.8
      entries: 0
      []
      null
      Signing...
      STDERR:
      java.security.InvalidKeyException: Key must not be null
      at sun.security.rsa.RSAKeyFactory.engineTranslateKey(RSAKeyFactory.java:182)
      at sun.security.rsa.RSAKeyFactory.toRSAKey(RSAKeyFactory.java:111)
      at sun.security.rsa.RSASignature.engineInitSign(RSASignature.java:106)
      at sun.security.rsa.RSASignature.engineInitSign(RSASignature.java:99)
      at java.security.Signature$Delegate.init(Signature.java:1155)
      at java.security.Signature$Delegate.chooseProvider(Signature.java:1115)
      at java.security.Signature$Delegate.engineInitSign(Signature.java:1179)
      at java.security.Signature.initSign(Signature.java:530)
      at GetPrivateKey.main(GetPrivateKey.java:65)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
      at java.lang.Thread.run(Thread.java:748)

      JavaTest Message: Test threw exception: java.security.InvalidKeyException: Key must not be null
      JavaTest Message: shutting down test

      ---


      STDOUT:
      SunPKCS11-NSSKeyStore version 1.8
      entries: 0
      []
      null
      STDERR:
      java.security.KeyStoreException: Cannot store non-PrivateKeys
      java.lang.IllegalArgumentException: Private key must be accompanied by certificate chain
      at java.security.KeyStore.setKeyEntry(KeyStore.java:1136)
      at JksSetPrivateKey.main(JksSetPrivateKey.java:73)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
      at java.lang.Thread.run(Thread.java:748)

            jjiang John Jiang
            martin Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: