EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Cryptigo

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
#20559
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:
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 |
                              SBCMS.Unit.csoIncludeCertToAttributes;
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);
    else
        cmsMessage.CreateNew(File, 0, File.Length);

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

Greg,

Thank you for getting in touch with us.

Could you please let us know what exactly error are you getting from Cryptigo?
#20563
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


#20565
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

Reply

Statistics

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