Importing private key using jose/web crypto api in cloudflare workers returns an undefined CryptoKey
Hi, im trying to import a PKCS8 private key in my worker. I have attempted to do this using both the jose library (panva/jose) and my own implementation using crypto.subtle.importKey(). In both cases, I get an undefined crypto key:
I have read through the docs on cloudflare referencing Web Crypto (https://developers.cloudflare.com/workers/runtime-apis/web-crypto) and I believe this type of operation should be supported. Any help is appreciated.
Web Crypto · Cloudflare Workers docs
The Web Crypto API provides a set of low-level functions for common cryptographic tasks. The Workers Runtime implements the full surface of this API, …
1 Reply
Yeah you're right. I tested that behavior with this code:
Thanks!