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
@lpinca
lpinca approved these changes Oct 5, 2017
Copy link
Member

@joyeecheung joyeecheung left a comment

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

@jasnell
Copy link
Member Author

@jasnell jasnell commented Oct 8, 2017

Ok. I can separate those out

@jasnell jasnell requested a review from nodejs/tsc Oct 13, 2017
@jasnell
Copy link
Member Author

@jasnell jasnell commented Oct 13, 2017

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

@addaleax
Copy link
Member

@addaleax addaleax commented Oct 14, 2017

@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']);

This comment has been minimized.

@thefourtheye

thefourtheye Oct 15, 2017
Contributor

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

This comment has been minimized.

@jasnell

jasnell Oct 15, 2017
Author Member

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 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 jasnell commented Oct 15, 2017

Landed in 3ddc88b

@jasnell jasnell closed this Oct 15, 2017
addaleax added 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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

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