x509: RSA key missing NULL parameters
alimoli opened this issue · comments
I have a PKCS 12 file including:
- one certificate
- one private key
What I simply do is:
- Read my p12 file
- Decode the p12 file
certFile, err := ioutil.ReadFile("authentication.p12")
privateKey, cert, err := pkcs12.Decode(certFile, "my_password")
The error returned from pkcs12 library is the following:
x509: RSA key missing NULL parameters
Is the problem related to the standard used by this library implementation?
Your certificate is not correctly encoded. Per RFC 3279 Section 2.3.1, RSA public keys are required to have a NULL parameter value. It would appear from this error message that the public key in your certificate is not compliant. You should report this as a bug with the software which produced this certificate.