THotPDF.SignPDFWithSystemCertificate Method
メソッドの要約: THotPDF.SignPDFWithSystemCertificate Method
宣言
class function SignPDFWithSystemCertificate(const InputPDFPath, OutputPDFPath: string; const Selector: THPDFCertificateStoreSelector; const Options: THPDFCMSSignOptions): boolean; overload; static;
class function SignPDFWithSystemCertificate(InputStream, OutputStream: TStream; const Selector: THPDFCertificateStoreSelector; const Options: THPDFCMSSignOptions): boolean; overload; static;
ユニット
HPDFDoc
パラメータ
| 名前 | 目的 |
|---|---|
InputPDFPath | Source PDF file path |
OutputPDFPath | Destination path for the signed PDF |
Selector | Certificate-store selector used to choose the signing certificate |
Options | CMS signing options controlling the digest, signature metadata, timestamp, and related policy |
InputStream | Source stream positioned at the beginning of the PDF |
OutputStream | Destination stream that receives the signed PDF |
戻り値
Returns True when the certificate is found and the signed PDF is written successfully
使用上の注意
- 入力と出力のファイルパスまたはストリームは、異なるものにしてください
- Windows 証明書の秘密鍵は、現在のプロセスからアクセスできなければなりません
- CNG バックエンドの鍵は、RSA PKCS#1 v1.5・RSA-PSS・ECDSA に対応し、
Options.DigestAlgorithmで選択された SHA-2 / SHA-3 ダイジェストを使います - CNG の ECDSA 署名は、Windows の生座標形式から、CMS が要求する DER 形式へ変換されます
- Windows のバージョンとキー記憶プロバイダが、選択された SHA-3 アルゴリズムを実装していなければなりません
- 旧式の CryptoAPI 鍵は、SHA-256・SHA-384・SHA-512 付きの RSA PKCS#1 v1.5 に対応し、SHA-3・RSA-PSS・ECDSA を明示的に拒否します
- このヘルパーには Delphi 2009 以降が必要です
関連 API
- THotPDF
- THPDFPage
- 目次