-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
proposal: crypto/x509: implement TextMarshaler for *Certificate #33888
Comments
I am a fan of the |
A text dump is not a marshalled encoding. That would imply we needed to parse it during Unmarshal as well. A helper in x509 might be fine but not a TextMarshal method but it would require x509 taking on the OID -> Name mapping. This really seems like something to put in an external package. |
Adding to proposal minutes but seems headed for likely decline. |
I was thinking maybe something like |
Based on the discussion above, this is a likely decline. @kevinburkemeter, it would probably help to start with your own package and see how useful it turns out to be. |
No change in consensus, so declined. |
Working with x509 certificates is currently a pain because most of the formats that certificates are stored in hide the actual data that you need to understand what the certificate is. Certificates encode even the most basic information in PEM or ASN.1 format, to base64 decode this you have to strip the header and footer and even then you get a mix of text (the host names, organization names, common names) and raw bytes (the actual certs).
It would be nice if there was a format for marshaling certificates to plain text (and potentially reading them back from that format). The basic format I have in mind is something like what you get from
openssl x509 -text
. We could discuss what format would be the most appropriate or maybe just copy that format.The text was updated successfully, but these errors were encountered: