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: simplify exportKeyingMaterial #31922

Closed

Conversation

@tniessen
Copy link
Member

tniessen commented Feb 23, 2020

  1. Use bool instead of int.
  2. Don't call Buffer::HasInstance. We shouldn't silently ignore non-buffers, and ByteSource::FromBuffer will CHECK that the input is a Buffer anyway.
  3. Rename key to context, because that's what it is.
  4. Rename useContext to use_context for consistency with the rest of node_crypto.cc.
  5. Use IsUndefined instead of IsNull, because the JavaScript layer will always either pass undefined or a Buffer.
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
src/node_crypto.cc Outdated Show resolved Hide resolved
Co-Authored-By: Anna Henningsen <github@addaleax.net>
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment has been minimized.

@Trott

This comment has been minimized.

Copy link
Member

Trott commented Mar 1, 2020

Landed in 51cae73

Trott added a commit that referenced this pull request Mar 1, 2020
PR-URL: #31922
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
@Trott Trott closed this Mar 1, 2020
MylesBorins added a commit that referenced this pull request Mar 4, 2020
PR-URL: #31922
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

8 participants
You can’t perform that action at this time.