SetSignProcessCNGKey

אבטחה וחתימות

תיאור

Attaches a named NCrypt private key and its DER-encoded X.509 certificate to a PDF signing process

את המפתח פותחים ישירות מספק אחסון המפתחות המבוקש, מה שמאפשר זהויות חתימה מבוססות TPM, אסימוני חומרה, KSP ענן וזהויות CNG בלבד אחרות בלי לייצא את המפתח הפרטי

תחביר

Delphi

Function TPDFlib.SetSignProcessCNGKey(SignProcessID: Integer; Const CertificateDER: AnsiString; Const ProviderName, KeyName: WideString; UseMachineKey, AllowUI: Boolean): Integer;

ActiveX

Function PDFlib::SetSignProcessCNGKey(SignProcessID As Long, CertificateDER As Variant, ProviderName As String, KeyName As String, UseMachineKey As Long, AllowUI As Long) As Long

DLL

int DLSetSignProcessCNGKey(int InstanceID, int SignProcessID, const char* CertificateDER, int CertificateLength, const wchar_t* ProviderName, const wchar_t* KeyName, int UseMachineKey, int AllowUI);

פרמטרים

SignProcessIDValue returned by a NewSignProcessFrom* function
CertificateDERComplete DER-encoded RSA or ECDSA X.509 certificate corresponding to the private key
ProviderNameWindows key storage provider name, or an empty string for Microsoft Software Key Storage Provider
KeyNamePersistent key name understood by the provider
UseMachineKey‏true או ערך שאינו אפס לפתיחת המפתח מהיקף המכונה
AllowUI‏true או ערך שאינו אפס כדי לאפשר ממשקי משתמש של PIN, הסכמה או אישור-ענן מהספק

ערכים מוחזרים

1תצורת הזהות צורפה לתהליך
0מזהה ה-process, התעודה או שם המפתח לא היו תקינים

הערות

את המפתח פותחים כשתהליך החתימה רץ, ובייטי מפתח פרטי אינם נכנסים לזיכרון הספרייה

When AllowUI is false, NCRYPT_SILENT_FLAG is applied to key opening and signingThe generated CMS signature is verified against

CertificateDER לפני שהוא מתקבל, כך שמפתח באותו אלגוריתם אך לא תואם נדחה‏ActiveX מקבל variant של מערך בייטים, וה-DLL משתמש באורך תעודה מפורש כך שבייטים אפסים מוטמעים נשמרים

ראו גם

SetSignProcessCNGKeyFromFile, SetSignProcessCNGKeyByHandle, SetSignProcessPrivateKeyUI