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
base: master
from

Conversation

Projects
None yet
6 participants
@jasnell
Member

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

crypto: migrate Certificate to internal/errors
Move argument type checking to js, use internal/errors
@lpinca

lpinca approved these changes Oct 5, 2017

@joyeecheung

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

@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Oct 8, 2017

Member

Ok. I can separate those out

Member

jasnell commented Oct 8, 2017

Ok. I can separate those out

@joyeecheung

This comment has been minimized.

Show comment
Hide comment

@jasnell jasnell requested a review from nodejs/tsc Oct 13, 2017

@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Oct 13, 2017

Member

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

Member

jasnell commented Oct 13, 2017

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

@addaleax

This comment has been minimized.

Show comment
Hide comment
@addaleax

addaleax Oct 14, 2017

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 :)

Member

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?

@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

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

jasnell Oct 15, 2017

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

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Oct 15, 2017

Member

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

Member

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

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

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Oct 15, 2017

Member

Landed in 3ddc88b

Member

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

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