crypto: fix generateKeyPair with encoding 'jwk'#39319
Closed
himself65 wants to merge 17 commits intonodejs:masterfrom
Closed
crypto: fix generateKeyPair with encoding 'jwk'#39319himself65 wants to merge 17 commits intonodejs:masterfrom
generateKeyPair with encoding 'jwk'#39319himself65 wants to merge 17 commits intonodejs:masterfrom
Conversation
enerateKeyPair with encoding 'jwk'generateKeyPair with encoding 'jwk'
8050957 to
68df3f7
Compare
VoltrexKeyva
reviewed
Jul 9, 2021
VoltrexKeyva
reviewed
Jul 9, 2021
Member
|
@nodejs/crypto |
panva
requested changes
Jul 11, 2021
Member
There was a problem hiding this comment.
The PR's on a good track, but lacks some of the details that are present in KeyObject.prototype.export
more concretely
- https://github.com/nodejs/node/blob/v16.4.2/lib/internal/crypto/keys.js#L240-L247
- https://github.com/nodejs/node/blob/v16.4.2/lib/internal/crypto/keys.js#L193-L213
I think there are a few ways of moving forward
- either moving these asserts to C and have export just call the appropriate C method
- having generate piggyback on a keyobject and then returning the results of calling export on those
- a combination of those, e.g. leave the passphrase part in JS but move the rest to C
panva
previously requested changes
Jul 11, 2021
Member
Author
|
I'd like to move these to the C part. because the second way must have performance regression. And the third way looks like a too complex struct. |
da40de3 to
790e4ff
Compare
Co-authored-by: Voltrex <mohammadkeyvanzade94@gmail.com>
Co-authored-by: Voltrex <mohammadkeyvanzade94@gmail.com>
Co-authored-by: Filip Skokan <panva.ip@gmail.com>
Co-authored-by: Filip Skokan <panva.ip@gmail.com>
790e4ff to
5d0b081
Compare
Member
Author
|
I've moved |
Member
Author
|
Lines 790 to 812 in 95bd164 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Member
Author
|
/cc @nodejs/crypto |
This comment has been minimized.
This comment has been minimized.
panva
approved these changes
Jul 20, 2021
Collaborator
Member
Author
|
Does anyone review this pr? I think this is a nice fix 🤔 |
Member
|
cc @nodejs/crypto |
jasnell
approved these changes
Jul 26, 2021
Member
|
Landed in 257312a |
codebytere
added a commit
to electron/electron
that referenced
this pull request
Aug 9, 2021
codebytere
added a commit
to electron/electron
that referenced
this pull request
Aug 9, 2021
codebytere
added a commit
to electron/electron
that referenced
this pull request
Aug 18, 2021
codebytere
added a commit
to electron/electron
that referenced
this pull request
Aug 18, 2021
codebytere
added a commit
to electron/electron
that referenced
this pull request
Aug 20, 2021
* chore: bump node in DEPS to v16.6.0 * chore: bump node in DEPS to v16.6.1 * crypto: fix generateKeyPair with encoding 'jwk' nodejs/node#39319 * build: add library_files to gyp variables nodejs/node#39293 * debugger: rename internal module nodejs/node#39378 * chore: fixup patch indices * deps: extract gtest source files to deps/googletest nodejs/node#39386 * crypto: fix generateKeyPair with encoding 'jwk' nodejs/node#39319 * deps: bump HdrHistogram_C to 0.11.2 nodejs/node#39462 * fixup! deps: extract gtest source files to deps/googletest * chore: bump node in DEPS to v16.6.2 * chore: update patches * deps: reflect c-ares source tree nodejs/node#39653 * deps: update c-ares to 1.17.2 nodejs/node#39724 * fix: _ReadBarrier undefined symbol error on WOA arm64 * chore: update patches * chore: bump node in DEPS to v16.7.0 * deps: upgrade to libuv 1.42.0 nodejs/node#39525 * chore: update filenames * src: remove extra semicolons outside fns * chore: fixup patch filenames * chore: sort and alphabetize disabled tests Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
BlackHole1
pushed a commit
to BlackHole1/electron
that referenced
this pull request
Aug 30, 2021
* chore: bump node in DEPS to v16.6.0 * chore: bump node in DEPS to v16.6.1 * crypto: fix generateKeyPair with encoding 'jwk' nodejs/node#39319 * build: add library_files to gyp variables nodejs/node#39293 * debugger: rename internal module nodejs/node#39378 * chore: fixup patch indices * deps: extract gtest source files to deps/googletest nodejs/node#39386 * crypto: fix generateKeyPair with encoding 'jwk' nodejs/node#39319 * deps: bump HdrHistogram_C to 0.11.2 nodejs/node#39462 * fixup! deps: extract gtest source files to deps/googletest * chore: bump node in DEPS to v16.6.2 * chore: update patches * deps: reflect c-ares source tree nodejs/node#39653 * deps: update c-ares to 1.17.2 nodejs/node#39724 * fix: _ReadBarrier undefined symbol error on WOA arm64 * chore: update patches * chore: bump node in DEPS to v16.7.0 * deps: upgrade to libuv 1.42.0 nodejs/node#39525 * chore: update filenames * src: remove extra semicolons outside fns * chore: fixup patch filenames * chore: sort and alphabetize disabled tests Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #39205