Using X509Certificate
Is there any way to parse and verify certificates in workers? It seems like it's unsupported in
node_compat
, but my only other solution is to host a NodeJS server, only for parsing certificate signed JWT tokens.4 Replies
Can you not use Webcryto importKey for this?
https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey
When I try to import the certificate with
importKey
it gives me an asn1 error about having the wrong tag
My current NodeJS solution is
Ah sorry not sure then
Did more research, found an x509 package that works on Node, but gives an incorrect publicKey on the workers runtime... guess this means more research
Looks like a bug in SubtleCrypto?
importKey
in the worker runtime is returning
meanwhile NodeJS with the exact same code returns
Using: