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

sun/security/mscapi/CastError.java failure - KeyStoreException: Access is denied

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P3 P3
    • None
    • 11, 17, 20
    • security-libs
    • None
    • generic
    • windows

      The test sun/security/mscapi/CastError.java sometimes fails with "KeyStoreException: Access is denied" .
      The issue is seen on various Windows releases ( server 2012, 2016, 2022).
      It shows up in OpenJDK 11, 17 and 20 (most likely in 8 too).

      jdk17 :

      java.security.KeyStoreException: Access is denied.

      at jdk.crypto.mscapi/sun.security.mscapi.CKeyStore.destroyKeyContainer(Native Method)
      at jdk.crypto.mscapi/sun.security.mscapi.CKeyStore.engineDeleteEntry(CKeyStore.java:521)
      at jdk.crypto.mscapi/sun.security.mscapi.CKeyStore$MY.engineDeleteEntry(CKeyStore.java:57)
      at java.base/java.security.KeyStore.deleteEntry(KeyStore.java:1245)
      at CastError.main(CastError.java:50)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:568)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
      at java.base/java.lang.Thread.run(Thread.java:833)

      jdk20 :

      java.security.KeyStoreException: Access is denied.

      at jdk.crypto.mscapi/sun.security.mscapi.CKeyStore.destroyKeyContainer(Native Method)
      at jdk.crypto.mscapi/sun.security.mscapi.CKeyStore$KeyEntry.delete(CKeyStore.java:199)
      at jdk.crypto.mscapi/sun.security.mscapi.CKeyStore.engineDeleteEntry(CKeyStore.java:539)
      at jdk.crypto.mscapi/sun.security.mscapi.CKeyStore$MY.engineDeleteEntry(CKeyStore.java:60)
      at java.base/java.security.KeyStore.deleteEntry(KeyStore.java:1270)
      at CastError.main(CastError.java:50)
      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.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
      at java.base/java.lang.Thread.run(Thread.java:1589)

            mbaesken Matthias Baesken
            mbaesken Matthias Baesken
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: