JDK-8229658 : Jtreg test TestAESWithProviderChange fails after 8u222
  • Type: Bug
  • Component: security-libs
  • Affected Version: openjdk8u222
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: generic
  • Submitted: 2019-08-14
  • Updated: 2020-04-08
  • Resolved: 2019-09-10
Related Reports
Duplicate :  
Description
Jtreg test TestAESWithProviderChange fails after 8u222:

Error messages:

----------System.err:(1150/75850)----------
java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.security.util")
        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
        at java.security.AccessController.checkPermission(AccessController.java:886)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
        at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1564)
        at java.lang.ClassLoader$1.run(ClassLoader.java:496)
        at java.lang.ClassLoader$1.run(ClassLoader.java:494)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.lang.ClassLoader.checkPackageAccess(ClassLoader.java:494)
        at com.sun.crypto.provider.ElectronicCodeBook.encrypt(ElectronicCodeBook.java:116)
        at com.sun.crypto.provider.CipherCore.update(CipherCore.java:785)
        at com.sun.crypto.provider.AESCipher.engineUpdate(AESCipher.java:410)
        at javax.crypto.Cipher.update(Cipher.java:1944)
        at Dynamic.runTest(Dynamic.java:150)
        at Dynamic.runAllTest(Dynamic.java:89)
        at Dynamic.run(Dynamic.java:59)
        at TestAESWithProviderChange.main(TestAESWithProviderChange.java:37)
        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:92)
        at java.lang.Thread.run(Thread.java:748)

    ......

Jtreg test TestAESWithRemoveAddProvide has simillar issues.

We found it passes after reverting this commit: http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/0da125166b2b
Comments
This duplicates : https://bugs.openjdk.java.net/browse/JDK-8228440
10-09-2019