EldoS | Feel safer!

Software components for data protection, secure storage and transfer


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.
Posted: 06/20/2012 17:22:06
by Greg Werner (Standard support level)
Joined: 04/25/2008
Posts: 13

Hi, i sign a pdf document an obtain a p7m document, i try to use Cryptigo (by microsoft) in order to open the p7m document but it shows always error, can you help me?
This is my code:
TElSignedCMSMessage CmsMessage = GetMessage(Document);
CmsMessage.Detached = DetachedSignature;

TElCMSSignature CmsSignature = GetSignature(CmsMessage);
CmsSignature.SigningOptions = SBCMS.Unit.csoIncludeCertToMessage |
                              SBCMS.Unit.csoInsertMessageDigests |
                              SBCMS.Unit.csoInsertContentType |
                              SBCMS.Unit.csoInsertSigningTime |
CmsSignature.DigestAlgorithm = Configurations.GetSignatureAlgorithmCode(AlgorithmType);
CmsSignature.Sign(CertificatePfx, CertificateChain);

private TElSignedCMSMessage GetMessage(IDocument Document)
    TElSignedCMSMessage cmsMessage = new TElSignedCMSMessage();
    Stream File = new MemoryStream(Document.File);

    if (Document.Name.Contains(".p7m") || Document.Name.Contains(".p7s"))
        cmsMessage.Open(File, null, 0, 0);
        cmsMessage.CreateNew(File, 0, File.Length);

    return cmsMessage;
Posted: 06/20/2012 18:35:58
by Ken Ivanov (EldoS Corp.)


Thank you for getting in touch with us.

Could you please let us know what exactly error are you getting from Cryptigo?
Posted: 06/20/2012 19:21:43
by Greg Werner (Standard support level)
Joined: 04/25/2008
Posts: 13

It says "The signature is invalid", and it shows the pdf in blank, i attached a screen shot

Posted: 06/21/2012 01:18:15
by Eugene Mayevski (EldoS Corp.)

1) Is your certificate used for signing recognized as valid by Cryptigo if you use this certificate right in Cryptigo?
2) what happens if you try to sign any other file?

Sincerely yours
Eugene Mayevski



Topic viewed 640 times

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


Back to top

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

Got it!