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

8183107: PKCS11 regression regarding checkKeySize #98

Closed
wants to merge 1 commit into from

Conversation

zzambers
Copy link
Contributor

@zzambers zzambers commented Aug 11, 2022

This is backport of JDK-8183107 [1]. When dealt with different paths on jdk8, patch extracted from jdk project applied cleanly except for copyright line P11Signature.java file, which already has newer year then what is in changest (so this change is excluded).

git apply -p3 --directory=jdk/src --reject 0001-8183107-PKCS11-regression-regarding-checkKeySize.patch
Checking patch jdk/src/share/classes/sun/security/pkcs11/P11KeyGenerator.java...
Checking patch jdk/src/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java...
Checking patch jdk/src/share/classes/sun/security/pkcs11/P11Signature.java...
error: while searching for:
/*
 * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it

error: patch failed: jdk/src/share/classes/sun/security/pkcs11/P11Signature.java:1
Hunk #2 succeeded at 370 (offset -24 lines).
Hunk #3 succeeded at 396 (offset -24 lines).
Checking patch jdk/src/share/classes/sun/security/pkcs11/wrapper/CK_MECHANISM_INFO.java...
Applied patch jdk/src/share/classes/sun/security/pkcs11/P11KeyGenerator.java cleanly.
Applied patch jdk/src/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java cleanly.
Applying patch jdk/src/share/classes/sun/security/pkcs11/P11Signature.java with 1 reject...
Rejected hunk #1.
Hunk #2 applied cleanly.
Hunk #3 applied cleanly.
Applied patch jdk/src/share/classes/sun/security/pkcs11/wrapper/CK_MECHANISM_INFO.java cleanly.

Tested locally, no regressions seen in jdk_security tests.
This backport is done with intention of later also backporting JDK-8232950 [2], which depends on this one.

[1] https://bugs.openjdk.org/browse/JDK-8183107
[2] https://bugs.openjdk.org/browse/JDK-8232950


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-8183107: PKCS11 regression regarding checkKeySize

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 98

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 11, 2022

👋 Welcome back zzambers! 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 changed the title Backport 67ca52873f088a08705baeef3e66319de1600576 8183107: PKCS11 regression regarding checkKeySize Aug 11, 2022
@openjdk
Copy link

openjdk bot commented Aug 11, 2022

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

@openjdk openjdk bot added backport rfr Pull request is ready for review labels Aug 11, 2022
@mlbridge
Copy link

mlbridge bot commented Aug 11, 2022

Webrevs

Copy link
Member

@phohensee phohensee left a comment

Choose a reason for hiding this comment

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

Lgtm.

@openjdk
Copy link

openjdk bot commented Aug 21, 2022

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

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

8183107: PKCS11 regression regarding checkKeySize

Changed key size check in PKCS11 provider to only enforce positive return values

Reviewed-by: phh, andrew

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

  • 4cc462a: 8214427: probable bug in logic of ConcurrentHashMap.addCount()
  • 645b6c8: 8288763: Pack200 extraction failure with invalid size
  • 8e2c498: 8245263: Enable TLSv1.3 by default on JDK 8u for Client roles
  • 0869fc0: 8071507: (ref) Clear phantom reference as soft and weak references do

Please see this link for an up-to-date comparison between the source branch of this pull request and 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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@phohensee, @gnu-andrew) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Aug 21, 2022
Copy link
Member

@gnu-andrew gnu-andrew left a comment

Choose a reason for hiding this comment

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

Copyright header in P11Signature.java is newer due to JDK-8258833 backport, so dropping that change is fine.
Fix looks good. Approved.

@zzambers
Copy link
Contributor Author

@gnu-andrew @phohensee Thanks for reviews
/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Aug 22, 2022
@openjdk
Copy link

openjdk bot commented Aug 22, 2022

@zzambers
Your change (at version 7cba34e) is now ready to be sponsored by a Committer.

@phohensee
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Aug 22, 2022

Going to push as commit 1b52b01.
Since your change was applied there have been 6 commits pushed to the master branch:

  • e633df1: 8175797: (ref) Reference::enqueue method should clear the reference object before enqueuing
  • 5323ef6: 8254178: Remove .hgignore
  • 4cc462a: 8214427: probable bug in logic of ConcurrentHashMap.addCount()
  • 645b6c8: 8288763: Pack200 extraction failure with invalid size
  • 8e2c498: 8245263: Enable TLSv1.3 by default on JDK 8u for Client roles
  • 0869fc0: 8071507: (ref) Clear phantom reference as soft and weak references do

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Aug 22, 2022

@phohensee @zzambers Pushed as commit 1b52b01.

💡 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
backport integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants