GetSignatureEmbeddedCertificateDER
Digital signatures
Description
Returns one certificate embedded in a signature, DER encoded.
A certificate collection extending beyond its enclosing CMS container is rejected; padding after the outer CMS object remains accepted
Syntax
Delphi
Function TPDFlib.GetSignatureEmbeddedCertificateDER(Const InputFile, Password, FieldName: WideString; CertIndex: Integer): AnsiString;Parameters
| InputFile | The signed PDF. |
|---|---|
| Password | The password to open it, or an empty string. |
| FieldName | A signature field name as reported by the signature enumeration. |
| CertIndex | Zero-based index into the embedded set, in encoding order. |
Return values
| Certificate | The certificate bytes. |
|---|---|
| Empty string | The index is out of range, or the file or field could not be read. |
Remarks
This reads structure only and verifies nothing: it reports the certificate the signature names, not a certificate that has been checked to have produced a valid signature.
The document is read with a shared handle, so this answers while a verifier or viewer already holds the file open.
See also
GetSignatureEmbeddedCertificateCount, GetSignatureCertificateChainDER