SetSignProcessCNGKeyFromFile
Keamanan dan tanda tangan
Deskripsi
Memuat certificate X.509 terenkode DER dari file dan menempelkan private key NCrypt bernama ke proses penandatanganan PDF
Sintaks
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);
Parameter
| CertificateFile | Path ke certificate X.509 RSA atau ECDSA terenkode DER |
|---|---|
| ProviderName | Nama Windows key storage provider, atau string kosong untuk provider software Microsoft |
| KeyName | Nama key persisten yang dipahami provider |
| UseMachineKey | True atau nilai bukan nol untuk memakai scope key machine |
| AllowUI | True atau nilai bukan nol untuk mengizinkan interaksi provider |
Nilai kembalian
| 1 | Certificate terbaca dan konfigurasi ditempelkan |
|---|---|
| 0 | File, process id, atau nama key tidak valid |
Catatan
DLL juga mengekspor DLSetSignProcessCNGKeyFromFileA untuk path dan nama ANSI Byte certificate dipertahankan oleh sign process, sedangkan private key tetap di dalam providernya