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

java/security/SecureRandom/ApiTest fails when run with unlimited policy

XMLWordPrintable

      Parameter for SecureRandom mechanism: CTR_DRBG is (param:223,pr_and_reseed,null, algo:AES-128, df:true)java.lang.RuntimeException: Unknown :
      at ApiTest.checkException(ApiTest.java:207)
      at ApiTest.runForEachParam(ApiTest.java:135)
      at ApiTest.runForEachAlg(ApiTest.java:115)
      at ApiTest.runForEachMech(ApiTest.java:102)
      at ApiTest.main(ApiTest.java:81)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:537)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110)
      at java.base/java.lang.Thread.run(Thread.java:844)
      Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: DRBG, provider: SUN, class: sun.security.provider.DRBG)
      at java.base/java.security.Provider$Service.newInstance(Provider.java:1827)
      at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:243)
      at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:190)
      at java.base/java.security.SecureRandom.getInstance(SecureRandom.java:506)
      at ApiTest.runForEachParam(ApiTest.java:131)
      ... 9 more
      Caused by: java.lang.IllegalArgumentException: AES-128 does not support strength 223
      at java.base/sun.security.provider.CtrDrbg.chooseAlgorithmAndStrength(CtrDrbg.java:89)
      at java.base/sun.security.provider.AbstractDrbg.configure(AbstractDrbg.java:672)
      at java.base/sun.security.provider.CtrDrbg.<init>(CtrDrbg.java:63)
      at java.base/sun.security.provider.DRBG.createImpl(DRBG.java:219)
      at java.base/sun.security.provider.DRBG.<init>(DRBG.java:207)
      at java.base/jdk.internal.reflect.GeneratedConstructorAccessor1.newInstance(Unknown Source)
      at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:455)
      at java.base/java.security.Provider.newInstanceUtil(Provider.java:159)
      at java.base/java.security.Provider.access$1100(Provider.java:102)
      at java.base/java.security.Provider$Service.newInstance(Provider.java:1820)
      ... 13 more

      Set java.security to be:

      crypto.policy=unlimited

            ssahoo Sibabrata Sahoo (Inactive)
            wetmore Bradford Wetmore
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: