* Finalize the implementation of SignedXml.ComputeSignature().
The implementation was taken from Reference Source, which makes the behaviour of this method the same as in .NET Framework, as well as makes it possible to use custom signature descriptions.
The underlying problem for bug 7716 [1] was that the Mono C14N XML
canonicalizer was not sorting the XML attributes in the same order as
Microsoft .NET's canonicalizer.
The C14N specification [2] states: "the attributes are sorted
lexicographically by attribute name (based on Unicode character code
points)." This wording suggests that the order of attributes should be
strictly ascending based on Unicode byte value. This commit changes the
attribute sort order to match the specification.
The new tests pass on Windows, fail on Mono before this change, and
succeed on Mono after this change.
[1] https://bugzilla.xamarin.com/show_bug.cgi?id=7716
[2] http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html
* SignedXmlTest.cs: Add test cases for HMACSHA[256|384|512] and
HMACRIPEMD160 which are supported in 2.0. Based on test case from
Fredrik Olsson on bug #425724.
svn path=/trunk/mcs/; revision=113345
* SignedXml.cs : for DataObject, copy namespaces in Data into Object
element itself. I haven't solved the puzzle on why it is needed
though.
* SignedXmlTest.cs : enable SignElementWithPrefixedNamespace().
svn path=/trunk/mcs/; revision=71658
* XmlCanonicalizer.cs : it should be reset before being reused.
* SignedXmlTest.cs :
run the transformation in yesterday's test twice.
svn path=/trunk/mcs/; revision=71529
* XmlDsigExcC14NTransformTest.cs, XmlDsigC14NTransformTest.cs,
SignedXmlTest.cs : added some more tests which blocks indigo.
svn path=/trunk/mcs/; revision=71462
* SignedXml.cs : when there is an envelope document and no referenced
DataObject was found, then look for the target element from the
envelope.
* SignedXmlTest.cs : added DataReferenceToNonDataObject().
* xmldsig.cs : signature-big.xml also depends on the input document.
svn path=/trunk/mcs/; revision=70919
* SignedXml.cs : actually ComputeSignature() itself does not raise
silly exception. It always use CryptographicException.
Added another check; malformed reference object.
* SignedXmlTest.cs : fixed ComputeSignatureNoSigningKey() to not
expect silly exception. Added test for malformed reference.
svn path=/trunk/mcs/; revision=70911
* SignedXml.cs : when SigningMethod does not match the algorithm that
the key actually supports, it raises an error.
* SignedXmlTest.cs : added a test for signature method mismatch.
svn path=/trunk/mcs/; revision=66535
* AssertCrypto.cs: Added method to compare somewhat different but ok
XML fragments (when the xmlns for xmldsig is on a different element).
* KeyInfoTest.cs, KeyInfoRetrievalMethodTest.cs, ReferenceTest.cs,
SignedInfoTest.cs, SignatureTest.cs, SignedXmlTest.cs,
XmlDsigC14NTransformTest.cs, XmlDsigC14NWithCommentsTransformTest.cs,
XmlDsigXPathTransformTest.cs: Make all tests works under Fx 2.0 beta 2
svn path=/trunk/mcs/; revision=44035
* SignedXmlTest.cs: AddObject and AddReference now throws
ArgumentNullException in 2.0.
* XmlDsigC14NWithCommentsTransformTest.cs: InputType was fixed in 2.0.
* XmlDsigC14NTransformTest.cs: InputType was fixed in 2.0.
* XmlDsigXsltTransformTest.cs: Fixed tests for 2.0, InputType, Empty
XSLT and invalid XSLT (new exception).
svn path=/trunk/mcs/; revision=43877
* SignedXmlTest.cs: Added a new unit test to verify both bugs (no
key assigned on verification and GetElementId) found when fixing
#52084.
svn path=/trunk/mcs/; revision=21125
* All: Updated tests for NUnit2. Some big tests where splited in
smaller ones.
* XmlDsigC14NTransformTest.cs: New, but almost empty, test suite.
* XmlDsigC14NWithCommentsTransformTest.cs: New, but almost empty,
test suite.
svn path=/trunk/mcs/; revision=11751
* AllTests.cs: New. Added suites for very listed files.
* DataObjectTest.cs: New. Test suite for DataObject.
* DSAKeyValueTest.cs: New. Test suite for DSAKeyValue.
* KeyInfoNameTest.cs: New. Test suite for KeyInfoName.
* KeyInfoNodeTest.cs: New. Test suite for KeyInfoNode.
* KeyInfoRetrievalMethodTest.cs: New. Test suite for DSAKeyValue.
* KeyInfoTest.cs: New. Test suite for KeyInfo.
* KeyInfoX509DataTest.cs: New. Test suite for KeyInfoX509Data.
* ReferenceTest.cs: New. Incomplete test suite for Reference.
* RSAKeyValueTest.cs: New. Test suite for RSAKeyValue.
* SignatureTest.cs: New. Partial test suite for Signature.
* SignedInfoTest.cs: New. Partial test suite for SignedInfo.
* SignedXmlTest.cs: New. Partial test suite for SignedXml.
* TransformChainTest.cs: New. Test suite for TransformChain.
* XmlDsigBase64TransformTest.cs: New. Partial test suite for
XmlDsigBase64Transform
* XmlDsigXsltTransformTest.cs: New. Partial test suite for
XmlDsigXsltTransform.
svn path=/trunk/mcs/; revision=9125