PLGetCMSSignerCount
Signature utilities
Description
Returns the number of SignerInfo entries in a CMS SignedData blob, that is, how many signers the one signature carries. The walk locates the signerInfos SET and counts the SEQUENCE elements that lie completely inside it.
It returns 0 when the blob is not a SignedData, so a caller cannot distinguish that case from a genuinely signerless blob with this function alone. The read is structural only; it uses the read-only PDFlibCMSRead unit available in every edition.
Syntax
Delphi
Function PLGetCMSSignerCount(Const CMSBytes: AnsiString): Integer;Parameters
| CMSBytes | One complete binary DER ContentInfo containing SignedData, without PDF hexadecimal encoding or reservation padding |
|---|
Return values
| N > 0 | The blob carries N SignerInfo entries; valid signer indexes for PLExtractCMSSignerCertificate run from 0 to N-1 |
|---|---|
| 0 | No signer was found, or the blob is not a SignedData |
Remarks
This Pascal unit function has no separate DLL or ActiveX forwarding entry point.
See also
PLCheckCMSSignedDataStructure, GetSignatureSignerCertificateDER, PLCheckSignatureByteRange