-
-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parsePkcs12 generating an incorrect private key #110
Comments
I am also facing a similar issue for a .pfx file. The parsePkcs12 method is returning an invalid private key, it has an additional unexpected 20 characters at the end of the sequence. openssl pkcs12 -in filename.pfx -out cert.pem -nodesNote the PFX file contains private key and numerous certificates. Update |
Updating my above comment, for reproduction export a PFX from Windows.
Admittedly I'm in the middle of reverse engineering my understanding of all of this, but are there other utils/methods intended to be used to obtain the PEM representation of the private key? |
Just wanted to update what worked for me in the end. Essentially reconstructing the private key and converting back to PEM removed the optional additional sequence that is appended to the private key info:
|
Hi!
I'm doing a function to sign my XML's by my .pfx file, so i need to
parsePkcs12
to get private key.I've already tested with one certificate and it does successfully, but when i tested with another certificate, my XML wasn't signing anymore.
So i generated a PEM file from my PFX file to compare. When i analyzed, i realized that my PEM generated from
parsePkcs12
was different of my PEM file.Here's an example of what's coming for me:
Initials from my PEM file:
Initials from PEM generated by
parsePkcs12
:Can anyone help me please??
Thanks!
The text was updated successfully, but these errors were encountered: