Commit Graph
342 Commits
Author SHA1 Message Date
Sebastien Pouliot 54587bcdea 2008-11-01 Sebastien Pouliot <[email protected]>
* System.Security_test.dll.sources: Add new tests to build
		System.Security.Cryptography.Pkcs/CmsRecipientCollectionTest.cs
		System.Security.Cryptography.Xml/TransformTest.cs
		System.Security.Cryptography.Xml/XmlDecryptionTransformTest.cs


svn path=/trunk/mcs/; revision=117623
2008-11-02 00:29:40 +00:00
Sebastien Pouliot bd6370ad74 2008-11-01 Sebastien Pouliot <[email protected]>
* 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
2008-11-02 00:25:45 +00:00
Sebastien Pouliot 899b4184dc 2008-11-01 Sebastien Pouliot <[email protected]>
* CmsRecipientCollection.cs: Add comment about compatibility-NRE
	[Found using Gendarme CheckParametersNullityInVisibleMethodsRule]


svn path=/trunk/mcs/; revision=117621
2008-11-02 00:22:45 +00:00
Sebastien Pouliot 1bad75202f 2008-11-01 Sebastien Pouliot <[email protected]>
* EncryptedXmlTest.cs: Add null check test cases for many methods.
	* SignedXmlTest.cs: New. Check that GetIdElement returns null when
	either parameter is null.
	* TransformTest.cs: New. Check null check behavior.
	* XmlDecryptionTransformTest.cs: New. Check null check behavior.
	* XmlDsigC14NTransformTest.cs: Confirm MS.NET NRE behavior inside
	GetDigestedOutput method.
	* XmlDsigExcC14NTransformTest.cs: Confirm MS.NET NRE behavior inside
	GetDigestedOutput method.


svn path=/trunk/mcs/; revision=117620
2008-11-02 00:21:25 +00:00
Sebastien Pouliot a484ae2897 2008-11-01 Sebastien Pouliot <[email protected]>
* CmsRecipientCollectionTest.cs: Verify NRE behavior of ctor.


svn path=/trunk/mcs/; revision=117619
2008-11-02 00:18:43 +00:00
Jonathan Pryor ee97d1824e Migrating from monodoc/class/System.Security to mcs/class/System.Security/Documentation...
svn path=/trunk/mcs/; revision=116214
2008-10-17 14:12:08 +00:00
Gert Driesen 19098dd864 * 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
2008-10-14 18:33:13 +00:00
Sebastien Pouliot dcb051c81a 2008-10-12 Sebastien Pouliot <[email protected]>
* EnvelopedCms.cs, SignedCms.cs: Remove unneeded field 
	initialization to their default values.
	[Found using Gendarme AvoidUnneededFieldInitializationRule]


svn path=/trunk/mcs/; revision=115569
2008-10-12 15:05:08 +00:00
Sebastien Pouliot aef5ecbb98 2008-10-12 Sebastien Pouliot <[email protected]>
* EncryptedReference.cs, EncryptedType.cs: Remove unneeded field
	initialization to their default values.
	[Found using Gendarme AvoidUnneededFieldInitializationRule]


svn path=/trunk/mcs/; revision=115568
2008-10-12 15:03:58 +00:00
Sebastien Pouliot 2e14e0c6c1 2008-10-12 Sebastien Pouliot <[email protected]>
* DataProtectionPermissionAttribute.cs, DataProtectionPermission.cs:
	Remove unneeded field initialization to their default values.
	[Found using Gendarme AvoidUnneededFieldInitializationRule]


svn path=/trunk/mcs/; revision=115567
2008-10-12 15:02:52 +00:00
Zoltan Varga f10ff05fc6 2008-10-08 Zoltan Varga <[email protected]>
* Makefile */Makefile build/profiles/*.make: Rename the 'default'
	profile to 'net_1_1'.

svn path=/trunk/mcs/; revision=115166
2008-10-08 05:58:51 +00:00
Marek Safar c078a41672 2008-09-23 Marek Safar <[email protected]>
* Makefile: Don't override global debug flag.


svn path=/trunk/mcs/; revision=113868
2008-09-23 17:47:42 +00:00
Sebastien Pouliot e6fd2f6754 2008-09-17 Sebastien Pouliot <[email protected]>
* 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
2008-09-17 19:10:48 +00:00
Sebastien Pouliot bc20013f7a 2008-09-17 Sebastien Pouliot <[email protected]>
* SignedXmlTest.cs: Add support for signing XML using HMACSHA256,
	HMACSHA384, HMACSHA512 and HMACRIPEMD160.
	[Fix bug #425724]


svn path=/trunk/mcs/; revision=113344
2008-09-17 19:10:13 +00:00
Gert Driesen 5a43c78379 * KeyInfoX509DataTest.cs
* SignedInfoTest.cs
* XmlDsigC14NTransformTest.cs
* XmlDsigExcC14NTransformTest.cs
* XmlDsigC14NWithCommentsTransformTest.cs
* ReferenceTet.cs
* SignatureTest.cs: Fixed line endings.

svn path=/trunk/mcs/; revision=110463
2008-08-14 06:19:36 +00:00
Atsushi Eno b6bd67e86b 2008-08-07 Atsushi Enomoto <[email protected]>
* set Algorithm in .ctor(bool), fixed bug #398904.


svn path=/trunk/mcs/; revision=109851
2008-08-07 12:24:18 +00:00
Sebastien Pouliot 3f7129f550 2008-08-06 Sebastien Pouliot <[email protected]>
* XmlDsigC14NTransform.cs,
	* XmlDsigExcC14NTransform.cs
	* XmlDsigXsltTransform.cs: Don't use is + as.
	[Found using Gendarme AvoidRepetitiveCastsRule]


svn path=/trunk/mcs/; revision=109819
2008-08-07 02:05:52 +00:00
Sebastien Pouliot 5ae85e3077 2008-06-28 Sebastien Pouliot <[email protected]>
* XmlDecryptionTransform.cs,
	* XmlDsigC14NTransform.cs,
	* XmlDsigEnvelopedSignatureTransform.cs,
	* XmlDsigExcC14NTransform.cs,
	* XmlDsigXsltTransform.cs: Replace Type.GetType("x") into typeof(x)
	[Found using Gendarme AvoidTypeGetTypeForConstantStringsRule]


svn path=/trunk/mcs/; revision=106840
2008-06-28 19:22:09 +00:00
Sebastien Pouliot 6341269da0 2008-05-25 Sebastien Pouliot <[email protected]>
* XmlDecryptionTransform.cs,
	* XmlDsigBase64Transform.cs,
	* XmlDsigC14NTransform.cs,
	* XmlDsigEnvelopedSignatureTransform.cs,
	* XmlDsigExcC14NTransform.cs,
	* XmlDsigXPathTransform.cs,
	* XmlDsigXsltTransform.cs,
	* XmlLicenseTransform.cs: Don't use lock(this). In fact remove locking
	since the worse that can happen is two copies of the same data.
	[Found using Gendarme]


svn path=/trunk/mcs/; revision=104039
2008-05-25 21:52:19 +00:00
Sebastien Pouliot 0a59629d4a 2008-05-25 Sebastien Pouliot <[email protected]>
* XmlDsigBase64TransformTest.cs: Add test case for InputTypes
	* XmlDsigExcC14NTransformTest.cs: Add test case for InputTypes


svn path=/trunk/mcs/; revision=104038
2008-05-25 21:50:08 +00:00
Andreas N efe027f165 2008-04-25 Andreas Nahr <[email protected]>
* AssemblyInfo.cs: Change to consts

svn path=/trunk/mcs/; revision=101802
2008-04-25 12:56:43 +00:00
Raja R Harinath 264c06c083 In .:
* Makefile (_boot_): Orchestrate the net_2_1 bootstrap.
	(net_2_1_bootstrap_SUBDIRS, net_2_1_raw_SUBDIRS): New.

In build:
	* profiles/net_2_1_bootstrap.make: New.
	* profiles/net_2_1_raw.make: New.  The untuned 2.1 profile.
	* profiles/net_2_1.make: New.  The tuned 2.1 profile.
	* Makefile (PROFILES): Update.

In class:
	* Makefile (net_3_5_dirs): Remove System.Xml.Linq, now that it's
	built in the 2.0 profile.

In class/System:
	* Makefile (CYCLIC_DEPS): New macro.
	(CYCLIC_DEP_FILES): Use it to clean up handling of cyclic dependencies.
	* net_2_1_raw_System.dll.sources: Rename from net_2_1_System.dll.sources.
	* net_2_1_bootstrap_System.dll.sources: New.

In class/corlib:
	* Makefile (LIBRARY_COMPILE) [net_2_1]: Remove special case.

In errors:
	* Makefile: Enable testing net_2_1 profile.

In mcs:
	* Makefile (GMCS_PROFILE): Remove.
	(COMPILER_NAME): New helper.

In tests:
	* Makefile: Enable smcs testing.

In tools:
	* Makefile (net_2_1_raw_SUBDIRS): New.

In tools/compiler-tester:
	* Makefile [PROFILE=net_2_1]: Copy file from net_2_1_raw profile.
	* compiler-tester.cs: Work better with 'net_2_1' profiles.

In tools/tuner:
	* Makefile: Improve.  Update to new net_2_1 profiles.  Specify
	more dependencies.  Do work only when necessary.
	* Descriptors/smcs.xml: Add CompilerCallableEntryPoint.

svn path=/trunk/mcs/; revision=95989
2008-02-17 17:54:22 +00:00
Sebastien Pouliot 4cd3a5eed1 2008-02-10 Sebastien Pouliot <[email protected]>
* NativeDapiProtection.cs: Don't call GetLastWin32Error so late and
	use the value we already have from a previous call. Found using 
	Gendarme.


svn path=/trunk/mcs/; revision=95404
2008-02-10 20:28:55 +00:00
Sebastien Pouliot 649084c451 2008-01-12 Sebastien Pouliot <[email protected]>
* ReferenceList.cs: Avoid infinite recursion when setting []. 
	Found by Gendarme.
	* XmlDsigXPathTransform.cs: Fix direct comparison with NaN. Found 
	by Gendarme.


svn path=/trunk/mcs/; revision=92756
2008-01-12 16:58:39 +00:00
Atsushi Eno 63b1a04ec2 2007-11-13 Atsushi Enomoto <[email protected]>
* XmlDsigExcC14NTransform.cs : removed extra [ComVisible].


svn path=/trunk/mcs/; revision=89546
2007-11-13 11:40:41 +00:00
Marek Safar 2bf3bfd6c0 2007-06-12 Marek Safar <[email protected]>
* Makefile: Check only major framework version to do 2.x build.


svn path=/trunk/mcs/; revision=79315
2007-06-12 16:59:23 +00:00
Atsushi Eno bacad2cd34 2007-03-22 Atsushi Enomoto <[email protected]>
* XmlCanonicalizer.cs : fill prefixes which should be actually
	  written. It must be actually done before canonicalization (so
	  that node list filtering still takes spec-conformant effect).

	* Transform.cs, XmlDsigC14NTransform.cs, XmlDsigExcC14NTransform.cs :
	  handle PropagatedNamespaces.

	* XmlDsigC14NTransformTest.cs : added test for xmlns attribute 
	  completion for input nodes, as well as test for
	  PropagatedNamespaces (ignored so far).


svn path=/trunk/mcs/; revision=74812
2007-03-22 15:29:11 +00:00
Atsushi Eno dcf1584c86 2007-02-01 Atsushi Enomoto <[email protected]>
* 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
2007-02-01 18:29:34 +00:00
Atsushi Eno b2f49647aa 2007-01-25 Atsushi Enomoto <[email protected]>
* 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
2007-01-25 09:57:57 +00:00
Atsushi Eno 037c955757 2007-01-23 Atsushi Enomoto <[email protected]>
* DataObject.cs : it should not append created DataObject element to
	  the owner document. It affects on XPath selection, though currently
	  SignedXml.GetReferenceHash() is bogus so I cannot add meaningful
	  tests for it.

	* XmlCanonicalizer.cs : in Canonicalize(XmlNodeList), nodes [0] could
	  be XmlDocument and thus it could cause NullReferenceException.


svn path=/trunk/mcs/; revision=71540
2007-01-23 18:48:18 +00:00
Atsushi Eno f237dd4a61 2007-01-23 Atsushi Enomoto <[email protected]>
* SignedXmlTest.cs : fixed ambiguous variable name in previous tests.


svn path=/trunk/mcs/; revision=71530
2007-01-23 17:45:35 +00:00
Atsushi Eno 34dc209f21 2007-01-23 Atsushi Enomoto <[email protected]>
* 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
2007-01-23 17:40:38 +00:00
Atsushi Eno 6e62bf5a02 2007-01-22 Atsushi Enomoto <[email protected]>
* XmlDsigExcC14NTransformTest.cs, XmlDsigC14NTransformTest.cs,
	  SignedXmlTest.cs : added some more tests which blocks indigo.


svn path=/trunk/mcs/; revision=71462
2007-01-22 20:48:17 +00:00
Atsushi Eno db6d5d50c3 2007-01-22 Atsushi Enomoto <[email protected]>
* XmlCanonicalizer.cs : Fixed incorect is-visibly-utilized check. Got
	  Phaos tests passed.

	* SignedInfo.cs : removed incorrect CanonicalizationMethodObject
	  implementation.
	* EncryptedReference.cs : added exc-c14n support in LoadXml().


svn path=/trunk/mcs/; revision=71452
2007-01-22 18:27:02 +00:00
Atsushi Eno a0c14ae0ea 2007-01-17 Atsushi Enomoto <[email protected]>
* XmlCanonicalizer.cs : don't output default namespace when the node's
	  namespace is not empty. Check "visibly utilized" namespace nodes in
	  exc-c14n. Also, in exc-c14n, rendered namespaces are not written.
	  Added InclusiveNamespaces PrefixList field (not in use yet).

	* XmlDsigExcC14NTransform.cs :
	  re-imported from XmlDsigC14NTransform.cs.

	* System.Security_test.dll.sources : added
	  XmlDsigExcC14NTransformTest.cs.

	* XmlDsigExcC14NTransformTest.cs : new tests, mostly copied from
	  non-exc test.

	* xmldsig.cs : exc-c14n tests could be run under 2.0 profile (and
	  they are not working correctly yet).
	* Makefile : Added net_2_0 profile support.


svn path=/trunk/mcs/; revision=71220
2007-01-17 17:30:12 +00:00
Atsushi Eno 255664a33f 2007-01-12 Atsushi Enomoto <[email protected]>
* 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
2007-01-12 14:35:05 +00:00
Atsushi Eno c74b0f26b9 2007-01-12 Atsushi Enomoto <[email protected]>
* DataObject.cs : don't clear attributes or children unnecessarily.

	* DataObjectTest.cs : test to make sure to not clear attributes or
	  children unnecessarily.


svn path=/trunk/mcs/; revision=70916
2007-01-12 12:22:39 +00:00
Atsushi Eno 56d4be2982 2007-01-12 Atsushi Enomoto <[email protected]>
* 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
2007-01-12 10:51:17 +00:00
Atsushi Eno 7dba740284 2007-01-12 Atsushi Enomoto <[email protected]>
* SignedXml.cs : ComputeSignature() should check empty key.

	* SignedXmlTest.cs : added ComputeSignatureNoSigningKey().


svn path=/trunk/mcs/; revision=70909
2007-01-12 10:24:09 +00:00
Sebastien Pouliot f9313c73a5 2006-12-15 Sebastien Pouliot <[email protected]>
* Makefile: Execute PKITS tests only if the data is installed locally.
	See System.dll unit tests for details.
	* System.Security_test.dll.sources: Add some PKITS unit tests to the
	build.


svn path=/trunk/mcs/; revision=69543
2006-12-15 19:30:52 +00:00
Sebastien Pouliot 77cbf17b0d 2006-12-15 Sebastien Pouliot <[email protected]>
* SignedCms.cs: Add missing TODO. Some code exists but depends on 
	other, unimplemented, stuff.


svn path=/trunk/mcs/; revision=69542
2006-12-15 19:29:32 +00:00
Sebastien Pouliot d028b96e90 2006-12-15 Sebastien Pouliot <[email protected]>
* PkitsTest.cs: New. Common test code to use the PKITS test data.
	* Pkits_4_01_SignatureVerification.cs: New. Test signature on S/MIME
	using the PKITS test data (if available).


svn path=/trunk/mcs/; revision=69541
2006-12-15 19:27:50 +00:00
Sebastien Pouliot a7fa1e7330 2006-11-08 Sebastien Pouliot <[email protected]>
* System.Security_test.dll.sources: Added unit and CAS tests for 
	System.Security.Cryptography.X509Certificates.X509Certificate2UI


svn path=/trunk/mcs/; revision=67535
2006-11-08 14:52:43 +00:00
Sebastien Pouliot b38770bbb7 2006-11-08 Sebastien Pouliot <[email protected]>
* X509Certificate2UICas.cs: New (2.0) CAS tests for X509Certificate2UI
	* X509Certificate2UITest.cs: New (2.0) unit tests for 
	X509Certificate2UI


svn path=/trunk/mcs/; revision=67534
2006-11-08 14:51:41 +00:00
Sebastien Pouliot c662f360fd 2006-11-08 Sebastien Pouliot <[email protected]>
* X509Certificate2UI.cs: Fix exceptions, add security attributes and
	notes.


svn path=/trunk/mcs/; revision=67533
2006-11-08 14:50:54 +00:00
Atsushi Eno 55518449de 2006-11-01 Atsushi Enomoto <[email protected]>
* SignedXmlTest.cs : added Ignore for failing wrong test by design.


svn path=/trunk/mcs/; revision=67193
2006-10-31 21:44:10 +00:00
Atsushi Eno ec958572d6 2006-10-11 Atsushi Enomoto <[email protected]>
* 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
2006-10-10 23:11:22 +00:00
Gert Driesen c2231bcd2c * SignedXmlTest.cs: Added tests for bug #79454 and #79483 (marked NotWorking).
Set eol-style to native.

svn path=/trunk/mcs/; revision=65894
2006-09-25 21:20:53 +00:00
Atsushi Eno 24da8a2f2a 2006-09-22 Atsushi Enomoto <[email protected]>
* EncryptedXml.cs : use Padding member instead of const ISO10126 (though
	  I doubt it should be there). Use it in DecryptData().

	* EncryptedXmlTest.cs, EncryptedXmlSample3.xml :
	  another decryption test for padding sanity.

	* Makefile:
	  Added Test/S.S.C.Xml/EncryptedXmlSample3.xml to EXTRA_DISTFILES.


svn path=/trunk/mcs/; revision=65804
2006-09-22 04:32:02 +00:00
Atsushi Eno 614d7f4d2f 2006-09-21 Atsushi Enomoto <[email protected]>
* EncryptedXml.cs : implement orthodox padding on encryption.

	* EncryptedXmlTest.cs : added roundtrip sample i.e. encryption test.


svn path=/trunk/mcs/; revision=65800
2006-09-22 01:16:12 +00:00