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

crypto: fix faulty logic in iv size check (backport #9032) #9687

Closed
wants to merge 1 commit into from

Conversation

sam-github
Copy link
Contributor

backport of #9032

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
Description of change

Fix a regression introduced in commit 2996b5c ("crypto: Allow GCM
ciphers to have a longer IV length") from April 2016 where a misplaced
parenthesis in a 'is ECB cipher?' check made it possible to use empty
IVs with non-ECB ciphers.

Also fix some exit bugs in test/parallel/test-crypto-authenticated.js
that were introduced in commit 4a40832 ("test: cleanup IIFE tests")
where removing the IFFEs made the test exit prematurely instead of just
skipping subtests.

PR-URL: #9032
Refs: #6376
Refs: #9024
Reviewed-By: Anna Henningsen anna@addaleax.net
Reviewed-By: Fedor Indutny fedor@indutny.com
Reviewed-By: Shigeki Ohtsu ohtsu@ohtsu.org

Fix a regression introduced in commit 2996b5c ("crypto: Allow GCM
ciphers to have a longer IV length") from April 2016 where a misplaced
parenthesis in a 'is ECB cipher?' check made it possible to use empty
IVs with non-ECB ciphers.

Also fix some exit bugs in test/parallel/test-crypto-authenticated.js
that were introduced in commit 4a40832 ("test: cleanup IIFE tests")
where removing the IFFEs made the test exit prematurely instead of just
skipping subtests.

PR-URL: nodejs#9032
Refs: nodejs#6376
Refs: nodejs#9024
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. v4.x labels Nov 18, 2016
Copy link
Member

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

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

Can I sign off on my own changes? Of course I can, LGTM.

Out of curiosity, where were the merge conflicts?

@sam-github
Copy link
Contributor Author

@bnoordhuis they were all in the tests, because of the function to block rewrite. which probably means the fn to block rewrite should have been backported.

@sam-github sam-github added the crypto Issues and PRs related to the crypto subsystem. label Nov 21, 2016
@MylesBorins
Copy link
Contributor

landed in 1b1bf4e

@MylesBorins
Copy link
Contributor

I think this is causing the CI failures we are seeing on AIX... backing it out for now

@MylesBorins MylesBorins reopened this Nov 22, 2016
@MylesBorins
Copy link
Contributor

ugh... I was mistaken, this had nothing to do with those aix failure. Running CI. If green aside from expected failures I'll re land this.

ci: https://ci.nodejs.org/job/node-test-pull-request/4935/

@MylesBorins
Copy link
Contributor

landed again in 9389572

@sam-github sam-github deleted the v4-pr/9032 branch April 17, 2017 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. crypto Issues and PRs related to the crypto subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants