<link>http://www.ncryptoki.com/forum.aspx</link> <description /> <docs>http://www.rssboard.org/rss-specification</docs> <generator>mojoPortal Forum module</generator> <item> <title>Re: WSSecurity Sign Soap Header With HSM I don't understand what you are referring.

Our libraries NCryptoki, JCryptoki, NDigitSign and JDigitSign have nothing to do with the code you posted.

You posted a code from BouncyCastle. We don't sell BouncyCastle

 

]]>
http://www.ncryptoki.com/Forums/Thread.aspx?pageid=9&t=183~-1#post794 ersinici http://www.ncryptoki.com/Forums/Thread.aspx?pageid= Wed, 01 Apr 2015 09:37:10 GMT Re: WSSecurity Sign Soap Header With HSM I think your signature element has problem. Please check SOAP WSSE examples.

]]>
http://www.ncryptoki.com/Forums/Thread.aspx?pageid=9&t=183~-1#post782 ersinici http://www.ncryptoki.com/Forums/Thread.aspx?pageid= Sun, 15 Mar 2015 01:11:06 GMT
WSSecurity Sign Soap Header With HSM Hi;

 

I am using NCryptoki for sigining Soap Message Header. I prepare SOAP header on BeforeSendRequest.

 

I try to sign message with smartCard with same way and succesfully send to message to recipent. But change sign implamentation to hsm then I got "Signature or decryption is invalid" error. 

 

Hsm sign implementation:

 

byte[] hash = cryptoServiceProvider.ComputeHash(System.Text.Encoding.UTF8.GetBytes(signatureElement.OuterXml));
                Org.BouncyCastle.Asn1.X509.DigestInfo di = new Org.BouncyCastle.Asn1.X509.DigestInfo(new Org.BouncyCastle.Asn1.X509.AlgorithmIdentifier("2.16.840.1.101.3.4.2.1"), hash);  //SHA256 algorithm key
                byte[] digest = di.GetEncoded();
                signedXml.Signature.SignatureValue = nCipherSign.sign(digest);

 

signature calculated succesfully but recipent gives error.

 

What is wrong in this implementation?

 

Best Regards

 

]]>
http://www.ncryptoki.com/Forums/Thread.aspx?pageid=9&t=183~-1#post768 ersinici http://www.ncryptoki.com/Forums/Thread.aspx?pageid= Wed, 14 Jan 2015 14:22:24 GMT