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
| CertificateFile | Path to a DER-encoded RSA or ECDSA X.509 certificate |
|---|---|
| ProviderName | Windows key storage provider name, or an empty string for the Microsoft software provider |
| KeyName | Persistent key name understood by the provider |
| UseMachineKey | True or nonzero to use machine key scope |
| AllowUI | True or nonzero to permit provider interaction |
Návratové hodnoty
| 1 | The certificate was read and the configuration was attached |
|---|---|
| 0 | The 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