x509-info
Owned X.509 certificate data for applications, bindings and reports. Read DER and PEM certificates, then emit text, JSON, JSON Lines, YAML, TOML, CBOR, MessagePack, DER or PEM output. Parse into names, algorithms, public-key components and decoded extensions, including FIDO identifiers. Unknown fields retain their original encodings and diagnostics.
The library performs no I/O, reads no clock, and verifies no signatures, trust chains or attestation policy. Callers own all inputs, results and OID overrides.
Why this crate?
| Library | Focus |
|---|---|
x509-parser |
Borrowed certificate types and low-level parsing; used internally |
x509-cert |
RustCrypto ASN.1 structures and certificate construction; nested decoders reused here |
x509-certificate-printer |
Formatted certificate text |
This crate: x509-info |
Owned application data, field diagnostics, versioned reports and generated schemas |
See the ecosystem comparison for alternatives and dependency choices.
Library
Requires Rust 1.85+.
[]
= { = "0.1", = ["serde"] }
= "1"
Inputs are limited to one certificate and 1 MiB by default; use ParseOptions to
change the byte limit. The full result retains original bytes; summary() creates
an owned view without large raw buffers. Public-key and name details() accessors
provide additional decoded fields.
| Feature | Adds |
|---|---|
| Default | Parsing and owned Rust results |
serde |
Serialization of library results |
schema |
Schemars schemas for the library's Serde model |
cli |
Binary, format serializers and CLI report schemas |
Use cargo doc --all-features --no-deps --open for API documentation and
cargo run --example binding_dto for a binding example.
CLI
Formats: text, JSON, JSON Lines, YAML, TOML, CBOR, MessagePack, DER and PEM.
Omit the input path or use - for stdin. Textual reports use Base64 for raw blocks,
hex for numerical components and fingerprints, and UUID strings for AAGUIDs.
CBOR and MessagePack use native byte strings. DER/PEM conversion preserves the DER.
CLI usage · Report schemas and format contracts
Layout and development
lib/ Parsing and models; names/, keys/ and extensions/ submodules
bin/ CLI, report formatting and schema generation
examples/ Binding DTO example
tests/ Integration tests and synthetic certificate fixtures
Licensed under Apache-2.0.