* SignedXml.cs : avoid using LoadXml() to load xml element as in
literal string. Use ImportNode() instead.
Copy namespaces for a referenced node found in envelope document too.
svn path=/trunk/mcs/; revision=160143
* EncryptedXml.cs: Add proper null check inside methods.
* SignedXml.cs: GetIdElement returns null if either of its parameter
is null.
* Transform.cs: Comment compatibility-NRE in GetDigestedOutput.
* XmlDecryptionTransform.cs: IsTargetElement returns null if either
of its parameter is null.
* XmlDsigC14NTransform.cs: Comment compatibility-NRE in
GetDigestedOutput.
* XmlDsigExcC14NTransform.cs: Comment compatibility-NRE in
GetDigestedOutput.
[Found using Gendarme CheckParametersNullityInVisibleMethodsRule]
svn path=/trunk/mcs/; revision=117622
* SignedXmlTest.cs: Add support for signing XML using HMACSHA256,
HMACSHA384, HMACSHA512 and HMACRIPEMD160.
[Fix bug #425724]
svn path=/trunk/mcs/; revision=113344
* SignedXml.cs : for internal URI (#blah) resolution, use
GetIdElement() so that any derived class which overrides this
method could resolve the reference correctly.
svn path=/trunk/mcs/; revision=72119
* 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
* 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
* SignedXml.cs : overwrite my fix with Gert's patch on #79454 to make it
possible to handle multiple certificates.
svn path=/trunk/mcs/; revision=65732
* SignedXml.cs: Return an empty (not null) KeyInfo by default and
don't throw a CryptographicException in CheckSignature (both NET_2_0).
* KeyInfoRetrievalMethod.cs: Don't include an empty URI attribute
in the XML output for NET_2_0.
* XmlDsigXPathTransform.cs: Throw an XPathException in NET_2_0 if no
xpath expression has been supplied to the transform.
svn path=/trunk/mcs/; revision=44034
* SignedXml.cs: Throw ArgumentNullException in AddObject and
AddReference methods in 2.0.
* XmlDsigC14NTransform.cs: Throw ArgumentException when loading from
an unknown type in 2.0 (it was simply ignored in 1.x).
svn path=/trunk/mcs/; revision=43879
* SignedInfo.cs: Added [ComVisible (false)] to new property.
* SignedXml.cs: Added [ComVisible (false)] to new properties and
methods.
* ReferenceList.cs: Fixed members signatures for beta2.
* Reference.cs: Added [ComVisible (false)] to new set_TransformChain.
* EncryptedType.cs: Fix compilation with EncryptionPropertyCollection
changes.
* DataObject.cs: Fix compilation warnings.
* EncryptedKey.cs: Fix compilation with ReferenceList and
EncryptionPropertyCollection changes.
* EncryptionProperties.cs: Class has been renamed to
EncryptionPropertyCollection.
* Transform.cs: Added [ComVisible (false)] to new properties and
methods.
* EncryptedXml.cs: Changed XmlEncRSA1_5Url to XmlEncRSA15Url.
* KeyInfoRetrievalMethod.cs: Added [ComVisible (false)] to Type
property.
* KeyInfoX509Data.cs: Added [ComVisible (false)] to AddSubjectKeyId
(string) method and implemented it.
* EncryptedData.cs: Changed EncryptionProperties to new
EncryptionPropertyCollection.
* XmlDsigC14NTransform.cs: Added [ComVisible (false)] to
GetDigestedOutput method and added a basic implementation.
* X509IssuerSerial.cs: IssuerName and SerialNumber are now properties.
svn path=/trunk/mcs/; revision=43514
* EncryptedXml.cs: Add support for RSA for key formatting
* Reference.cs: Include XmlDecryptionTransform
* SignedXml.cs:
Set the EncryptedKey on the XmlDecryptionTransform when
loading XML
* XmlDecryptionTransform.cs:
Clean up decryption transformation to work without ugly hack.
* XmlDsigExcC14NTransform.cs:
Add algorithm identifier.
* XmlSignature.cs:
Add namespaces for various classes.
svn path=/trunk/mcs/; revision=33317
* CipherReference.cs: Add XmlDecryptionTransform for 2.0
* EncryptedType.cs: Fix type initialization to conform to .NET
* EncryptedXml.cs:
Add support for RSA key decryption and "cloning" for Transform
* KeyInfoX509Data Reference.cs SignedInfo.cs XmlDsigC14NTransform.cs:
Add 2.0 stubs
* Signature.cs:
Create internal GetXml function if we already have a doc
* SignedXml.cs: Fix the transformation when we get an XmlDocument out
* XmlDecryptionTransform.cs: Implemented Xml Decryption
* XmlSignature.cs: Add namespace for Xml Decryption
svn path=/trunk/mcs/; revision=33236
* SignedXml.cs : partial fix for bug #59165 that does not output
namespace that conflicts with element's namespace.
svn path=/trunk/mcs/; revision=28551
* SignedXml.cs,
Transform.cs : code cleanup. #if !NET_1_0 -> #if NET_1_1.
* XmlDsigBase64Transform.cs : Should not output the content of the
selected element nodes. Put text content only those text nodes are
in the node list.
* XmlDsigEnvelopedSignatureTransform.cs : removed MonoTODO.
* XmlDsigXsltTransform.cs : Use XmlResolver to load document and
to transform. Throw null reference exception explicitly when
the input was not loaded.
svn path=/trunk/mcs/; revision=26731
* SignedXml.cs : namespace nodes also should be supplied for enveloped
objects.
* KeyInfoRetrievalMethod.cs : Keep input element as well as others.
svn path=/trunk/mcs/; revision=24658
* Manifest.cs: New. Support for <Manifest> in Xml Digital Signature.
This should help us to validate more tests from the Phaos suite.
Note: Microsoft doesn't support this and we only support it for
verification (not signature generation).
* SignedXml.cs: Added support for Manifest, including recursive
manifests. Made some changes to reuse existing code as much as
possible. Better support for local/remote files - but requires
catching an Uri exception for local files :-(.
svn path=/trunk/mcs/; revision=24645
* SignedXml.cs :
- Use specified (or default) XmlResolver to get external resource,
instead of using WebRequest directly. Also modified it easier.
- ApplyTransform() : Clone only when it is required. Handle
transformation output other than Stream.
- Even if applicable key was not found in GetHash(), don't throw
crypto exception every time and just return false (MS does it).
Throw an exception only when no key was specified as KeyInfo.
* XmlDsigEnvelopedSignatureTransform.cs : Fixed get_OutputTypes which
incorrectly set InputTypes internally.
* XmlDsigXPathTransform.cs : Context namespace nodes in loaded
transform parameter (i.e. <XPath>..</XPath>) should be registered
to XsltContext. Otherwise prefix binding error occurs.
Just filter attribute node, instead of filtering attribute children.
svn path=/trunk/mcs/; revision=24636
* SignedXml.cs: Added try/catch in CheckSignatureWithKey to return
false on exceptions. Fix signature-rsa-detached-xslt-transform-bad
-retrieval-method.xml in the Phaos test suite.
svn path=/trunk/mcs/; revision=24599
* Reference.cs, Signature.cs : They should keep input element and hence
keep namespace context nodes on LoadXml() as same as SignedInfo.
* SignedXml.cs : Fixed SignedInfoTransformed() to fill context
namespace nodes into the input document (unlike other classes, there
seems no other way to keep ns-nodes here).
Now some of W3C phaos xmldsig test passes.
svn path=/trunk/mcs/; revision=24532
* SignedXml.cs : the result from enveloped signature transform should
be canonicalized before getting its hash.
* XmlDsigEnvelopedSignatureTransform.cs : in XPath selection,
if the node is Signature itself it is not allowed.
PreserveWhitespace is required.
svn path=/trunk/mcs/; revision=24197
* SignedXml.cs: Changed (again). This time we use the Stream when
loading the document. We now pass 14 out of 15 of the Merlin's
tests (including one that MS fails). The only failing test is the
one that use the EnvelopedTransform (unfinished).
svn path=/trunk/mcs/; revision=24158
* XmlDsigNodeList.cs : added.
* XmlDsigXPathTransform.cs : removed XmlDsigNodeList class.
* XmlDsigEnvelopedSignatureTransform.cs :
Implemented GetOutput(). However, it is totally MS behavior
dependent and not based on the spec (we can reimplement it based on
improved XmlDsigXPathTransform).
* SignedXml.cs : in GetOutput(), accept XmlNodeList input too.
svn path=/trunk/mcs/; revision=24120
* SignedXml.cs: Now use the original Signature element before applying
the C14N transformation. Added a check for null in LoadXml.
svn path=/trunk/mcs/; revision=24066
* Signature.cs: KeyInfo isn't required in schema.
* SignedInfo.cs: Added support for missing HMACOutputLength.
* SignedXml.cs: Added support to download a reference (experimental).
Now throw exception for unknown hash algorithm or canonicalization
methods. Changed GetPublicKey to iterate all available keys (not just
the first one).
svn path=/trunk/mcs/; revision=23968
* KeyInfo.cs : Attribute Id was not handlded.
* KeyInfoX509Data.cs : all array members return null when there are
no such contents. Just find child elements, not descendants.
* SignedXml.cs : key is not always required when CheckSignature() is
called.
* XmlDsigXsltTransform.cs : LoadInput should allow node list.
* XmlSignature.cs : added GetChildElements().
svn path=/trunk/mcs/; revision=23934
* SignedXml.cs: Fixed class signature (for 1.1+) by adding public to
Resolver property.
* Transform.cs: Fixed class signature (for 1.1+) by adding public to
Resolver property.
svn path=/trunk/mcs/; revision=21962
* SignedXml.cs: Now load the public key when verifying (bug #52084)
and can find an element by it's Id when Id isn't defined in DTD or XSD.
svn path=/trunk/mcs/; revision=21123
* SignedXml.cs: Added property XmlResolver Resolver as per framework 1.1
documentation (no public declaration).
* Transform.cs: Added property XmlResolver Resolver as per framework 1.1
documentation (no public declaration).
svn path=/trunk/mcs/; revision=14454