How can I import an app cert using crypto.sutble.importKey
?
#144358
Replies: 1 comment
-
I figured it out, It turns out the above code will work but you need to convert the cert that github generates into pkcs8 format first. openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in ~/Downloads/example.2024-11-12.private-key.pem -out ~/Downloads/pkcs8.key |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Question
Body
I have created a github app and I created a cert and downloaded it but am unable to import it.
I am using Deno but a nodejs example would be fine.
Here is what I have below:
The error I am getting from the
importKey
api is:Copilot seems to think that this means that the cert is actually
pkcs1
but needs to be converted intopkcs8
Though the code it gives me to do the conversion doesn't work at all. Any help would be appreciated!
Beta Was this translation helpful? Give feedback.
All reactions