Digitally Sign PDF from USB eToken


#1

Is it possible to sign PDF document retrieving the private key from USB token?
The examples available using the PdfSignDigitalOptions class gets the private key from a pfx file.
Thanks.


#2

@diego.fullana,

Thank you for your inquiry. From your request, it’s not clear that you are trying to explore GroupDocs.Signature product for which platform (.NET, Java or Cloud)?. Please specify the details and we will be glad to help you.


#3

Thanks for your reply. My request is for the .Net platform, specifically in C #.

Basically, we need to sign with a certificate that we retrieve from the certificate store on the user computer.
This certificate is associated with an RSACryptoServiceProvider (USB token) that holds the Private Key.

Code we use to retrieve the certificate:

X509Certificate2 x509;
X509Store store = new X509Store(StoreLocation.CurrentUser);
store.Open(OpenFlags.ReadOnly | OpenFlags.OpenExistingOnly);
X509Certificate2Collection collection = (X509Certificate2Collection)store.Certificates;
X509Certificate2Collection fcollection = (X509Certificate2Collection)collection.Find(X509FindType.FindBySubjectName, "CertSubjectName", false);
X509Certificate2Collection scollection = X509Certificate2UI.SelectFromCollection(fcollection, "Test Certificate Select", "Select a certificate from the following list to get information on that certificate", X509SelectionFlag.SingleSelection);
if(scollection.Count > 0)
{
    x509 = scollection[0];
}
store.Close();

Hope the details help!


#4

@diego.fullana,

We are investigating this scenario at our end. Your investigation ticket ID is SIGNATURENET-1746. As we have any further updates on it, we’ll notify you.