RFR: 8260693: Provide the support for specifying a signer in keytool -genkeypair [v2]

Hai-May Chao hchao at openjdk.java.net
Thu Apr 1 20:37:54 UTC 2021


On Thu, 1 Apr 2021 16:53:31 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> Hai-May Chao has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Updated with review comments
>
> src/java.base/share/classes/sun/security/tools/keytool/CertAndKeyGen.java line 88:
> 
>> 86:      * constructor CertAndKeyGen(String keyType, String sigAlg,
>> 87:      * String providerName, PrivateKey signerPrivateKey,
>> 88:      * X500Name signerSubjectName)
> 
> You can simply add a `@see #CertAndKeyGen(String, String, String, PrivateKey, X500Name)`.

Done.

> src/java.base/share/classes/sun/security/tools/keytool/CertAndKeyGen.java line 132:
> 
>> 130:         if (signerPrivateKey != null) {
>> 131:             this.signerFlag = true;
>> 132:         }
> 
> If you make this line `this.sigerFlag = signerPrivateKey != null`, then we can make most field final.

Done, and no change to final.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3281



More information about the security-dev mailing list