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

NPE in P11KeyStore.getID

    XMLWordPrintable

Details

    Description

      e.g. run the " sun/security/pkcs11/Secmod/AddTrustedCert.java" test with -Djava.security.debug=all property.

      scl:
      java.lang.NullPointerException: Cannot read the array length because "bytes" is null
              at jdk.crypto.cryptoki/sun.security.pkcs11.P11KeyStore.getID(P11KeyStore.java:2158)
              at jdk.crypto.cryptoki/sun.security.pkcs11.P11KeyStore.getTokenObject(P11KeyStore.java:2208)
              at jdk.crypto.cryptoki/sun.security.pkcs11.P11KeyStore.destroyCert(P11KeyStore.java:1959)
              at jdk.crypto.cryptoki/sun.security.pkcs11.P11KeyStore.deleteEntry(P11KeyStore.java:561)
              at jdk.crypto.cryptoki/sun.security.pkcs11.P11KeyStore.engineSetEntry(P11KeyStore.java:1053)
              at jdk.crypto.cryptoki/sun.security.pkcs11.P11KeyStore.engineSetCertificateEntry(P11KeyStore.java:528)
              at java.base/java.security.KeyStore.setCertificateEntry(KeyStore.java:1253)
              at AddTrustedCert.main(AddTrustedCert.java:106)
              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:127)
              at java.base/java.lang.Thread.run(Thread.java:1589)

      Attachments

        Issue Links

          Activity

            People

              mpowers Mark Powers
              coffeys Sean Coffey
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: