SetSignProcessCNGKeyFromFile

セキュリティと署名

説明

DER エンコードされた X.509 証明書をファイルから読み込み、名前付き NCrypt 秘密鍵を PDF 署名処理に添付する

構文

Delphi

Function TPDFlib.SetSignProcessCNGKeyFromFile(SignProcessID: Integer; Const CertificateFile, ProviderName, KeyName: WideString; UseMachineKey, AllowUI: Boolean): Integer;

ActiveX

Function PDFlib::SetSignProcessCNGKeyFromFile(SignProcessID As Long, CertificateFile As String, ProviderName As String, KeyName As String, UseMachineKey As Long, AllowUI As Long) As Long

DLL

int DLSetSignProcessCNGKeyFromFile(int InstanceID, int SignProcessID, const wchar_t* CertificateFile, const wchar_t* ProviderName, const wchar_t* KeyName, int UseMachineKey, int AllowUI);

パラメータ

CertificateFileDER エンコード済み RSA または ECDSA X.509 証明書へのパス
ProviderNameWindows キーストレージプロバイダー名です。Microsoft ソフトウェアプロバイダーを使用する場合は空文字列です
KeyNameプロバイダーが認識する永続キー名
UseMachineKeyマシンキー スコープを使用するには True またはゼロ以外
AllowUIプロバイダーとの対話を許可する場合は True またはゼロ以外

戻り値

1証明書が読み込まれ、構成が添付されました
0ファイル、プロセス ID、またはキー名が無効です

備考

DLL は ANSI パスと名前向けに DLSetSignProcessCNGKeyFromFileA もエクスポートします

証明書のバイト列は署名処理が保持し、秘密鍵はプロバイダー内に残る

関連項目

SetSignProcessCNGKey, SetSignProcessPFXFromFile