GetSignatureCertificateChainDER

數位簽章

描述

從簽章攜帶的憑證路徑傳回單張憑證,DER 編碼

語法

Delphi

Function TPDFlib.GetSignatureCertificateChainDER(Const InputFile, Password, FieldName: WideString; SignerIndex, ChainIndex: Integer): AnsiString;

參數

InputFileThe signed PDF.
Password開啟它的密碼;空字串表示無。
FieldName簽章列舉所回報的簽章欄位名稱。
SignerIndexZero-based signer.
ChainIndex路徑中的位置(零起算);0 為簽署者,索引越大越是其簽發者。

傳回值

Certificate該位置上的憑證。
Empty string索引超過路徑長度,或無法讀取檔案或欄位。

備註

這只讀結構、不做任何驗證:回報的是簽章指名的憑證,而不是經過檢查、確實產生有效簽章的憑證。

每次呼叫都會讀檔,想走完整條鏈的呼叫端,應先用 GetSignatureCertificateChainLength 讀一次長度並保留該數字。

文件以共用控制代碼讀取,因此驗證器或檢視器已開啟該檔案時也能得到答案

另見

GetSignatureCertificateChainLength, GetSignatureSignerCertificateDER