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 |
| UseMachineKey | True ή μη μηδενικό για χρήση scope κλειδιού μηχανής |
| AllowUI | True ή μη μηδενικό για επιτροπή αλληλεπίδρασης 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