ApplyPAdESLongTermArchiveValidationA

數位簽章

需要 Enterprise 版本。在 Delphi、C++Builder 與 Lazarus 程式碼中,請以 TPDFlibEnterprise(PDFlibEnterprise 單元)建立程式庫;Enterprise DLL 與 ActiveX 組建原樣提供。其他版本保留此方法,方法會傳回 0、空字串或 False,並將 LastErrorCode 設為 900(PDFLIB_ERROR_ENTERPRISE_REQUIRED)

描述

結尾的 A 表示 ANSI(char)DLL 進入點;ActiveX/COM 介面只提供 Unicode 形式。行為與 ApplyPAdESLongTermArchiveValidation 完全相同,字串參數依目前 SetAnsiMode 的字碼頁解讀

一次呼叫把已簽署的 PDF 升級為 PAdES B-LTA:先執行 B-LT 驗證材料升級,再附加 /SubFilter /ETSI.RFC3161 的 /DocTimeStamp 簽章,其權杖從 SetTimeStampServer 設定的 TSA 取得,結果寫入檔案

語法

Delphi

Function DLApplyPAdESLongTermArchiveValidationA(InstanceID: Integer; InputFile: PAnsiChar; Password: PAnsiChar; OutputFile: PAnsiChar; FieldName: PAnsiChar; Options: Integer): Integer;

DLL

int DLApplyPAdESLongTermArchiveValidationA(int InstanceID, const char* InputFile, const char* Password, const char* OutputFile, const char* FieldName, int Options);

參數

InputFile已簽署的 PDF
Password開啟用的密碼,可為空字串
OutputFile要寫出的 B-LTA PDF
FieldName待處理的簽章欄位;留空則把每個簽章處理進同一個修訂
OptionsPADES_LTV_* 位元遮罩,按 ApplyPAdESLongTermValidation 的文件說明;0 選 PADES_LTV_DEFAULT

傳回值

1升級成功
2輸入檔案無法讀取
3B-LT 階段失敗;GetPAdESLTVError 傳回原因
4未設定 TSA 或 TSA 拒絕請求;GetTimeStampError 保存 TSA 細節
10輸出無法寫入
11文件時間戳記無法套用

另請參閱

ApplyPAdESLongTermValidation, SetTimeStampServer, SetPAdESSignatureTimeStampDigestAlgorithm