Skip to content

Conversation

@myankelev
Copy link
Member

@myankelev myankelev commented Sep 10, 2025

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
  4. test/jdk/sun/security/ssl/ClientHandshaker/RSAExport.java
  5. test/jdk/javax/net/ssl/ServerName/SSLSocketSNISensitive.java
  6. test/jdk/sun/security/ssl/X509TrustManagerImpl/BasicConstraints.java
  7. test/jdk/sun/security/ssl/X509TrustManagerImpl/ComodoHacker.java
  8. test/jdk/javax/net/ssl/interop/ClientHelloInterOp.java
  9. test/jdk/sun/security/rsa/InvalidBitString.java
  10. test/jdk/java/security/cert/CertPathBuilder/NoExtensions.java
  11. test/jdk/sun/security/provider/certpath/DisabledAlgorithms/CPValidatorTrustAnchor.java
  12. test/jdk/sun/security/x509/X509CRLImpl/Verify.java

PEMRecord tests will be done under a subtask JDK-8367326


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8365072: Refactor tests to use PEM API (Phase 2) (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27194/head:pull/27194
$ git checkout pull/27194

Update a local copy of the PR:
$ git checkout pull/27194
$ git pull https://git.openjdk.org/jdk.git pull/27194/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 27194

View PR using the GUI difftool:
$ git pr show -t 27194

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27194.diff

Using Webrev

Link to Webrev Comment

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
	* test/jdk/javax/net/ssl/interop/ClientHelloBufferUnderflowException.java
       	* test/jdk/javax/net/ssl/interop/ClientHelloChromeInterOp.java
12. test/jdk/sun/security/rsa/InvalidBitString.java
@bridgekeeper
Copy link

bridgekeeper bot commented Sep 10, 2025

👋 Welcome back myankelevich! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Sep 10, 2025

@myankelev This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8365072: Refactor tests to use PEM API (Phase 2)

Reviewed-by: ascarpino

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 1036 new commits pushed to the master branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot changed the title JDK-8365072: Refactor tests to use PEM API (Phase 2) 8365072: Refactor tests to use PEM API (Phase 2) Sep 10, 2025
@openjdk
Copy link

openjdk bot commented Sep 10, 2025

@myankelev The following label will be automatically applied to this pull request:

  • security

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added security security-dev@openjdk.org rfr Pull request is ready for review labels Sep 10, 2025
@mlbridge
Copy link

mlbridge bot commented Sep 10, 2025

Webrevs

Co-authored-by: Francesco Andreuzzi <andreuzzi.francesco@gmail.com>
import java.security.Security;
import java.security.cert.*;
import java.security.cert.CertPathValidatorException.BasicReason;
import java.security.cert.CertPathBuilder;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just removing all wildcard imports, when I touch the file. Was asked to remove several times before and in general wildcard is not the best practice, as this affect compile time, which is important for jtreg tests.

* @test
* @bug 8215790 8219389
* @summary Verify exception
* @enablePreview
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There doesn't look to be any PEM usage in this test

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class extends ClientHelloInterOp, so needs an updated tag.

* @test
* @bug 8169362
* @summary Interop automated testing with Chrome
* @enablePreview
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appears not to need PEM

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class extends ClientHelloInterOp, so needs an updated tag.

KeyFactory kf =
KeyFactory.getInstance(keyMaterialKeyAlgs[i]);
PrivateKey priKey = kf.generatePrivate(priKeySpec);
String keyMaterialStrPEMFormat = new PEMRecord("PRIVATE KEY", keyMaterialKeys[i]).toString();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this one be done with JDK-8367326 instead of this PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you're right, I must have missed this one when removing PEMRecord classes from this PR. I'll change it to not use PEMRecord or move it to JDK-8367326

@openjdk openjdk bot added graal graal-dev@openjdk.org serviceability serviceability-dev@openjdk.org hotspot hotspot-dev@openjdk.org ide-support ide-support-dev@openjdk.org i18n i18n-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org javadoc javadoc-dev@openjdk.org jmx jmx-dev@openjdk.org build build-dev@openjdk.org nio nio-dev@openjdk.org client client-libs-dev@openjdk.org core-libs core-libs-dev@openjdk.org compiler compiler-dev@openjdk.org net net-dev@openjdk.org labels Sep 29, 2025
@openjdk
Copy link

openjdk bot commented Sep 29, 2025

@myankelev build, client, compiler, core-libs, graal, hotspot, i18n, ide-support, javadoc, jmx, net, nio, serviceability, shenandoah have been added to this pull request based on files touched in new commit(s).

@openjdk
Copy link

openjdk bot commented Sep 29, 2025

@myankelev Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

@myankelev
Copy link
Member Author

/help

@openjdk
Copy link

openjdk bot commented Sep 29, 2025

@myankelev Available commands:

  • approval - request for maintainer's approval
  • approve - null
  • author - sets an overriding author to be used in the commit when the PR is integrated
  • backport - create a backport
  • cc - add or remove an additional classification label
  • clean - Mark the backport pull request as a clean backport
  • contributor - adds or removes additional contributors for a PR
  • covered - used when employer has signed the OCA
  • csr - require a compatibility and specification request (CSR) for this pull request
  • help - shows this text
  • integrate - performs integration of the changes in the PR
  • issue - edit the list of issues that this PR solves
  • jep - require a JDK Enhancement Proposal (JEP) for this pull request
  • keepalive - Re-evaluates the pull request and resets the inactivity timeout.
  • label - add or remove an additional classification label
  • open - Set the pull request state to "open"
  • reviewer - manage additional reviewers for a PR
  • reviewers - set the number of additional required reviewers for this PR
  • signed - used after signing the OCA
  • solves - edit the list of issues that this PR solves
  • sponsor - performs integration of a PR that is authored by a non-committer
  • summary - updates the summary in the commit message
  • test - used to run tests
  • touch - Re-evaluates the pull request and resets the inactivity timeout.

@myankelev
Copy link
Member Author

/label remove build,client,compiler,core-libs,graal,hotspot,i18n,ide-support,javadoc,jmx,net,nio,serviceability,shenandoah

@openjdk openjdk bot removed build build-dev@openjdk.org client client-libs-dev@openjdk.org compiler compiler-dev@openjdk.org core-libs core-libs-dev@openjdk.org graal graal-dev@openjdk.org hotspot hotspot-dev@openjdk.org i18n i18n-dev@openjdk.org ide-support ide-support-dev@openjdk.org javadoc javadoc-dev@openjdk.org jmx jmx-dev@openjdk.org net net-dev@openjdk.org nio nio-dev@openjdk.org serviceability serviceability-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org labels Sep 29, 2025
@openjdk
Copy link

openjdk bot commented Sep 29, 2025

@myankelev
The build label was successfully removed.

The client label was successfully removed.

The compiler label was successfully removed.

The core-libs label was successfully removed.

The graal label was successfully removed.

The hotspot label was successfully removed.

The i18n label was successfully removed.

The ide-support label was successfully removed.

The javadoc label was successfully removed.

The jmx label was successfully removed.

The net label was successfully removed.

The nio label was successfully removed.

The serviceability label was successfully removed.

The shenandoah label was successfully removed.

Copy link
Contributor

@ascarpino ascarpino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 21, 2025
@myankelev
Copy link
Member Author

@ascarpino Thank you for your review! /integrate

@myankelev
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Oct 22, 2025

Going to push as commit 8d9b2fa.
Since your change was applied there have been 1048 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 22, 2025
@openjdk openjdk bot closed this Oct 22, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 22, 2025
@openjdk
Copy link

openjdk bot commented Oct 22, 2025

@myankelev Pushed as commit 8d9b2fa.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrated Pull request has been integrated security security-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

3 participants