Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8286423: Destroy password protection in the example code in KeyStore #8623

Closed
wants to merge 3 commits into from

Conversation

XueleiFan
Copy link
Member

@XueleiFan XueleiFan commented May 10, 2022

Hi,

May I have this simple example update in the KeyStore specification?

Password protection should be destroyed in the example code in KeyStore specification. Otherwise, applications may just copy and past the code, and forget to clean up password protection.

It's a trivial update, and may not worthy of a CSR. But please let me know if you would like to have a CSR filed.

Thanks,
Xuelei


Progress

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

Issue

  • JDK-8286423: Destroy password protection in the example code in KeyStore

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/8623/head:pull/8623
$ git checkout pull/8623

Update a local copy of the PR:
$ git checkout pull/8623
$ git pull https://git.openjdk.java.net/jdk pull/8623/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 8623

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/8623.diff

@bridgekeeper
Copy link

bridgekeeper bot commented May 10, 2022

👋 Welcome back xuelei! 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 added the rfr label May 10, 2022
@openjdk
Copy link

openjdk bot commented May 10, 2022

@XueleiFan 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 the security label May 10, 2022
@mlbridge
Copy link

mlbridge bot commented May 10, 2022

Webrevs

* ks.store(fos, password);
* }
* } finally {
* protParam.destroy();
Copy link
Contributor

@wangweij wangweij May 10, 2022

Choose a reason for hiding this comment

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

KeyStore.ProtectionParameter does not have a destroy method. Only PasswordProtection does.

Copy link
Member Author

@XueleiFan XueleiFan May 10, 2022

Choose a reason for hiding this comment

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

Oops, I tried to check but finally forgot about it. Thanks!

Copy link
Contributor

@wangweij wangweij May 10, 2022

Choose a reason for hiding this comment

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

It's probably better to convert these long example code to snippets, maybe next time.

Copy link
Member Author

@XueleiFan XueleiFan May 11, 2022

Choose a reason for hiding this comment

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

The length is a little bit long, but it is fine to me. It may be nice to revise the example and description, but let's do it later. I modified the example by using one try clause only.

Copy link
Contributor

@wangweij wangweij left a comment

Approved. Although that mySecretKey is out of nowhere, but this is just example code.

@openjdk
Copy link

openjdk bot commented May 10, 2022

@XueleiFan 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:

8286423: Destroy password protection in the example code in KeyStore

Reviewed-by: weijun

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 53 new commits pushed to the master branch:

  • 7a2bbbb: 8286396: Address possibly lossy conversions in jdk.management.jfr
  • 9ac52b0: 8286392: Address possibly lossy conversions in jdk.jfr
  • f628966: 8286541: JFR: RecordingFile.write is missing "since 19"
  • f1554fc: 8285872: JFR: Remove finalize() methods
  • faa1aad: 8286515: JFR: Remove SimpleStringIdPool class
  • 7612bba: 8285698: Create a test to check the focus stealing of JPopupMenu from JComboBox
  • 73c5e99: 8286473: Drop --enable-preview from Record related tests
  • 63a1ec6: 8286430: make test TEST="gtest:" exits with error when it shouldn't
  • aa7ccdf: 8275201: C2: hide klass() accessor from TypeOopPtr and typeKlassPtr subclasses
  • 6586e5a: 8286459: compile error with VS2017 in continuationFreezeThaw.cpp
  • ... and 43 more: https://git.openjdk.java.net/jdk/compare/034f20fe86babb63bf178251a732ac004297cc2d...master

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 added the ready label May 10, 2022
@XueleiFan
Copy link
Member Author

XueleiFan commented May 12, 2022

/integrate

@openjdk
Copy link

openjdk bot commented May 12, 2022

Going to push as commit 1904e9d.
Since your change was applied there have been 78 commits pushed to the master branch:

  • e4439ca: 8284283: javac crashes when several transitive supertypes are missing
  • 752ad1c: 8286422: Add OIDs for RC2 and Blowfish
  • 36bdd25: 8286573: Remove the unnecessary method Attr#attribTopLevel and its usage
  • dea6e88: 8284680: sun.font.FontConfigManager.getFontConfig() leaks charset
  • 40f43c6: 8286601: Mac Aarch: Excessive warnings to be ignored for build jdk
  • be97b4b: 8278348: [macos12] javax/swing/JTree/4908142/bug4908142.java fails in macos12
  • ff17f49: 8284888: [macos] javax/swing/JInternalFrame/8146321/JInternalFrameIconTest.java failed with "NimbusLookAndFeel] : ERROR: icon and imageIcon not same."
  • 50d47de: 8286582: Build fails on macos aarch64 when using --with-zlib=bundled
  • 89392fb: 8285820: C2: LCM prioritizes locally dependent CreateEx nodes over projections after 8270090
  • 96d48f3: 8286433: Cache certificates decoded from TLS session tickets
  • ... and 68 more: https://git.openjdk.java.net/jdk/compare/034f20fe86babb63bf178251a732ac004297cc2d...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated label May 12, 2022
@openjdk openjdk bot closed this May 12, 2022
@openjdk openjdk bot removed ready rfr labels May 12, 2022
@openjdk
Copy link

openjdk bot commented May 12, 2022

@XueleiFan Pushed as commit 1904e9d.

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

@XueleiFan XueleiFan deleted the JDK-8286423 branch May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated security
2 participants