-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
X509 can't load " TRUSTED CERTIFICATE "s #5242
Comments
The OpenSSL "Trusted Certificate" encoding is a non-standard feature OpenSSL added that we don't have plans to support. We'd be happy to take a PR that explains that we don't support it and how to convert it into a normal X509 certificate (I believe |
Actually the certificate above loads just fine in |
A Taken from openssl:
Just removing the string might cause unintended behaviour on other software using this same certificate, you might want to run the |
Closing for now, but we'll happily take a doc PR to improve explanation of this if anyone is interested. |
Environment:
I have an issue loading certificates wrapped in
-----BEGIN TRUSTED CERTIFICATE-----
and-----END TRUSTED CERTIFICATE-----
withx509.load_pem_x509_certificate()
.When I do so it returns the following error:
It works as expected after replacing:
-----BEGIN TRUSTED CERTIFICATE-----
with-----BEGIN CERTIFICATE-----
and-----END TRUSTED CERTIFICATE-----
with-----END CERTIFICATE-----
Example of a random CA that I was trying to load (found in the Linux trusted rootCAs bundle):
OpenSSL indeed opens them without modification:
It's ok not to support it I guess, but I suggest that the FAQ over at https://cryptography.io/en/latest/faq/#why-can-t-i-import-my-pem-file be modified accordingly to give a hint to the user.
The text was updated successfully, but these errors were encountered: