EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Digital Signing on PDFs

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
Posted: 12/18/2014 08:14:24
by sowjanya  (Standard support level)
Joined: 06/24/2014
Posts: 37

I am writing an c# Application to digitally sign PDFs. I exported certificate from usbtoken which is .cer format. when i use this in my Application i am getting error that "Signing certify not found". Please provide me a solution to this problem. I am stuck in this. Also is there a way to export private key from usbtoken? when i exported i got only .cer certificate.
Posted: 12/18/2014 08:22:51
by Vsevolod Ievgiienko (Team)

Thank you for contacting us.

CER file contains only public part of a certificate while you need a private key to perform it. Private keys are usually non-exportable, but you can still use them with SecureBlackbox if your device supports PKCS#11 standard.
Corresponding sample can be found in \EldoS\SecureBlackbox.NET\Samples\C#\PDFBlackbox\Desktop\SignerPKCS11 folder.
Posted: 12/18/2014 08:33:36
by sowjanya  (Standard support level)
Joined: 06/24/2014
Posts: 37

using UsbToken can we place Digital Signature on PDF Files?
Posted: 12/18/2014 08:35:51
by Vsevolod Ievgiienko (Team)

Yes if it supports PKCS#11.
Posted: 12/18/2014 08:36:42
by sowjanya  (Standard support level)
Joined: 06/24/2014
Posts: 37

Just like .PFX,.Cer certificates can we use USBTOKEN and place Digital Signature on PDF Files????
Posted: 12/18/2014 08:41:08
by Eugene Mayevski (Team)

Please read the previous Vsevolod's replies above attentively.

Sincerely yours
Eugene Mayevski
Posted: 12/18/2014 08:41:56
by sowjanya  (Standard support level)
Joined: 06/24/2014
Posts: 37


I saw your sample code :: \EldoS\SecureBlackbox.NET\Samples\C#\PDFBlackbox\Desktop\SignerPKCS11

But i didn't understood how to use it, could you please explain to me clearly how to use usbtoken and place digital signature on PDF files
Posted: 12/18/2014 08:47:07
by Eugene Mayevski (Team)

From Support Policy:

* Please understand that use of EldoS products requires certain level of competence. We are unable to use our support service to instruct on basics of technology, computers, or software development. If you need coding assistance, we would be glad to offer you our Expert services.

Sincerely yours
Eugene Mayevski
Posted: 12/18/2014 10:42:27
by sowjanya  (Standard support level)
Joined: 06/24/2014
Posts: 37

I need little code assistance so that I will get an idea on how to place digital signature using usbtoken.

Previously I wrote c#application which place digital signature using .pfx file.

Please help with this
Posted: 12/18/2014 11:10:16
by Eugene Mayevski (Team)

Certificates stored on the hardware device are accessed via PKCS#11 interface. SecureBlackbox has several classes to access different types of objects stored on such hardware. Certificates are most often and most widely used, and we have TElPKCS11CertStorage class that lets you enumerate and use certificates stored on the device.

If you implemented the code that uses the PFX with SecureBlackbox, you loaded the certificate(s) to an instance of TElMemoryCertStorage and then used this instance.

With PKCS11 the approach is the same:
1) you create an instance of TElPKCS11CertStorage class and find the certificate there which you want to use for signing.
2) you add this certificate to an instance of TElMemoryCertStorage (C# syntax):
TElMemoryCertStorage MemStorage = new TElMemoryCertStorage();
MemStorage.Add(MyPKCS11Storage.get_Certificates(CertificateIndex), true);

3) after that you use MemStorage with PDF signing code.

The private key MUST be present for the given certificate on the hardware device. Private keys can't be extracted from the device and saved to file, but the above written code snippet will work correctly because SecureBlackbox "knows" about the limitation and handles it internally.

Sincerely yours
Eugene Mayevski
Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.



Topic viewed 3511 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!