JDK-8146049 : [TEST_BUG] test/sun/security/mscapi/IterateWindowsRootStore.java failing in 8
  • Type: Bug
  • Component: security-libs
  • Sub-Component: java.security
  • Affected Version: 8
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • OS: windows
  • CPU: x86
  • Submitted: 2015-12-23
  • Updated: 2023-11-29
  • Resolved: 2016-02-29
Related Reports
Duplicate :  
Description
Trying to prepend dummy JCE provider
Sucessfully prepended dummy JCE provider
Reading certificate for alias: Microsoft Root Certificate Authority...STDERR:
java.lang.ArrayIndexOutOfBoundsException: 0
	at sun.security.mscapi.KeyStore.engineGetCertificate(KeyStore.java:315)
	at sun.security.mscapi.KeyStore$ROOT.engineGetCertificate(KeyStore.java:61)
	at java.security.KeyStore.getCertificate(KeyStore.java:1081)
	at IterateWindowsRootStore.main(IterateWindowsRootStore.java:126)
	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.MainActionHelper$SameVMRunnable.run(MainActionHelper.java:218)
	at java.lang.Thread.run(Thread.java:745)
Comments
This should not happen if the change http://hg.openjdk.java.net/jdk8u/jdk8u-dev/jdk/rev/44a6aa58f7b2 is applied and especially the change to src/windows/classes/sun/security/mscapi/KeyStore.java is in place. There, in line 315, I've added coding which should exactly avoid such an ArrayIndexOutOfBoundsException.
23-12-2015