RFR: 8358171: Additional code coverage for PEM API
Fernando Guallini
fguallini at openjdk.org
Tue Jun 3 09:47:09 UTC 2025
On Mon, 2 Jun 2025 23:46:23 GMT, Matthew Donovan <mdonovan at openjdk.org> wrote:
>> The tests included in this PR add code coverage mainly to the following classes introduced/updated by JEP 470 (PEM): PEMDecoder, PEMEncoder, Pem, EncryptedPrivateKeyInfo and the Key factories. In addition, more tests are included for RSAPSS, multithreading, _jdk.epkcs8.defaultAlgorithm_ property and some negative testing
>
> test/jdk/java/security/PEM/PEMData.java line 49:
>
>> 47: +OO4oO0VNduC44gUN1nrk7/wdNSpL+xXNEX52Dsff+2RD/fop224ANvB
>> 48: -----END PRIVATE KEY-----
>> 49: """, KeyPair.class, "SunEC");
>
> When possible, we've been replacing hard-coded provider names with the system property, such as `System.getProperty("test.provider.name", "SunEC")`.
>
> Is that appropriate for these tests?
I think that may not applicable for these tests, as there are multiple providers in this file to support all of the PEM decodings. It would need something like:"test.provider.1.name", "test.provider.2.name" and so on, it may be too confusing.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25588#discussion_r2123300286
More information about the security-dev
mailing list