EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Which classes should I use for simple p7m/p7s manager?

Posted: 11/20/2012 11:08:13
by Ivan Hristov (Standard support level)
Joined: 10/26/2012
Posts: 16

Hello all,

I tried to figure it out myself, but also I would like to keep the things as simple as possible.
My current task is to make very basic class for signing, verifying and extracting files with attached signature (p7m). From what I've read here, I assumed that the classes TElMessageSigner and TElMessageVerifier should do the job. TElAuthenticodeSigner also seemed appropriate, but obviously it signs only EXE-files, and my task is to sign virtually any file.
So is it possible to accomplish my task using TelMessageSigner/Verifier rather than TElSignedCMSMessage, and are there any code samples I could use?
I looked at the samples that ship with the installation, especially at the CMSManager sample, but it seems quite extensive and circumstantial for my needs.

Posted: 11/20/2012 11:10:27
by Eugene Mayevski (Team)

Yes, TElMessageSigner and TElMessageVerifier are correct classes to sign and validate PKCS#7 signatures. Please refer to MessagesDemo sample in Samples\language\PKIBlackbox folder for details.

Yet as you have noticed for more complex things CMS is needed. CMS is a superset of PKCS#7.

Sincerely yours
Eugene Mayevski
Posted: 11/21/2012 03:06:45
by Ivan Hristov (Standard support level)
Joined: 10/26/2012
Posts: 16


Thank you for your reply. The MessagesDemo is exactly what I needed. I was kinda confused by this two-time calling the TElMessageSigner.Sign method - seems that the first time it is just called to get the length of the output buffer.
Anyway, the main task is done, although it needs some finishing. Thanks again for your input - very helpful as always.

Ivan Hristov



Topic viewed 831 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!