diff options
author | Gert Driesen <drieseng@users.sourceforge.net> | 2008-10-14 22:33:13 +0400 |
---|---|---|
committer | Gert Driesen <drieseng@users.sourceforge.net> | 2008-10-14 22:33:13 +0400 |
commit | 19098dd864d9536086d004593e3e9a33bba2fb66 (patch) | |
tree | 92458eed054fc1207a75346ed1edb7ec6388c5c0 /mcs/class/System.Security/System.Security.Cryptography.Xml | |
parent | 2b9876326aa2aac5d1c87646eba5b524d9f7901b (diff) |
* XmlDsigXsltTranformTest.cs: Added test for .ctor (bool).
* XmlDsigEnvelopedTransformTest.cs: Added test for .ctor (bool). Use
Assert class. Improved properties tests.
* XmlDsigC14TransformTest.cs: Added test for .ctor (bool).
* XmlDsigExcC14NTransformTest.cs: Added .ctor tests and added asserts
IncludsiveNamespacesPrefixList
* XmlDsigExcC14NWithCommentsTransformTest.cs: Added basic .ctor and
properties tests.
* XmlDsigC14NWithCommentsTransformTest.cs: Fixed line endings.
* XmlLicenseTransformTest.cs: Added basic .ctor and properties tests.
* XmlDsigBase64Transform.cs: Use constant for Algorithm namespace.
* XmlDsigExcC14NTransform.cs: Fixed ctors to use WithComments
algorithm if includeComments is true. Assign includeNamespacesPrefixList
to instance field.
* XmlDsigExcC14NWithCommentsTransform.cs: Remove unnecessary
assignment to Algorithm now that base ctor is fixed.
* XmlDsigC14NWithCommentsTransform.cs: Remove unnecessary assignment
to Algorithm now that base ctor is fixed.
* XmlDsigC14NTransform.cs: In default ctor, just invoke .ctor (bool).
In .ctor (bool), assign WithComments algorithm if includeComments is
true. Use constants for Algorithm namespace.
* XmlDsigEnvelopedSignatureTransform.cs: Use constant for Algorithm
namespace.
* XmlDsigXPathTransform.cs: Use constant for Algorithm namespace.
* XmlDsigXsltTransform.cs: Use constant for Algorithm namespace.
* XmlLicenseTransform.cs: Assign Algorithm in ctor.
* XmlSignature.cs: Added constant for XmlLicenseTransform algorithm.
* System.Security_test.dll.sources: Added XmlLicenseTransformTest.cs
and XmlDsigExcC14NWithCommentsTransformTest.cs.
svn path=/trunk/mcs/; revision=115803
Diffstat (limited to 'mcs/class/System.Security/System.Security.Cryptography.Xml')
11 files changed, 36 insertions, 10 deletions
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog b/mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog index 96f3279b9a2..236ac498bde 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog +++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog @@ -1,3 +1,23 @@ +2008-10-14 Gert Driesen <drieseng@users.sourceforge.net> + + * XmlDsigBase64Transform.cs: Use constant for Algorithm namespace. + * XmlDsigExcC14NTransform.cs: Fixed ctors to use WithComments + algorithm if includeComments is true. Assign includeNamespacesPrefixList + to instance field. + * XmlDsigExcC14NWithCommentsTransform.cs: Remove unnecessary + assignment to Algorithm now that base ctor is fixed. + * XmlDsigC14NWithCommentsTransform.cs: Remove unnecessary assignment + to Algorithm now that base ctor is fixed. + * XmlDsigC14NTransform.cs: In default ctor, just invoke .ctor (bool). + In .ctor (bool), assign WithComments algorithm if includeComments is + true. Use constants for Algorithm namespace. + * XmlDsigEnvelopedSignatureTransform.cs: Use constant for Algorithm + namespace. + * XmlDsigXPathTransform.cs: Use constant for Algorithm namespace. + * XmlDsigXsltTransform.cs: Use constant for Algorithm namespace. + * XmlLicenseTransform.cs: Assign Algorithm in ctor. + * XmlSignature.cs: Added constant for XmlLicenseTransform algorithm. + 2008-10-12 Sebastien Pouliot <sebastien@ximian.com> * EncryptedReference.cs, EncryptedType.cs: Remove unneeded field diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigBase64Transform.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigBase64Transform.cs index adc3aa84d73..389c4ba9528 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigBase64Transform.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigBase64Transform.cs @@ -45,7 +45,7 @@ namespace System.Security.Cryptography.Xml { public XmlDsigBase64Transform () { - Algorithm = "http://www.w3.org/2000/09/xmldsig#base64"; + Algorithm = XmlSignature.AlgorithmNamespaces.XmlDsigBase64Transform; } public override Type[] InputTypes { diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigC14NTransform.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigC14NTransform.cs index 90b15cdb9ac..a42300efe00 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigC14NTransform.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigC14NTransform.cs @@ -48,14 +48,16 @@ namespace System.Security.Cryptography.Xml { private XmlCanonicalizer canonicalizer; private Stream s; - public XmlDsigC14NTransform () + public XmlDsigC14NTransform () : this (false) { - Algorithm = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"; - canonicalizer = new XmlCanonicalizer (false, false, PropagatedNamespaces); } public XmlDsigC14NTransform (bool includeComments) { + if (includeComments) + Algorithm = XmlSignature.AlgorithmNamespaces.XmlDsigC14NWithCommentsTransform; + else + Algorithm = XmlSignature.AlgorithmNamespaces.XmlDsigC14NTransform; canonicalizer = new XmlCanonicalizer (includeComments, false, PropagatedNamespaces); } diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigC14NWithCommentsTransform.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigC14NWithCommentsTransform.cs index 4360bf999b6..7d74479087d 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigC14NWithCommentsTransform.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigC14NWithCommentsTransform.cs @@ -35,7 +35,6 @@ namespace System.Security.Cryptography.Xml { public XmlDsigC14NWithCommentsTransform() : base (true) { - Algorithm = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"; } } } diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigEnvelopedSignatureTransform.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigEnvelopedSignatureTransform.cs index f8f27f7acd1..137d5c269b7 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigEnvelopedSignatureTransform.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigEnvelopedSignatureTransform.cs @@ -51,7 +51,7 @@ namespace System.Security.Cryptography.Xml { public XmlDsigEnvelopedSignatureTransform (bool includeComments) { - Algorithm = "http://www.w3.org/2000/09/xmldsig#enveloped-signature"; + Algorithm = XmlSignature.AlgorithmNamespaces.XmlDsigEnvelopedSignatureTransform; comments = includeComments; } diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigExcC14NTransform.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigExcC14NTransform.cs index 81541a7a8ae..ad86a95b4d7 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigExcC14NTransform.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigExcC14NTransform.cs @@ -67,7 +67,11 @@ namespace System.Security.Cryptography.Xml { public XmlDsigExcC14NTransform (bool includeComments, string inclusiveNamespacesPrefixList) { - Algorithm = XmlSignature.AlgorithmNamespaces.XmlDsigExcC14NTransform; + if (includeComments) + Algorithm = XmlSignature.AlgorithmNamespaces.XmlDsigExcC14NWithCommentsTransform; + else + Algorithm = XmlSignature.AlgorithmNamespaces.XmlDsigExcC14NTransform; + this.inclusiveNamespacesPrefixList = inclusiveNamespacesPrefixList; canonicalizer = new XmlCanonicalizer (includeComments, true, PropagatedNamespaces); } diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigExcC14NWithCommentsTransform.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigExcC14NWithCommentsTransform.cs index e77509ae4ee..27c6c9c3d27 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigExcC14NWithCommentsTransform.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigExcC14NWithCommentsTransform.cs @@ -37,7 +37,6 @@ namespace System.Security.Cryptography.Xml { public XmlDsigExcC14NWithCommentsTransform () : base (true) { - Algorithm = XmlSignature.AlgorithmNamespaces.XmlDsigExcC14NWithCommentsTransform; } public XmlDsigExcC14NWithCommentsTransform (string inclusiveNamespacesPrefixList) diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigXPathTransform.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigXPathTransform.cs index fc5ef061217..185e8b3dcd4 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigXPathTransform.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigXPathTransform.cs @@ -53,7 +53,7 @@ namespace System.Security.Cryptography.Xml public XmlDsigXPathTransform () { - Algorithm = "http://www.w3.org/TR/1999/REC-xpath-19991116"; + Algorithm = XmlSignature.AlgorithmNamespaces.XmlDsigXPathTransform; } public override Type [] InputTypes { diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigXsltTransform.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigXsltTransform.cs index 6ac486d5494..2bf7e416dde 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigXsltTransform.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigXsltTransform.cs @@ -55,7 +55,7 @@ namespace System.Security.Cryptography.Xml public XmlDsigXsltTransform (bool includeComments) { comments = includeComments; - Algorithm = "http://www.w3.org/TR/1999/REC-xslt-19991116"; + Algorithm = XmlSignature.AlgorithmNamespaces.XmlDsigXsltTransform; } public override Type [] InputTypes { diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlLicenseTransform.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlLicenseTransform.cs index 453ddc843e0..702e566220f 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlLicenseTransform.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlLicenseTransform.cs @@ -40,6 +40,7 @@ namespace System.Security.Cryptography.Xml { public XmlLicenseTransform () { + Algorithm = XmlSignature.AlgorithmNamespaces.XmlLicenseTransform; } public IRelDecryptor Decryptor { diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlSignature.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlSignature.cs index f6e8d5725bf..aba127bdf82 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlSignature.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlSignature.cs @@ -105,6 +105,7 @@ namespace System.Security.Cryptography.Xml { public const string XmlDsigExcC14NTransform = "http://www.w3.org/2001/10/xml-exc-c14n#"; public const string XmlDsigExcC14NWithCommentsTransform = "http://www.w3.org/2001/10/xml-exc-c14n#WithComments"; public const string XmlDecryptionTransform = "http://www.w3.org/2002/07/decrypt#XML"; + public const string XmlLicenseTransform = "urn:mpeg:mpeg21:2003:01-REL-R-NS:licenseTransform"; #endif } |