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

Constify OSSL_FUNC_keymgmt_validate() #13201

Conversation

romen
Copy link
Member

@romen romen commented Oct 20, 2020

The keydata argument of OSSL_FUNC_keymgmt_validate() should be read-only.

Followup from #13200 , but this is more involved because with DH keys we lie a bit and we need to cast and discard the qualifier when grabbing the inner Montgomery context.

Operating on the Montgomery context should not alter the contents of the DH key, so I believe it is appropriate to lie here and cast away the const for that struct field.

Checklist
  • documentation is added or updated
  • tests are added or updated

The keydata argument of OSSL_FUNC_keymgmt_validate() should be read-only.
@romen romen added the branch: master Merge to master branch label Oct 20, 2020
@romen romen added this to the 3.0.0 beta1 milestone Oct 20, 2020
@romen romen requested review from levitte and slontis October 20, 2020 23:09
@romen romen self-assigned this Oct 20, 2020
@romen romen mentioned this pull request Oct 20, 2020
2 tasks
@slontis slontis added the approval: done This pull request has the required number of approvals label Oct 21, 2020
@openssl-machine openssl-machine removed the approval: done This pull request has the required number of approvals label Oct 22, 2020
@openssl-machine
Copy link
Collaborator

This pull request is ready to merge

@openssl-machine openssl-machine added the approval: ready to merge The 24 hour grace period has passed, ready to merge label Oct 22, 2020
@romen
Copy link
Member Author

romen commented Oct 23, 2020

Merged with d1fb6b4

Thanks!

@romen romen closed this Oct 23, 2020
openssl-machine pushed a commit that referenced this pull request Oct 23, 2020
The keydata argument of OSSL_FUNC_keymgmt_validate() should be read-only.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from #13201)
@paulnelsontx paulnelsontx added this to Ready to merge in 3.0.0 estimator Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approval: ready to merge The 24 hour grace period has passed, ready to merge branch: master Merge to master branch
Projects
No open projects
3.0.0 estimator
Ready to merge
Development

Successfully merging this pull request may close these issues.

None yet

3 participants