RFR: 8365072: Refactor tests to use PEM API (Phase 2) [v2]
Anthony Scarpino
ascarpino at openjdk.org
Fri Sep 26 22:18:24 UTC 2025
On Thu, 11 Sep 2025 10:02:07 GMT, Mikhail Yankelevich <myankelevich at openjdk.org> wrote:
>> Tests changed in this PR:
>> 1. test/jdk/java/security/cert/CertPathBuilder/selfIssued/StatusLoopDependency.java
>> 2. test/jdk/java/security/cert/CertPathValidator/indirectCRL/CircularCRLTwoLevel.java
>> 3. test/jdk/java/security/cert/CertPathValidator/indirectCRL/CircularCRLTwoLevelRevoked.java
>> 6. test/jdk/sun/security/ssl/ClientHandshaker/RSAExport.java
>> 7. test/jdk/javax/net/ssl/ServerName/SSLSocketSNISensitive.java
>> 9. test/jdk/sun/security/ssl/X509TrustManagerImpl/BasicConstraints.java
>> 10. test/jdk/sun/security/ssl/X509TrustManagerImpl/ComodoHacker.java
>> 11. test/jdk/javax/net/ssl/interop/ClientHelloInterOp.java
>> 12. test/jdk/sun/security/rsa/InvalidBitString.java
>> 14. test/jdk/java/security/cert/CertPathBuilder/NoExtensions.java
>> 17. test/jdk/sun/security/provider/certpath/DisabledAlgorithms/CPValidatorTrustAnchor.java
>> 19. test/jdk/sun/security/x509/X509CRLImpl/Verify.java
>>
>> PEMRecord tests will be done under a subtask [JDK-8367326](https://bugs.openjdk.org/browse/JDK-8367326)
>
> Mikhail Yankelevich has updated the pull request incrementally with one additional commit since the last revision:
>
> Francesco's comment
>
> Co-authored-by: Francesco Andreuzzi <andreuzzi.francesco at gmail.com>
test/jdk/java/security/cert/CertPathBuilder/selfIssued/StatusLoopDependency.java line 45:
> 43: import java.security.PEMDecoder;
> 44: import java.security.Security;
> 45: import java.security.cert.CertPathBuilder;
Did you intentionally list every `java.security.cert` class used or did the IDE do that? The changes was made with a number of tests and other import paths, but I'm only mentioning it here. Just a suggestion that `*` looks cleaner.
test/jdk/javax/net/ssl/interop/ClientHelloBufferUnderflowException.java line 33:
> 31: * @bug 8215790 8219389
> 32: * @summary Verify exception
> 33: * @enablePreview
There doesn't look to be any PEM usage in this test
test/jdk/javax/net/ssl/interop/ClientHelloChromeInterOp.java line 33:
> 31: * @bug 8169362
> 32: * @summary Interop automated testing with Chrome
> 33: * @enablePreview
Appears not to need PEM
test/jdk/javax/net/ssl/interop/ClientHelloInterOp.java line 296:
> 294:
> 295: // generate the private key.
> 296: String keyMaterialStrPEMFormat = new PEMRecord("PRIVATE KEY", keyMaterialKeys[i]).toString();
Should this one be done with [JDK-8367326](https://bugs.openjdk.org/browse/JDK-8367326) instead of this PR?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27194#discussion_r2383109895
PR Review Comment: https://git.openjdk.org/jdk/pull/27194#discussion_r2383557564
PR Review Comment: https://git.openjdk.org/jdk/pull/27194#discussion_r2383589810
PR Review Comment: https://git.openjdk.org/jdk/pull/27194#discussion_r2383590927
More information about the security-dev
mailing list