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

8318096: Introduce AsymmetricKey interface with a getParams method #16222

Closed
wants to merge 6 commits into from

Conversation

wangweij
Copy link
Contributor

@wangweij wangweij commented Oct 17, 2023

Create a parent interface AsymmetricKey for PublicKey and PrivateKey and add a getParams method there. This makes it available to all current and future public and private keys.

No test. Might add one.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (3 reviews required, with at least 1 Reviewer, 2 Authors)
  • Change requires CSR request JDK-8318108 to be approved

Issues

  • JDK-8318096: Introduce AsymmetricKey interface with a getParams method (Enhancement - P3)
  • JDK-8318108: Introduce AsymmetricKey interface with a getParams method (CSR)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 16222

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 17, 2023

👋 Welcome back weijun! 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 csr Pull request needs approved CSR before integration rfr Pull request is ready for review labels Oct 17, 2023
@openjdk
Copy link

openjdk bot commented Oct 17, 2023

@wangweij 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 security-dev@openjdk.org label Oct 17, 2023
@mlbridge
Copy link

mlbridge bot commented Oct 17, 2023

Webrevs

@dmlloyd
Copy link
Contributor

dmlloyd commented Oct 18, 2023

Would getParameterSpec be a better/more descriptive name, given that the thing it returns is an AlgorithmParameterSpec?

(Disclosure: Our security library (WildFly Elytron) has a getParameterSpec on every one of its key implementation classes... it would be serendipitous if it would retroactively fit in with this change!)

@wangweij
Copy link
Contributor Author

Would getParameterSpec be a better/more descriptive name, given that the thing it returns is an AlgorithmParameterSpec?

(Disclosure: Our security library (WildFly Elytron) has a getParameterSpec on every one of its key implementation classes... it would be serendipitous if it would retroactively fit in with this change!)

We already have the getParams method everywhere and we are actually reusing that name and make all these methods a mesh (not a mess). If we create another method, there will be 2 ways to do the same thing and users will be confused. And we cannot simply deprecate the old one since that will be even more disruptive.

@dmlloyd
Copy link
Contributor

dmlloyd commented Oct 18, 2023

Would getParameterSpec be a better/more descriptive name, given that the thing it returns is an AlgorithmParameterSpec?

(Disclosure: Our security library (WildFly Elytron) has a getParameterSpec on every one of its key implementation classes... it would be serendipitous if it would retroactively fit in with this change!)

We already have the getParams method everywhere and we are actually reusing that name and make all these methods a mesh (not a mess). If we create another method, there will be 2 ways to do the same thing and users will be confused. And we cannot simply deprecate the old one since that will be even more disruptive.

Okay, I didn't know about the old name, that makes sense.

@wangweij wangweij changed the title 8318096: Add getParams method in PublicKey and PrivateKey 8318096: Introduce AsymmetricKey interface with a getParams method Oct 25, 2023
@jddarcy
Copy link
Member

jddarcy commented Oct 26, 2023

/reviewers 2

@openjdk
Copy link

openjdk bot commented Oct 26, 2023

@jddarcy
The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 2 (with at least 1 Reviewer, 1 Author).

@openjdk openjdk bot removed the csr Pull request needs approved CSR before integration label Oct 26, 2023
@openjdk
Copy link

openjdk bot commented Oct 26, 2023

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

8318096: Introduce AsymmetricKey interface with a getParams method

Reviewed-by: darcy, mullan, 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 204 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 added the ready Pull request is ready to be integrated label Oct 26, 2023
@wangweij
Copy link
Contributor Author

/reviewers 3

@openjdk
Copy link

openjdk bot commented Oct 26, 2023

@wangweij
The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 3 (with at least 1 Reviewer, 2 Authors).

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Oct 26, 2023
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.

I agree with the changes

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 26, 2023
@wangweij
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Oct 26, 2023

Going to push as commit 9123961.
Since your change was applied there have been 204 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 26, 2023
@openjdk openjdk bot closed this Oct 26, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 26, 2023
@openjdk
Copy link

openjdk bot commented Oct 26, 2023

@wangweij Pushed as commit 9123961.

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

@wangweij wangweij deleted the 8318096 branch October 26, 2023 23:01
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.

5 participants