SetSignProcessCertFromStoreByHandle
Security and signatures
Description
Vyberá podpisový certifikát pre sign proces cez surový handle PCCERT_CONTEXT získaný externe - typicky z EnumCertificates nasledovaného CertDuplicateCertificateContext. Toto obíde vyhľadávanie podľa Subject-CN, ktoré vykonáva SetSignProcessCertFromStore, takže volajúci si vyberie certifikát podľa ľubovoľného kritéria (qualified filter, platnostné okno, fingerprint)
Handle musí prežiť sign proces (vlastní ho volajúci a musí ho uvolniť cez CertFreeCertificateContext po dokončení EndSignProcess)
Syntax
Delphi
Function TPDFlib.SetSignProcessCertFromStoreByHandle(SignProcessID: Integer; CertHandle: Pointer): Integer;
Parameters
| SignProcessID | The sign process ID from NewSignProcessFromFile/Stream/String |
|---|---|
| CertHandle | A PCCERT_CONTEXT (as Pointer) obtained from EnumCertificates.CertHandle and duplicated via CertDuplicateCertificateContext |
Return values
| 0 | The sign process was not found or the handle was nil |
|---|---|
| 1 | The certificate handle was bound to the sign process |