SetSignProcessCNGKeyFromFile
אבטחה וחתימות
תיאור
Loads a DER-encoded X.509 certificate from a file and attaches a named NCrypt private key to a PDF signing process
תחביר
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);
פרמטרים
| CertificateFile | Path to a DER-encoded RSA or ECDSA X.509 certificate |
|---|---|
| ProviderName | שם ספק אחסון המפתחות של Windows, או מחרוזת ריקה עבור ספק התוכנה של Microsoft |
| 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 |
ערכי החזרה
| 1 | The certificate was read and the configuration was attached |
|---|---|
| 0 | The file, process id, or key name was invalid |
הערות
ה-DLL מייצא גם DLSetSignProcessCNGKeyFromFileA עבור נתיבי ושמות ANSIאת בייטי התעודה שומר תהליך החתימה, בזמן שהמפתח הפרטי נשאר בתוך הספק שלו