RFR[15] JDK-8245134: test/lib/jdk/test/lib/security/KeyStoreUtils.java should allow to specify aliases

sha.jiang at oracle.com sha.jiang at oracle.com
Thu May 21 02:38:49 UTC 2020


Hi Valerie,
Thanks for your comments!

On 2020/5/21 04:21, Valerie Peng wrote:
>
> Hi John,
>
> - line 125, typo: "aliaes" should be "aliases"
>
Will fix it.

> - line 132: if aliases is not null, check its length is certStrs.length
>
Will fix it.

> - line 152, use the specified type instead of DEFAULT_TYPE?
>
Will fix it.

> - line 176, maybe it's better to just supply the type, clearer and 
> less dependency.
>
Not get this point.
Could you please describe some more?

> With this extra aliases argument, number of createTrustStore(...) 
> methods doubled from 2 to 4, number of createKeyStore(...) methods 
> also doubled from 4 to 8. Isn't it a bit much to have 8 methods doing 
> the same thing? Especially in the case of createKeyStore(...), quite a 
> few of them have long list of arguments with the same type, combining 
> this with the large number of methods, it can get confusing on which 
> method is called. How often do you think the aliases are supplied? 
> Maybe we only add methods which will be used instead of adding all 
> possible combinations.
>
I'll remove 4 createKeyStore(...) methods (like the below one) that have 
long list of arguments.
createKeyStore(String type, String[] keyAlgos,
             String[] keyStrs, String[] passwords, String[] certStrs,
             String[] aliases)
It looks no test is using them. My tests also won't use them.

Best regards,
John Jiang
>
> Thanks,
> Valerie
> On 5/15/2020 11:40 PM, sha.jiang at oracle.com wrote:
>> Hi,
>> This patch adds some new createTrustStore() and createKeyStore() 
>> methods to test
>> lib class jdk.test.lib.security.KeyStoreUtils.
>> These new methods allow to pass trust/key store aliases in.
>>
>> Issue: https://bugs.openjdk.java.net/browse/JDK-8245134
>> Webrev: http://cr.openjdk.java.net/~jjiang/8245134/webrev.00/
>>
>> Best regards,
>> John Jiang
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/security-dev/attachments/20200521/bc36122a/attachment.htm>


More information about the security-dev mailing list