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

פרמטרים

CertificateFilePath to a DER-encoded RSA or ECDSA X.509 certificate
ProviderNameשם ספק אחסון המפתחות של Windows, או מחרוזת ריקה עבור ספק התוכנה של Microsoft
KeyNamePersistent key name understood by the provider
UseMachineKeyTrue or nonzero to use machine key scope
AllowUITrue or nonzero to permit provider interaction

ערכי החזרה

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

הערות

ה-DLL מייצא גם DLSetSignProcessCNGKeyFromFileA עבור נתיבי ושמות ANSIאת בייטי התעודה שומר תהליך החתימה, בזמן שהמפתח הפרטי נשאר בתוך הספק שלו

ראו גם

SetSignProcessCNGKey, SetSignProcessPFXFromFile