Description
Extract the payload from a CAdES `.p7m` signed envelope (PKCS#7/CMS SignedData) — the format signed electronic invoices travel in to and from the Italian SdI and arrive via PEC. Minimal, defensive ASN.1 DER parser with zero external dependencies. Accepts base64 (as produced by PEC/IMAP attachment nodes), recognises re-encoded envelopes, and passes plain XML through with wasSigned:false. It does NOT verify the signature (legal verification belongs to the preservation system): it makes the content READABLE so parsers, databases and AI nodes downstream can automate it.
