Native CMS signed attributes

Security and signatures

Description

The default native non-Windows OpenSSL PFX provider supports the existing commitment, policy and Adobe archival revocation signing routes with compatible RSA, RSA-PSS and ECDSA identities

Complete attribute values are included in the authenticated CMS attribute set and retained through PAdES attribute re-signing and SHA-3 RSA-PSS processing

Public signing-process routes

CommitmentSetSignProcessCommitmentType selects the CAdES commitment-type-indication value for ETSI.CAdES.detached
PolicySetSignProcessSignaturePolicy supplies the policy identifier and policy-document hash for ETSI.CAdES.detached
Archival revocationAddSignProcessRevocationCRL and AddSignProcessRevocationOCSP supply the adbe-revocationInfoArchival value for adbe.pkcs7.detached

These settings retain their documented SubFilter scope; PAdES workflows use a Document Security Store for revocation material instead of the Adobe archival signed attribute

A standard PAdES signing process rejects a nonempty Reason when commitment or policy attributes are configured; the failure is available through GetSignProcessSeedValueError and result code 13

Clearing the Reason permits retry of the same process, and the PAdES signature dictionary omits an empty Reason entry

Direct native interface

Callers already using TPDFNativeSigningIdentity in PDFlibNativeSign can supply complete pre-encoded attribute values

function TPDFNativeSigningIdentity.SignDetachedEx(
  const Data: AnsiString;
  DigestAlgorithm: Integer;
  CAdES: Boolean;
  const CommitmentTypeDER, SignaturePolicyDER, RevocationInfoDER: AnsiString;
  out Signature: AnsiString;
  out ErrorText: WideString): Boolean;

Each nonempty value contains one complete DER SEQUENCE, without the outer Attribute OID or SET wrapper; empty values omit the corresponding attribute

With CAdES = True, commitment and policy values are accepted and an archival revocation value rejects; with false, only the archival revocation value is accepted

The existing SignDetached method supplies no custom values, and values from an earlier call do not carry over to a later call

The direct native interface returns false, clears Signature and reports an English diagnostic for malformed structures or incompatible attribute profiles

Bounds and validation scope

Combined custom input values are limited to 16 MiB before decoding; the complete encoded CMS output also has a 16 MiB limit, including certificates, signatures and encoding overhead

Validation checks complete SEQUENCE envelopes, nested TLV bounds, minimal length encoding, a maximum depth of 64 and a maximum of 1000000 elements per value

The signing-process revocation collection can accept up to its documented 24 MiB storage budget; native signing can still reject material that exceeds its smaller CMS output budget

These checks do not certify every ASN.1 primitive or attribute-specific semantic rule, validate a policy document, authenticate supplied CRL/OCSP issuers, establish freshness or determine certificate revocation status

Callers using the direct interface remain responsible for the meaning of their pre-encoded values and any PDF-level profile conditions

Qualification

Focused runtime evidence covers Linux x64 Free Pascal 3.3.1 with OpenSSL 3.5.5, RSA/RSA-PSS/ECDSA signatures and SHA-256/SHA3-256; Windows Delphi 37.0 checks cover the shared Reason validation and existing signing paths

Other native hosts and identity providers require separate runtime qualification

See also

SetSignProcessSignaturePolicy, GetNativeBackendCapabilities