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: migrate Certificate to internal/errors #15756

Closed
wants to merge 1 commit into from

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Oct 3, 2017

Move argument type checking to js, use internal/errors
Improve docs and tests

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

crypto

Move argument type checking to js, use internal/errors
@jasnell jasnell added errors Issues and PRs related to JavaScript errors originated in Node.js core. semver-major PRs that contain breaking changes and should be released in the next major version. labels Oct 3, 2017
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. crypto Issues and PRs related to the crypto subsystem. labels Oct 3, 2017
Copy link
Member

@joyeecheung joyeecheung left a comment

Choose a reason for hiding this comment

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

nit: would be better if the doc changes are in a separate commit

@jasnell
Copy link
Member Author

jasnell commented Oct 8, 2017

Ok. I can separate those out

@joyeecheung
Copy link
Member

@jasnell jasnell requested a review from a team October 13, 2017 21:21
@jasnell
Copy link
Member Author

jasnell commented Oct 13, 2017

@nodejs/tsc ... ping? Please review?

@addaleax
Copy link
Member

@jasnell Feel free to land this now, if you don’t like to go by @joyeecheung’s suggestion, it would be nice if you could backport the doc changes manually so they aren’t lost just because they are in a semver-major PR :)

function verifySpkac(spkac) {
if (!isArrayBufferView(spkac)) {
throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'spkac',
['Buffer', 'TypedArray', 'DataView']);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why only spkac doesn't have string in the error message?

Copy link
Member Author

Choose a reason for hiding this comment

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

don't know. This was the way it was already. We can add string as an option in a separate follow on commit

@jasnell
Copy link
Member Author

jasnell commented Oct 15, 2017

I'll do a backport PR for the docs later.

jasnell added a commit that referenced this pull request Oct 15, 2017
Move argument type checking to js, use internal/errors

PR-URL: #15756
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@jasnell
Copy link
Member Author

jasnell commented Oct 15, 2017

Landed in 3ddc88b

@jasnell jasnell closed this Oct 15, 2017
addaleax pushed a commit to ayojs/ayo that referenced this pull request Oct 18, 2017
Move argument type checking to js, use internal/errors

PR-URL: nodejs/node#15756
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
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. errors Issues and PRs related to JavaScript errors originated in Node.js core. semver-major PRs that contain breaking changes and should be released in the next major version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants