Click here to Skip to main content
15,886,018 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
the bold line make an exeption of:
"SignatureDescription could not be created for the signature algorithm supplied."
i run it from win 7 SP1 32 bit,
i tried to install KB2973337 & KB2973351.
nothing helps!!!! its urgent!!! please help!!!
(without the bold line all work, but i need rsa-sha512 especially!!)
the certificate key check twice and its ok!!
also i tries to add this sugnature:
CryptoConfig.AddAlgorithm(typeof(RSAPKCS1SHA512SignatureDescription), XmlDsigRsaSha512);

and derive:
public class RSAPKCS1SHA512SignatureDescription : SignatureDescription {....}
nothing work!!! ==> get the exeption: "Invalid algorithm specified."

someone told me its something on the Operation System, this why i installed to KB's
... but still nothing.

This is my code:
---------------

XmlDocument doc = new XmlDocument();
doc.LoadXml(xml);

SignedXml signedXml = new SignedXml(doc);

signedXml.SignedInfo.CanonicalizationMethod = "http://www.w3.org/2001/10/xml-exc-c14n#";//SignedXml.XmlDsigExcC14NTransformUrl
signedXml.SignedInfo.SignatureMethod = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512";
signedXml.SigningKey = cert.PrivateKey;

Reference reference = new Reference("");
reference.AddTransform(new XmlDsigEnvelopedSignatureTransform());
reference.DigestMethod = "http://www.w3.org/2001/04/xmlenc#sha512"; signedXml.AddReference(reference);

KeyInfo keyInfo = new KeyInfo();
keyInfo.AddClause(new KeyInfoX509Data(cert));
signedXml.KeyInfo = keyInfo;

signedXml.ComputeSignature();
Posted
Updated 27-Oct-14 22:21pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900