Skip to content

Conversation

@valeriepeng
Copy link
Contributor

@valeriepeng valeriepeng commented Feb 18, 2022

Could someone please help review this trivial change? This is to add an error handling for the potential CKR_BUFFER_TOO_SMALL error when calling C_Sign(). Since none of the supported signature algorithms trigger this error as the default buffer size is large enough, this is more for consistency sake. No new regression test for this and thus the @noreg-hard label.

Thanks,
Valerie


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8282077: PKCS11 provider C_sign() impl should handle CKR_BUFFER_TOO_SMALL error

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 7540

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 18, 2022

👋 Welcome back valeriep! 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 Pull request is ready for review label Feb 18, 2022
@openjdk
Copy link

openjdk bot commented Feb 18, 2022

@valeriepeng 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 Feb 18, 2022
@mlbridge
Copy link

mlbridge bot commented Feb 18, 2022

Webrevs

bufP = (CK_BYTE_PTR) malloc(ckSignatureLength);
if (bufP == NULL) {
throwOutOfMemoryError(env, 0);
return NULL;
Copy link
Member

Choose a reason for hiding this comment

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

Does ckpData need to be freed here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, good catch. I will change it with a cleanup label and jump to the cleanup label as in other methods.

@openjdk
Copy link

openjdk bot commented Feb 19, 2022

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

8282077: PKCS11 provider C_sign() impl should handle CKR_BUFFER_TOO_SMALL error

Reviewed-by: mikael

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 1 new commit pushed to the master branch:

  • d3749de: 8277488: Add expiry exception for Digicert (geotrustglobalca) expiring in May 2022

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.

➡️ 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 Feb 19, 2022
@valeriepeng
Copy link
Contributor Author

Thanks for the review! Will proceed with integration once the checks completed...

@valeriepeng
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Feb 19, 2022

Going to push as commit d7f31d0.
Since your change was applied there has been 1 commit pushed to the master branch:

  • d3749de: 8277488: Add expiry exception for Digicert (geotrustglobalca) expiring in May 2022

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Feb 19, 2022

@valeriepeng Pushed as commit d7f31d0.

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

@valeriepeng valeriepeng deleted the JDK-8282077 branch February 19, 2022 07:02
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.

2 participants