RFR: 8342188: Update tests to use stronger key parameters and certificates [v5]

Fernando Guallini fguallini at openjdk.org
Thu Oct 24 09:27:23 UTC 2024


On Wed, 23 Oct 2024 19:43:33 GMT, Matthew Donovan <mdonovan at openjdk.org> wrote:

>> Fernando Guallini has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains seven additional commits since the last revision:
>> 
>>  - minor changes to update SecurityUtils comments and refactoring
>>  - Merge branch 'master' into 8342188
>>  - Use hex value for diffieHellmanGroup enum
>>  - DHKeyAgreement2.java refactor
>>  - DH group reusable
>>  - fixed copyright year and not changing DES
>>  - initial commit
>
> test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyFactory.java line 61:
> 
>> 59:     private void run() throws Exception {
>> 60: 
>> 61:         jdk.test.lib.security.DiffieHellmanGroup dhGroup = jdk.test.lib.security.SecurityUtils.getTestDHGroup();
> 
> don't need fully qualified names here.

Thanks I missed that

> test/lib/jdk/test/lib/security/SecurityUtils.java line 132:
> 
>> 130:                 return DiffieHellmanGroup.ffdhe4096;
>> 131:             }
>> 132:             default -> throw new RuntimeException("Test DH group not defined for " + primeSize);
> 
> can clean this a little bit with
> 
> 
> return switch(primeSize) {
>     case 2048 -> DiffieHellmanGroup.ffdhe2048;
>     case 3072 -> DiffieHellmanGroup.ffdhe3072;
>     case 4096 -> DiffieHellmanGroup.ffdhe4096;
>    default -> throw new RuntimeException("Test DH group not defined for " + primeSize);
> };

Applied

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21563#discussion_r1814617516
PR Review Comment: https://git.openjdk.org/jdk/pull/21563#discussion_r1814620721


More information about the security-dev mailing list