Skip to content

fix(crypto): support structuredClone for CryptoKey#32674

Open
bartlomieju wants to merge 1 commit intodenoland:mainfrom
bartlomieju:fix/cryptokey-structured-clone
Open

fix(crypto): support structuredClone for CryptoKey#32674
bartlomieju wants to merge 1 commit intodenoland:mainfrom
bartlomieju:fix/cryptokey-structured-clone

Conversation

@bartlomieju
Copy link
Member

Summary

Closes #12734

Test plan

  • Tested structuredClone() with extractable and non-extractable AES-CBC keys
  • Verified cloned keys can encrypt/decrypt (cross-key encrypt with clone, decrypt with original)
  • Tested RSA and HMAC key cloning
  • Tested postMessage() to a Web Worker with a non-extractable key
  • Some WPT tests should now pass — will enable in a follow-up

🤖 Generated with Claude Code

Uses the cloneable resource registry from denoland#32672 to enable structured
cloning of CryptoKey objects. This allows CryptoKeys (including
non-extractable ones) to be passed to Workers via postMessage and
cloned with structuredClone().

Closes denoland#12734

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot use structuredClone on CryptoKey

2 participants