Skip to content

8366261: Provide utility methods for sun.security.util.Password#3232

Open
fitzsim wants to merge 1 commit into
openjdk:masterfrom
fitzsim:backport-8366261-password-utility-methods
Open

8366261: Provide utility methods for sun.security.util.Password#3232
fitzsim wants to merge 1 commit into
openjdk:masterfrom
fitzsim:backport-8366261-password-utility-methods

Conversation

@fitzsim

@fitzsim fitzsim commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

This pull request backports:

8366261: Provide utility methods for sun.security.util.Password

as a dependency for another backport to follow shortly:

8354469: Keytool exposes the password in plain text when command is piped using | grep

I considered combining them into one backport pull request but the second backport required non-trivial adjustments, so I will submit it separately in the hope of simplifying the review.

Starting from the backport of 8366261 to 17, I made the following adjustments:

JavaIOAccess.java adjustments:

  • In 17 JavaIOAccess.java was renamed from:

    src/java.base/share/classes/jdk/internal/misc/JavaIOAccess.java

    to:

    src/java.base/share/classes/jdk/internal/access/JavaIOAccess.java

    Left as-is in 11.

  • Adjust copyright year

  • Adjust java.util.Optional import for changed context

  • Mark passwordConsole and readPasswordNoNewLine declarations public

Console.java adjustments:

  • Adjust java.lang.annotation.Native import for changed context

  • Adjust java.util.concurrent.atomic.AtomicReference import for changed context

  • Adjust TTY_STDIN_MASK, TTY_STDOUT_MASK, and TTY_STDERR_MASK declarations offset, and mark them private

  • Adjust ttyStatus field declaration offset

Console_md.c adjustment:

  • Adjust copyright year

I tested the combined 8366261 + 8354469 backports with the two new jtreg tests introduced by the latter, and they both pass.

A continuous integration test run showed a failure on macos-x64:

The following tests timed out resulting in failures:

serviceability/sa/ClhsdbFindPC.java#id1: run main/othervm/timeout=480 ClhsdbFindPC true true
serviceability/sa/ClhsdbFindPC.java#id3: run main/othervm/timeout=480 ClhsdbFindPC false true 

The other two tests in the same file passed:

serviceability/sa/ClhsdbFindPC.java#id0: run main/othervm/timeout=480 ClhsdbFindPC true false
serviceability/sa/ClhsdbFindPC.java#id2: run main/othervm/timeout=480 ClhsdbFindPC false false

The failures seem unrelated to this pull request's changes; I suspect they are due to a loading issue on macos-x64 infrastructure.



Progress

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

Issue

  • JDK-8366261: Provide utility methods for sun.security.util.Password (Enhancement - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk11u-dev.git pull/3232/head:pull/3232
$ git checkout pull/3232

Update a local copy of the PR:
$ git checkout pull/3232
$ git pull https://git.openjdk.org/jdk11u-dev.git pull/3232/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3232

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk11u-dev/pull/3232.diff

Using Webrev

Link to Webrev Comment

Backport-of: 91417890a24450d7cb23d188df4f631304d41ed6
@bridgekeeper

bridgekeeper Bot commented Jun 26, 2026

Copy link
Copy Markdown

👋 Welcome back fitzsim! 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

openjdk Bot commented Jun 26, 2026

Copy link
Copy Markdown

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk Bot changed the title Backport 91417890a24450d7cb23d188df4f631304d41ed6 8366261: Provide utility methods for sun.security.util.Password Jun 26, 2026
@openjdk

openjdk Bot commented Jun 26, 2026

Copy link
Copy Markdown

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk Bot added the backport Port of a pull request already in a different code base label Jun 26, 2026
@fitzsim fitzsim marked this pull request as ready for review June 26, 2026 16:46
@openjdk openjdk Bot added the rfr Pull request is ready for review label Jun 26, 2026
@mlbridge

mlbridge Bot commented Jun 26, 2026

Copy link
Copy Markdown

Webrevs

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

Labels

backport Port of a pull request already in a different code base rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

1 participant