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

CertificateFilePath ke certificate X.509 RSA atau ECDSA terenkode DER
ProviderNameNama Windows key storage provider, atau string kosong untuk provider software Microsoft
KeyNameNama key persisten yang dipahami provider
UseMachineKeyTrue atau nilai bukan nol untuk memakai scope key machine
AllowUITrue atau nilai bukan nol untuk mengizinkan interaksi provider

Nilai kembalian

1Certificate terbaca dan konfigurasi ditempelkan
0File, 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

Lihat juga

SetSignProcessCNGKey, SetSignProcessPFXFromFile