Commit Graph
58 Commits
Author SHA1 Message Date
Atsushi Eno 901d0ff658 2004-07-20 Atsushi Enomoto <[email protected]>
* Signature.cs : Fixed NextElementPos() that incorrectly examined
	  node matching.

svn path=/trunk/mcs/; revision=31301
2004-07-20 07:25:35 +00:00
Sebastien Pouliot ab83dcf609 2004-07-07 Sebastien Pouliot <[email protected]>
* EncryptedXml.cs: Fixed Urls for XmlEncElementUrl and
	XmlEncElementContentUrl.
	* X509IssuerSerial.cs: Make constructor internal so it doesn't show up
	in corcompare results for NET_2_0 profile.

svn path=/trunk/mcs/; revision=30853
2004-07-07 19:36:05 +00:00
Sebastien Pouliot e858743eaf 2004-06-17 Sebastien Pouliot <[email protected]>
* KeyInfoX509Data.cs: Removed old internal IssuerSerial for the
	undocumented structure (now documented, and public, in Fx 2.0).
	* X509IssuerSerial.cs: Use structure as public in NET_2_0 and as
	internal before that.

svn path=/trunk/mcs/; revision=29817
2004-06-17 23:12:52 +00:00
Gert Driesen 2725186677 * SignedXml.cs: API signature fixes
svn path=/trunk/mcs/; revision=29206
2004-06-10 17:19:14 +00:00
Atsushi Eno d5a5f5ad9a 2004-06-04 Atsushi Enomoto <[email protected]>
* SignedXml.cs : Complete fix for bug #59545. Support #xpointer(id()).
	  Namespace fixup is required when signing prefixed xml.

svn path=/trunk/mcs/; revision=28835
2004-06-04 12:40:01 +00:00
Atsushi Eno a966e4e229 2004-06-04 Atsushi Enomoto <[email protected]>
* SignedXml.cs : Fix for bug #59545. Handle #xpointer(/) as document.

svn path=/trunk/mcs/; revision=28824
2004-06-04 08:23:43 +00:00
Atsushi Eno 0820f840a5 2004-05-31 Atsushi Enomoto <[email protected]>
* SignedXml.cs : partial fix for bug #59165 that does not output
	  namespace that conflicts with element's namespace.

svn path=/trunk/mcs/; revision=28551
2004-05-31 12:06:45 +00:00
Sebastien Pouliot 7fcbfac84a 2004-05-13 Sebastien Pouliot <[email protected]>
* SignedXml.cs: Update TODO informations.

svn path=/trunk/mcs/; revision=27274
2004-05-13 14:36:48 +00:00
Atsushi Eno 87223a0b93 2004-05-13 Atsushi Enomoto <[email protected]>
* XmlDsigBase64Transform.cs :
	  LoadInput() should retrieve all the descendants.
	  GetOutput() should handle nodes without digging into child nodes.

svn path=/trunk/mcs/; revision=27269
2004-05-13 14:19:22 +00:00
Atsushi Eno 461b2e57a5 2004-05-05 Atsushi Enomoto <[email protected]>
* 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
2004-05-05 03:45:49 +00:00
Lluis Sanchez b8301c0212 * XmlDsigEnvelopedSignatureTransform.cs, XmlDsigXPathTransform.cs,
XmlDsigXsltTransform.cs: Fixed build for net_1_0 profile.

svn path=/trunk/mcs/; revision=24932
2004-04-01 22:48:52 +00:00
Sebastien Pouliot 25191510fa 2004-03-30 Sebastien Pouliot <[email protected]>
* Reference.cs: Changed code to use CryptoConfig to create transforms.
	This is "the" way to do it (e.g. to allow new transforms to be added)
	but cause problems when using VS.NET for debugging. Old code is still
	present, but commented, for that cause.

svn path=/trunk/mcs/; revision=24782
2004-03-30 13:06:10 +00:00
Atsushi Eno de60011134 2004-03-27 Atsushi Enomoto <[email protected]>
* 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
2004-03-27 19:59:31 +00:00
Atsushi Eno cad79eadd9 2004-03-27 Atsushi Enomoto <[email protected]>
* SignedXml.cs : XPath transformation output is not type of Stream.
	  Fix to support them by canonicalizing it.

svn path=/trunk/mcs/; revision=24657
2004-03-27 19:46:40 +00:00
Atsushi Eno d4bb04c931 2004-03-27 Atsushi Enomoto <[email protected]>
* XmlDsigXsltTransform.cs : GetOutput() now just returns
	  transformation output.

svn path=/trunk/mcs/; revision=24656
2004-03-27 19:21:31 +00:00
Atsushi Eno 4c107154e6 2004-03-27 Atsushi Enomoto <[email protected]>
* SignedXml.cs : Added xmlns support for Manifest.

svn path=/trunk/mcs/; revision=24654
2004-03-27 18:13:50 +00:00
Sebastien Pouliot 60a062e2e5 2004-03-26 Sebastien Pouliot <[email protected]>
* XmlSignature.cs: Added constants for Manifest element and URI.

svn path=/trunk/mcs/; revision=24646
2004-03-26 21:14:07 +00:00
Sebastien Pouliot 5f7ab7bca8 2004-03-26 Sebastien Pouliot <[email protected]>
* 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
2004-03-26 21:10:40 +00:00
Atsushi Eno da7c4adefd 2004-03-26 Atsushi Enomoto <[email protected]>
* 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
2004-03-26 16:08:47 +00:00
Sebastien Pouliot 04f2e11aeb 2004-03-25 Sebastien Pouliot <[email protected]>
* 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
2004-03-25 18:01:12 +00:00
Atsushi Eno f4e851c96f 2004-03-24 Atsushi Enomoto <[email protected]>
* 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
2004-03-24 18:32:58 +00:00
Atsushi Eno 1cc064583f 2004-03-23 Atsushi Enomoto <[email protected]>
* SignedInfo.cs : It holds input element and directly returns it
	  unless the properties are not set.
	  Throw CryptographicException when Reference is empty *and* GetXml()
	  is *created*. (when just returning input element, no exception is
	  thrown).

svn path=/trunk/mcs/; revision=24465
2004-03-23 15:55:37 +00:00
Atsushi Eno f343ebfeaf 2004-03-23 Atsushi Enomoto <[email protected]>
* DataObject.cs : It now hold element instead of each parameters.
	  Avoid loading element content to different document unless its
	  properties were modified (to keep namespace node context).

svn path=/trunk/mcs/; revision=24459
2004-03-23 13:05:03 +00:00
Sebastien Pouliot 189c0f1443 2004-03-20 Sebastien Pouliot <[email protected]>
* SignedXml.cs: Removed unused (and commented) ComputeHash method.

svn path=/trunk/mcs/; revision=24381
2004-03-21 01:03:10 +00:00
Atsushi Eno 852b567b99 2004-03-19 Atsushi Enomoto <[email protected]>
* XmlDsigXPathTransform.cs : just found stupid bug.

svn path=/trunk/mcs/; revision=24338
2004-03-19 18:17:13 +00:00
Sebastien Pouliot b69503f4bc 2004-03-19 Sebastien Pouliot <[email protected]>
* SignedXml.cs: Lot of small changes to complete TODOs and to match
	the new unit tests.

svn path=/trunk/mcs/; revision=24326
2004-03-19 13:34:28 +00:00
Sebastien Pouliot 97b4f60edb 2004-03-17 Sebastien Pouliot <[email protected]>
* SignedXml.cs: The old method was working for creating signature -
	so it was reintroduced for (only) this case.

svn path=/trunk/mcs/; revision=24230
2004-03-17 15:19:15 +00:00
Atsushi Eno 26abb1d17e 2004-03-17 Atsushi Enomoto <[email protected]>
* 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
2004-03-17 00:33:57 +00:00
Sebastien Pouliot 0770526333 2004-03-16 Sebastien Pouliot <[email protected]>
* 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
2004-03-16 19:56:56 +00:00
Sebastien Pouliot 0db94b32a3 2004-03-16 Sebastien Pouliot <[email protected]>
* SignedXml.cs: Commented my last changes to SignedXml as it made other
	unis tests fail (in the c14n-izer).

svn path=/trunk/mcs/; revision=24125
2004-03-16 13:28:17 +00:00
Atsushi Eno c7f2e80b27 2004-03-16 Atsushi Enomoto <[email protected]>
* XmlDsigNodeList.cs : removed BOM from code file.

svn path=/trunk/mcs/; revision=24124
2004-03-16 12:56:18 +00:00
Atsushi Eno 169eba649f 2004-03-16 Atsushi Enomoto <[email protected]>
* 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
2004-03-16 11:43:33 +00:00
Sebastien Pouliot 33be26a105 2004-03-15 Sebastien Pouliot <[email protected]>
* 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
2004-03-15 21:18:09 +00:00
Atsushi Eno 81da9185c6 2004-03-14 Atsushi Enomoto <[email protected]>
* XmlDsigXPathTransform.cs : implemented GetOutput() (with some
	  internal XPath context classes).

svn path=/trunk/mcs/; revision=24024
2004-03-14 19:38:16 +00:00
Atsushi Eno 8a9ebebc2e 2004-03-13 Atsushi Enomoto <[email protected]>
* XmlDsigXsltTransform.cs : LoadInnerXml() should just load stylesheet
	  and LoadInput() should just load transformed document.
	  Transformation should be done in GetOutput() because either of the
	  stylesheet or input can be loaded in prior. Adjusted code format.

svn path=/trunk/mcs/; revision=23983
2004-03-13 15:21:58 +00:00
Sebastien Pouliot 6a0ea78ade 2004-03-12 Sebastien Pouliot <[email protected]>
* 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
2004-03-12 22:37:04 +00:00
Atsushi Eno e0d0f2c7d7 2004-03-09 Atsushi Enomoto <[email protected]>
* 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
2004-03-11 21:38:32 +00:00
Atsushi Eno 9864f95aba 2004-03-09 Atsushi Enomoto <[email protected]>
* KeyInfoX509Data.cs : trivial local var name fix.

svn path=/trunk/mcs/; revision=23831
2004-03-09 15:50:47 +00:00
Atsushi Eno 042d4cd07a 2004-03-09 Atsushi Enomoto <[email protected]>
* KeyInfoX509Data.cs,
	  Reference.cs,
	  SignedInfo.cs,
	  XmlSignature.cs : GetElementsByTagName() should be eliminated or
	  at least should use namespace URI.

svn path=/trunk/mcs/; revision=23829
2004-03-09 14:43:10 +00:00
Atsushi Eno a026462b96 2004-03-04 Atsushi Enomoto <[email protected]>
* KeyInfo.cs :
	  Fixed LoadXml() to skip text nodes as MS.NET does.
	  Uncommented out RSAKeyValue.
	* Signature.cs : Fixed LoadXml(). Don't use GetElementsByTagName()
	  that incorrectly acquires descendants. Throw CryptographicException
	  if required elements were not found.
	* Transform.cs : added internal GetResolver().
	* XmlDsigXPathTransform.cs,
	  XmlDsigXsltTransform.cs : use XmlResolver.

svn path=/trunk/mcs/; revision=23711
2004-03-04 22:53:21 +00:00
Tim Coleman 002583484f 2004-02-19 Tim Coleman <[email protected]>
* SymmetricKeyWrap.cs:
                Add AES Key Wrap
        * EncryptedXml.cs:
                Add calls to SymmetricKeyWrap

svn path=/trunk/mcs/; revision=23253
2004-02-19 15:48:07 +00:00
Sebastien Pouliot 45c940d7fc 2004-02-11 Sebastien Pouliot <[email protected]>
* Reference.cs: Added LoadInnerXml to transforms. Removed unused
	variable.
	* Transform.cs: Import GetInnerXml in GetXml.
	* XmlDsigBase64Transform.cs: Now use a StreamWriter to avoid multiple
	allocations.
	* XmlDsigC14NTransform.cs: Added Stream support to LoadInput
	* XmlDsigXPathTransform.cs: Fixed GetInnerXml to include xpath
	expression and LoadInput. It nows match MS implementation but doesn't
	work like I think it should (but neither is MS implementation).

svn path=/trunk/mcs/; revision=22985
2004-02-11 18:09:07 +00:00
Tim Coleman da4f97eae4 2004-02-10 Tim Coleman <[email protected]>
* DataReference.cs EncryptedKey.cs EncryptedXml.cs
        * KeyInfoEncryptedKey.cs KeyReference.cs ReferenceList.cs
        * X509IssuerSerial.cs XmlDecryptionTransform.cs:
                Add new classes for Xml Encryption in 1.2
        * CipherData.cs CipherReference.cs EncryptedData.cs
        * EncryptedReference.cs EncryptionMethod.cs EncryptionProperty.cs :
                Change NamespaceURI reference to EncryptedXml class.
                Make compliant with 1.2
        * XmlEncryption.cs:
                Add new entity names.

svn path=/trunk/mcs/; revision=22962
2004-02-10 22:55:52 +00:00
Tim Coleman 05990a34a6 2004-02-07 Tim Coleman <[email protected]>
* CipherData.cs CipherReference.cs EncryptedData.cs
        * EncryptedReference.cs EncryptedType.cs EncryptionMethod.cs
        * EncryptionProperties.cs EncryptionProperty.cs XmlEncryption.cs:
                New classes added for Xml Encryption in 1.2
        * KeyInfoRetrievalMethod.cs:
                Added Type attribute for 1.2
        * XmlSignature.cs:
                Added string constants for algorithm namespaces

svn path=/trunk/mcs/; revision=22849
2004-02-07 05:02:23 +00:00
Sebastien Pouliot 9ff63f2031 2004-01-11 Sebastien Pouliot <[email protected]>
* 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
2004-01-12 01:26:55 +00:00
Sebastien Pouliot 49e8ac25c6 2003-12-14 Sebastien Pouliot <[email protected]>
* 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
2003-12-14 17:18:56 +00:00
Sebastien Pouliot ec7fe1d946 2003-07-27 Sebastien Pouliot <[email protected]>
* XmlSignature.cs: Changed USE_VERSION_1_0 for NET_1_0.

svn path=/trunk/mcs/; revision=16759
2003-07-28 03:43:24 +00:00
Sebastien Pouliot 17502535a6 2003-07-24 Sebastien Pouliot <[email protected]>
* XmlDsigC14NTransform.cs: Patch to use Mono.Xml.XmlCanonicalizer
	from Aleksey Sanin.

svn path=/trunk/mcs/; revision=16633
2003-07-25 00:22:17 +00:00
Nick Drochak d167326386 2003-06-19 Nick Drochak <[email protected]>
* DSAKeyValue.cs:
	* RSAKeyValue.cs: Work around for mcs? bug 45127.

svn path=/trunk/mcs/; revision=15496
2003-06-19 15:05:03 +00:00
Sebastien Pouliot 4dce7be6f7 2003-06-11 Sebastien Pouliot <[email protected]>
* SignedXml.cs: Changed USE_VERSION_1_0 for NET_1_0.
	* Transform.cs: Changed USE_VERSION_1_0 for NET_1_0.

svn path=/trunk/mcs/; revision=15357
2003-06-13 03:32:30 +00:00