EldoS | Feel safer!

Software components for data protection, secure storage and transfer

as2, signature, Windows Certificate Storage

Posted: 06/02/2010 09:06:26
by forcom (Standard support level)
Joined: 06/01/2010
Posts: 1


I am trying to sign as2 message with certificate from Windows Certificate Storage.

Here is the code:

var ws = new TElWinCertStorage();
ws.AccessType = TSBStorageAccessType.atLocalMachine;

as2Message.Signature.CertStorage = new TElMemoryCertStorage();
for (int i = 0; i < ws.Count; i++)
var c = ws.GetCertificates(i);
if (c.SubjectName.CommonName == signatureCertificateId)
TElX509Certificate cert = new TElX509Certificate();
c.Clone(cert, true);
as2Message.Signature.CertStorage.Add(cert, true);

And this is what I am getting:

SBASCommon.EElASSMIMESignatureError: Internal error (error code is 9984)
w SBASCommon.TElASSMIMESignature.RaisePKCS7Error(Int32 Code)
w SBASCommon.TElASSMIMESignature.Sign(Stream Data, Int64 Size)
w SBASCommon.TElASMessage.Save(Stream Data, Stream Dest)
w Forcom.Market.Edifact.As2Sender.Send(String provider, String message, String fileName) w D:\Market3.Net\Forcom.Market.Edifact\As2Sender.cs:wiersz 222
w Forcom.Market.Edifact.NmsEdiMessageHandler.Handle(IMessage message) w D:\Market3.Net\Forcom.Market.Edifact\NmsEdiMessageHandler.cs:wiersz 27

When I load the same certificate from file everything is allright. What am I doing wrong?

Posted: 06/04/2010 10:14:34
by Eugene Mayevski (Team)

Moved to helpdesk. In future please post issues to HelpDesk, where they can be tracked. Forum is mainly for "how do I" type of questions, which can be of interest for other users.

Sincerely yours
Eugene Mayevski



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