Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
assert,crypto: make KeyObject and CryptoKey testable for equality#50897
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
0965ede to 5327861Compare5327861 to ca444dbCompare This comment was marked as outdated.
This comment was marked as outdated.
ca444db to b008047Compare This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
panva commented Nov 25, 2023
cc @nodejs/crypto |
nodejs-github-bot commented Nov 25, 2023
panva commented Dec 17, 2023
cc @nodejs/crypto |
aduh95 left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the use case makes sense, and I'm not able to able to suggest a better implementation, so let's roll with this.
| consta=crypto.createSecretKey(Buffer.alloc(1,0)); | ||
| constb=crypto.createSecretKey(Buffer.alloc(1,1)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I find Buffer.from easier to understand (I had to go read the docs to get what the second argument of Buffer.alloc was for)
| consta=crypto.createSecretKey(Buffer.alloc(1,0)); | |
| constb=crypto.createSecretKey(Buffer.alloc(1,1)); | |
| consta=crypto.createSecretKey(Buffer.from([0])); | |
| constb=crypto.createSecretKey(Buffer.from([1])); |
nodejs-github-bot commented Dec 17, 2023
Commit Queue failed- Loading data for nodejs/node/pull/50897 ✔ Done loading data for nodejs/node/pull/50897 ----------------------------------- PR info ------------------------------------ Title assert,crypto: make KeyObject and CryptoKey testable for equality (#50897) Author Filip Skokan (@panva) Branch panva:crypto-objects-equal -> nodejs:main Labels crypto, assert, util, needs-ci, review wanted, webcrypto, commit-queue-rebase Commits 2 - crypto: update CryptoKey symbol properties - assert,crypto: make KeyObject and CryptoKey testable for equality Committers 1 - Filip Skokan PR-URL: https://github.com/nodejs/node/pull/50897 Reviewed-By: Antoine du Hamel ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/50897 Reviewed-By: Antoine du Hamel -------------------------------------------------------------------------------- ℹ This PR was created on Fri, 24 Nov 2023 16:50:43 GMT ✔ Approvals: 1 ✔ - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/50897#pullrequestreview-1785408839 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2023-11-25T19:19:00Z: https://ci.nodejs.org/job/node-test-pull-request/55920/ ⚠ Commits were pushed after the last Full PR CI run: ⚠ - crypto: update CryptoKey symbol properties ⚠ - assert,crypto: make KeyObject and CryptoKey testable for equality - Querying data for job/node-test-pull-request/55920/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/7237974363 |
nodejs-github-bot commented Dec 17, 2023
nodejs-github-bot commented Dec 17, 2023
nodejs-github-bot commented Dec 17, 2023
Landed in 154afbe...0afe731 |
PR-URL: #50897 Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: #50897 Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: #50897 Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: #50897 Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: #50897 Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: #50897 Reviewed-By: Antoine du Hamel <[email protected]>
chharvey commented Jun 9, 2024 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Not sure if this is the right place to comment but I noticed a regression from v18 to v20, and this PR seems vaguely related. consta=['a'];assert.deepStrictEqual(newSet([a,['b']]),newSet([a,['b']]));
The bug seems to occur only when comparing |
aduh95 commented Jun 9, 2024
@chharvey can you open a new issue to track this please? (FWIW I'm able to reproduce) |
chharvey commented Jun 10, 2024
@aduh95 thanks for your reply. I think I found the culprit and left a comment: #46593 (comment) |
panva commented Jun 11, 2024
@chharvey can you open a new issue to track this please? |
This makes CryptoKey and KeyObject instances testable using
assert.deepStrictEqualandassert.deepEqual.The state before was that