JDK-8211049 : Second parameter of "initialize" method is not used
  • Type: Bug
  • Component: security-libs
  • Sub-Component: java.security
  • Affected Version: 11,12
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2018-09-18
  • Updated: 2023-11-29
  • Resolved: 2018-11-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12 JDK 8 Other
11.0.3-oracleFixed 12 b19Fixed 8u271Fixed openjdk8u272Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Description
A DESCRIPTION OF THE PROBLEM :
The second parameter of method "initialize(int keySize, SecureRandom random)" in "sun.security.rsa.RSAKeyPairGenerator" is not used. 

    // initialize the generator. See JCA doc
    public void initialize(int keySize, SecureRandom random) {
        try {
            initialize(new RSAKeyGenParameterSpec(keySize,
                    RSAKeyGenParameterSpec.F4), null);
        } catch (InvalidAlgorithmParameterException iape) {
            throw new InvalidParameterException(iape.getMessage());
        }
    }

It seems "null" is used, ignoring the passing in parameter. 

I don't know if this is intended or not. 

FREQUENCY : always



Comments
Fix Request (8u) I would like to backport this to 8u for parity with Oracle 8u271. The original patch applied cleanly and passed jdk_security test.
27-07-2020

Fix Request This fixes an important issue, need to have it in 11u. Patch applies to 11u cleanly, new regression test fails without product fix, passes with it. Patched 11u also passes entire jdk_security suite.
18-02-2019

URL: http://hg.openjdk.java.net/jdk/jdk/rev/4ee78b5583f9 User: valeriep Date: 2018-11-07 01:07:41 +0000
07-11-2018

Should use the supplied SecureRandom object instead of our own.
03-10-2018