Expand description
RFC 5280 X.509 certificate path validation — pure Rust, no_std.
Implements certificate path building and validation per RFC 5280 §6.
§Architecture
Cryptographic signature verification is pluggable via SignatureVerifier.
The default feature set (rustcrypto) wires in RustCrypto backends for
RSA-PKCS1v15-SHA-256 (rsa feature) and ECDSA-P-256-SHA-256 (p256 feature).
P-384 and Ed25519 are planned for a future release.
For FIPS-validated crypto, implement SignatureVerifier against
wolfcrypt-rustcrypto and disable the rustcrypto feature.
Revocation checking is handled by pkix-revocation. This crate never
touches the network — use pkix_chain::verify_chain for the combined API.
§Limitations
The following are not implemented in v0.2:
- RFC 4518 full Unicode NFKC DN normalization — only ASCII whitespace collapsing is applied; BMPString/UniversalString/TeletexString in DN attributes are compared after UTF-8 transcoding without NFKC.
- Online revocation — revocation is handled by
pkix-revocation(CRL/OCSP); this crate is network-free by design. - Path building — converting an unordered bag of certificates into a
validated chain is handled by
pkix-path-builder.
Structs§
- Default
Verifier p256orrsa - A
SignatureVerifierthat dispatches to availableRustCryptobackends by OID. - DerError
- Opaque wrapper around an underlying ASN.1 / DER error.
- Ecdsa
P256 Verifier p256 - ECDSA P-256 with SHA-256 signature verifier.
- Name
Constraints - Re-exported for use with
TrustAnchor::name_constraints. NameConstraints extension as defined in RFC 5280 Section 4.2.1.10. - RsaPkcs1v15
Sha256 Verifier rsa - RSA with PKCS#1 v1.5 padding and SHA-256 signature verifier.
- Trust
Anchor - A trust anchor used to terminate path validation.
- Validated
Path - The result of a successful certificate path validation.
- Validation
Policy - Policy parameters controlling path validation.
Enums§
- Error
- Errors returned by path validation.
Traits§
- Profile
- A PKI regime profile that bundles identity, citation, and a validation policy.
- Signature
Verifier - Pluggable signature verification backend.
Functions§
- cert_
is_ ca - Returns
Ok(true)ifcertis a CA certificate per itsBasicConstraintsextension (RFC 5280 §4.2.1.9),Ok(false)if the extension is absent orcA = FALSE, andErr(DerError)if the extension is present but cannot be DER-decoded. - names_
match - Compare two distinguished names per RFC 4518 string prep rules.
- validate_
path - Validate a certificate chain from subject to a trust anchor.
- validate_
path_ with_ profile - Validate a certificate chain using a
Profileto produce the policy.
Type Aliases§
- Result
- Result alias for this crate.