-
Bug
-
Resolution: Won't Fix
-
P3
-
None
-
11, 17, 20
-
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)
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)
- relates to
-
JDK-8293808 mscapi destroyKeyContainer enhance KeyStoreException: Access is denied exception
- Resolved