Expand description
CMS (PKCS#7 / RFC 5652) SignedData envelope construction and verification.
Produces standard CMS SignedData verifiable by OpenSSL, Thunderbird/RNP, Adobe, and other standards-compliant tools. Provides semantic types plus real DER encoding for SHA-256 digests and algorithm identifiers.
See TODO.roadmap/32-cert-delegation-cms-xmldsig.md for full spec.
Structs§
- Algorithm
Identifier - Algorithm identifier (OID + optional parameters).
- Attribute
- CMS attribute (OID + values).
- CmsVerification
Result - Result of CMS verification.
- Encap
Content Info - Encapsulated content (the payload).
- Signed
Data - SignedData structure as defined in RFC 5652 §5.1.
- Signed
Data Builder - Builder for
SignedData. - Signer
Info - Signer information per RFC 5652 §5.3.
- Signer
Verification - Per-signer verification result.
- _ReExport
Encap Content Info - Re-export EncapContentInfo so consumers can build it without reaching into the signed_data module directly. Encapsulated content (the payload).
Enums§
- CmsError
- Errors during CMS envelope construction.
- DerError
- Errors during DER encoding.
- Signer
Identifier - Signer identifier variants.
Functions§
- build_
detached_ signature - Convenience: build a minimal detached CMS signature with one signer.
- encode_
signed_ data_ der - Encode a
SignedDatainto DER bytes. - resolve_
signer_ certificate - Resolve the signing certificate for
signerby walking thecertificatesarray. - verify_
signed_ data - Verify a SignedData structure. The
verifiercallback receives(signer_index, public_key_der, signed_data_to_verify, signature_bytes)and returnsOk(())if valid.