cert-printer
A Rust CLI tool that parses and prints X.509 certificate information in both human-readable and PEM formats.
Usage
The tool accepts certificates in DER or PEM format.
Library Usage
The x509_certificate_printer crate exposes a PrettyPrinter trait:
use PrettyPrinter;
use *;
let der_cert = read?;
let = parse_x509_certificate?;
println!;
println!;
Trait Methods
pretty_print(&self) -> String- Returns human-readable certificate detailsto_pem(&self) -> String- Returns PEM-encoded certificate
Credits
This code is verbatim taken from x509-parser/examples/print-cert.rs and AI-refactored into a library with a CLI interface.