KurtInCali wrote: ↑Mon May 24, 2021 7:30 pm
Hi,
I'm being asked by a customer if we can digitally sign a pdf from a certificate in the local machine certificate store?
Alternately is there a way to do it from a certificate stored up in Azure?
From looking at internet CAs it looks like they are selling personal ones on thumb drives and enterprise ones on HSM hardware. Could you please provide details on what type of certificates that can be used?
I'd like to avoid my customer spending too much for one or purchasing something that doesn't work.
Thanks in advance,
Kurt
Although not a complete answer , it is possible to get a cert from the user and machine stores and use that to sign a document with GDPicture.
The following snippets require their appropriate references and it is in VB.net, but shows what you need. You would need to create your own form or interface for the user to select the proper cert from the store, but you can get the idea from the loop. The 2nd portion shows the beginnings of how to use with GDPicture. This would be from a desktop application that is run with rights to get to the stores. You get the serial ID needed from whatever was selected by the user .
Now I still have no idea how to have it fill an existing signature field identified from a user selecting the field in the viewer
Code: Select all
Dim store As X509Store = New X509Store(StoreName.My, StoreLocation.CurrentUser)
store.Open(OpenFlags.ReadOnly)
For Each certificate As X509Certificate2 In store.Certificates
Debug.Print(certificate.SerialNumber & " " & certificate.SubjectName.ToString & " " & certificate.Issuer)
Next
Code: Select all
Dim status As GdPictureStatus = _gdPicturePdf.SetSignatureCertificateFromStore(serialID) 'this is only a portion of the process, use this as opposed to pfx in the example