Expand description
XMLDSig verification for Microsec e-Szignó dossiers.
§What this phase can and cannot say
This is phase 3 of the verify milestone. It validates the XMLDSig core
(canonicalization, reference digests, the signature value), enforces the
e-dossier reference-scope rules, binds the signing certificate through the
signed XAdES SigningCertificate property, verifies RFC 3161 signature
timestamps, validates the certification path against a caller-supplied
trust store and ETSI TS 119 612 trusted lists at a validation time a
verified timestamp may move, and checks revocation offline from the
signature’s own xades:RevocationValues and a caller-supplied store.
With revocation implemented, valid is reachable — and only reachable when
every emitted check passed. A caller that sees indeterminate has learned
that nothing failed, not that anything is trustworthy.
§Structure
The crate owns the whole pipeline: reference resolution, the transform and algorithm allowlists, canonicalization, and path validation. Nothing is delegated to a general-purpose XMLDSig library, because those libraries do not know the e-dossier placement rules and would own exactly the decisions this project has stricter rules about.
All I/O arrives through the injected Clock, TrustSource, and
RevocationSource traits. The crate itself opens no file and no socket.
Re-exports§
pub use c14n::C14nAlgorithm;pub use c14n::C14nBackend;pub use c14n::C14nError;pub use c14n::NodeSet;pub use c14n::RoxmltreeC14n;pub use codes::Check;pub use codes::CheckCode;pub use codes::CheckStatus;pub use codes::Verdict;pub use embedded::EmbeddedRevocationValues;pub use embedded::embedded_certificates;pub use embedded::embedded_revocation_values;pub use policy::MAX_REVOCATION_ITEM_BYTES;pub use policy::PolicyReport;pub use policy::TrustListSnapshot;pub use policy::VerifyLimits;pub use report::CoverageState;pub use report::CoverageVia;pub use report::CoveringSignature;pub use report::DocumentCoverage;pub use report::SignatureReport;pub use report::SignatureRole;pub use report::SignatureScope;pub use report::SigningCertificateBinding;pub use report::ValidationTimeSource;pub use report::VerifyReport;pub use report::XadesReport;pub use revocation::CertificateRevocation;pub use revocation::RevocationOrigin;pub use revocation::RevocationStatus;pub use trust::Clock;pub use trust::FixedClock;pub use trust::MemoryRevocationStore;pub use trust::MemoryTrustStore;pub use trust::NoRevocation;pub use trust::NoTrust;pub use trust::RevocationPolicy;pub use trust::RevocationSource;pub use trust::ServiceIdentity;pub use trust::SystemClock;pub use trust::TrustAnchor;pub use trust::TrustAnchorOrigin;pub use trust::TrustServiceIdentity;pub use trust::TrustSource;pub use trust::format_rfc3339;pub use trust::parse_rfc3339;pub use trustlist::ServiceRecord;pub use trustlist::ServiceType;pub use trustlist::TrustList;pub use tsa::TimestampKind;pub use tsa::TimestampReport;
Modules§
- c14n
- XML canonicalization behind a swappable backend trait.
- certs
- X.509 parsing, public-key signature verification, and RFC 5280 path validation.
- codes
- Stable check codes, statuses, and verdicts.
- countersign
- Countersignature detection, the binding check, and the role a signature is reported with.
- coverage
- What a signature’s references cover.
- dsig
- The XMLDSig core, as the shared context and the small XML helpers every stage of it is built from.
- embedded
- Whole-document reads of the certificates and revocation artefacts a dossier carries.
- estimestamp
- Container timestamps: the e-dossier
es:TimeStampelement. - policy
- The pinned algorithm and transform policy, and the verification limits.
- references
- One
ds:Reference: parsing, same-document resolution on the validated ID space, the transform allowlist and its application, and digest recomputation. - report
- The serde types behind
verify --json. - revocation
- Stage E: revocation, offline first.
- scope
- Where a
ds:Signaturesits, and which elements the e-dossier format then mandates that it cover. - signature
- The per-signature driver:
ds:SignedInfoparsing, the signature-level algorithm policy, canonicalization ofds:SignedInfo, and verification ofds:SignatureValueagainst the certificate that actually signed it. - trust
- Injected I/O: the clock, the trust source, and the revocation source.
- trustlist
- ETSI TS 119 612 trusted lists.
- tsa
- Stage F: RFC 3161 timestamp tokens.
- xades
- Stage C: the XAdES qualifying properties.
Structs§
- Verify
Options - How one dossier is verified.
Functions§
- verify
- Verify every
ds:Signaturein a dossier.