RFR: 8341927: Replace hardcoded security providers with new test.provider.name system property [v5]

Sean Mullan mullan at openjdk.org
Wed Oct 30 14:18:09 UTC 2024


On Wed, 30 Oct 2024 13:09:26 GMT, Matthew Donovan <mdonovan at openjdk.org> wrote:

>> In this PR, I removed hard-coded security providers and replaced them with a system property, test.provider.name. If the property is not specified, the provider originally used in the test is used:
>> 
>> Cipher c = Cipher.getInstance("AES/GCM/NoPadding", System.getProperty("test.provider.name", "SunJCE"));
>
> Matthew Donovan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   added documentation for the new property

Changes requested by mullan (Reviewer).

doc/testing.html line 596:

> 594: test/jdk/sun/security/pkcs11/README.</p>
> 595: <h3 id="testing-with-external-security-providers">Testing with external
> 596: security providers</h3>

Avoid the word "external". Change this to "Testing with an alternate security provider".

doc/testing.html line 597:

> 595: <h3 id="testing-with-external-security-providers">Testing with external
> 596: security providers</h3>
> 597: <p>Some security tests currently use a hardcoded provider for

Remove "currently".
s/for/when instantiating/
s/or SecretKeyFactory/or SecretKeyFactory objects/

doc/testing.html line 598:

> 596: security providers</h3>
> 597: <p>Some security tests currently use a hardcoded provider for
> 598: KeyFactory, Cipher, KeyPairGenerator, KeyGenerator, or SecretKeyFactory.

Put the APIs in code font.

doc/testing.html line 600:

> 598: KeyFactory, Cipher, KeyPairGenerator, KeyGenerator, or SecretKeyFactory.
> 599: Specify the <code>-Dtest.provider.name=NAME</code> property, to use a
> 600: specific provider when instantiating the service.</p>

s/specific/different/
No comma needed after "property".
s/service/service(s)/

doc/testing.md line 606:

> 604: test/jdk/sun/security/pkcs11/README.
> 605: 
> 606: ### Testing with external security providers

Same comments as above apply here.

doc/testing.md line 613:

> 611: instantiating the service.
> 612: 
> 613: ### Testing with external security providers

Duplicate entry?

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

PR Review: https://git.openjdk.org/jdk/pull/21551#pullrequestreview-2405070747
PR Review Comment: https://git.openjdk.org/jdk/pull/21551#discussion_r1822724459
PR Review Comment: https://git.openjdk.org/jdk/pull/21551#discussion_r1822729868
PR Review Comment: https://git.openjdk.org/jdk/pull/21551#discussion_r1822732493
PR Review Comment: https://git.openjdk.org/jdk/pull/21551#discussion_r1822727408
PR Review Comment: https://git.openjdk.org/jdk/pull/21551#discussion_r1822732880
PR Review Comment: https://git.openjdk.org/jdk/pull/21551#discussion_r1822733645


More information about the serviceability-dev mailing list