SetSignProcessCNGKeyFromFile

Bezpečnosť a podpisy

Opis

Načíta certifikát X.509 v kódovaní DER zo súboru a pripojí pomenovaný NCrypt súkromný kľúč k PDF podpisovému procesu

Syntax

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);

Parametre

CertificateFilePath to a DER-encoded RSA or ECDSA X.509 certificate
ProviderNameWindows key storage provider name, or an empty string for the Microsoft software provider
KeyNamePersistent key name understood by the provider
UseMachineKeyTrue or nonzero to use machine key scope
AllowUITrue or nonzero to permit provider interaction

Návratové hodnoty

1The certificate was read and the configuration was attached
0The file, process id, or key name was invalid

Poznámky

The DLL also exports DLSetSignProcessCNGKeyFromFileA for ANSI paths and namesThe certificate bytes are retained by the sign process, while the private key remains inside its provider

Pozri tiež

SetSignProcessCNGKey, SetSignProcessPFXFromFile