Skip to content

crypto: fix WebCryptoAPI WebIDL harness - #45590

Closed
panva wants to merge 13 commits into
nodejs:mainfrom
panva:fix-webcrypto-idlharness
Closed

crypto: fix WebCryptoAPI WebIDL harness#45590
panva wants to merge 13 commits into
nodejs:mainfrom
panva:fix-webcrypto-idlharness

Conversation

@panva

Copy link
Copy Markdown
Member

Individual commits tell the journey. This fixes the remaining WebCryptoAPI idlharness WPTs. Only landing where #42083 is.

@panvapanva added crypto Issues and PRs related to the crypto subsystem. webcrypto dont-land-on-v16.x commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Nov 22, 2022
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto

@nodejs-github-botnodejs-github-bot added needs-ci PRs that need a full CI run. process Issues and PRs related to the process subsystem. labels Nov 22, 2022
@panva

panva commented Nov 22, 2022

Copy link
Copy Markdown
MemberAuthor

@jasnell@addaleax@tniessen asking for your review wrt. the JSTransferrable removal from CryptoKey. CryptoKey prototype must be Function.prototype.

624ecb0 (#45590)

I've had a look at existing tests for KeyObject that deal with transferring the objects and made sure to add CryptoKey instances to those tests, they still pass, but I really don't pretend to fully understand the consequences of this change.

@panva

Copy link
Copy Markdown
MemberAuthor

@aduh95 asking for your review wrt. the global getter. It must not be callable unless this is globalThis (or undefined which is a special case for Window-like (globalThis) getters).

321fab6 (#45590)

Comment threadlib/internal/crypto/keys.js Outdated
Comment threadlib/internal/process/pre_execution.js Outdated
Comment threadlib/internal/process/pre_execution.js Outdated
Comment threadlib/internal/process/pre_execution.js Outdated
@panvapanva added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 24, 2022
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 24, 2022
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@panvapanva added the review wanted PRs that need reviews. label Nov 26, 2022
@tniessen

Copy link
Copy Markdown
Member

cc @jasnell because of the JSTransferrable change.

// here similar to other things like URL. A chromium provided CryptoKey
// will not be recognized as a Node.js CryptoKey, and vice versa. It
// would be fantastic if we could find a way of making those interop.
class CryptoKey extends JSTransferable {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a breaking change. While WebCrypto doesn't define CryptoKey as transferable, we've implemented it this way from the beginning. Especially since we've already marked Web Crypto as stable we should preserve this.

@panvapanvaNov 27, 2022

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Would you take a closer look please? The change does not seem to have impacted CryptoKey's transferability. I added tests for it too.

#45590 (comment)

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

@panva

Copy link
Copy Markdown
MemberAuthor

I'll slice this up into smaller bits, #45659 messed up the idlharness tests even more anyway.

@panvapanva closed this Dec 10, 2022
@panva
panva deleted the fix-webcrypto-idlharness branch January 2, 2023 22:07
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commit-queue-squashAdd this label to instruct the Commit Queue to squash all the PR commits into the first one.cryptoIssues and PRs related to the crypto subsystem.needs-ciPRs that need a full CI run.processIssues and PRs related to the process subsystem.review wantedPRs that need reviews.webcrypto

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@panva@nodejs-github-bot@tniessen@jasnell@aduh95