SetSignProcessCNGKeyFromFile

Ασφάλεια και υπογραφές

Περιγραφή

Φορτώνει πιστοποιητικό X.509 κωδικοποιημένο σε DER από αρχείο και επισυνάπτει ονομασμένο private key NCrypt σε διαδικασία υπογραφής PDF

Σύνταξη

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Διαδρομή προς πιστοποιητικό X.509 RSA ή ECDSA κωδικοποιημένο σε DER
ProviderNameΌνομα provider αποθήκευσης κλειδιών Windows, ή κενή συμβολοσειρά για τον provider λογισμικού της Microsoft
KeyNameΌνομα μόνιμου κλειδιού που κατανοεί ο provider
UseMachineKeyTrue ή μη μηδενικό για χρήση scope κλειδιού μηχανής
AllowUITrue ή μη μηδενικό για επιτροπή αλληλεπίδρασης provider

Τιμές επιστροφής

1Το πιστοποιητικό διαβάστηκε και η ρύθμιση επισυνάφθηκε
0Το αρχείο, το process id ή το όνομα κλειδιού ήταν άκυρα

Παρατηρήσεις

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

Δείτε επίσης

SetSignProcessCNGKey, SetSignProcessPFXFromFile