Skip to content

What is the right way to import a .p8 key? Getting DataError instead of success #423

Answered by panva
michaelaflores asked this question in Q&A
Discussion options

You must be logged in to vote

I believe the key is formatted correctly, as modifying it generates a different error that it must be a "PCKS8 formatted string"

That's a very rudimentary check just checking the input is a string and that the envelope is correct for a PKCS8 key.

I am unfamiliar with what's inside apple's .p8 keys, so if you'd like more help, generate a fresh private key, paste it here, and then delete it because it's no longer going to be private.

In essence, actual code to reproduce.

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
8 replies
@panva
Comment options

@michaelaflores
Comment options

@panva
Comment options

@panva
Comment options

@michaelaflores
Comment options

Answer selected by michaelaflores
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants