x509-parser icon indicating copy to clipboard operation
x509-parser copied to clipboard

(Re-?)expose bytes in TbsCertificate to gain access to raw data

Open juliankrieger opened this issue 1 year ago • 2 comments

As I see it, there is currently no way to serialize the parsed X509 back into bytes. There was a pull request in the past to do that, but the bytes function no longer exists for the TbsCertificate struct.

juliankrieger avatar Jul 19 '24 11:07 juliankrieger

Hi, It seems you are mentioning two different issues: having access to the raw bytes, and wanting to serialize the certificate. Could you provide more details? There are no immediate plans to implement serialization (though this would be nice to have)

chifflier avatar Jan 21 '25 13:01 chifflier

The TbsCertificate object implements AsRef<[u8]> to get the original bytes back, but that doesn't include the certificate signature. See #217 for a request to get the raw bytes for the whole certificate.

lilyball avatar Aug 12 '25 19:08 lilyball