Commit Graph
319 Commits
Author SHA1 Message Date
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
Atsushi Eno 5fa64e2d8c 2006-09-21 Atsushi Enomoto <[email protected]>
* Makefile: oops, syntax breakage.


svn path=/trunk/mcs/; revision=65767
2006-09-21 14:14:54 +00:00
Atsushi Eno 8d2ce38aae 2006-09-21 Atsushi Enomoto <[email protected]>
* EncryptedXml.cs :
	  Handle orthodox padding (xmlenc spec section 5.2). However, like 
	  EncryptedXmlSample1, it might not exist, so make it optional.

	* EncryptedXmlTest.cs, EncryptedXmlSample2.xml :
	  Added another case that expects correct padding processing which is 
	  specified in W3C xmlenc spec section 5.2.

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


svn path=/trunk/mcs/; revision=65766
2006-09-21 14:10:41 +00:00
Atsushi Eno 323f2b939c 2006-09-21 Atsushi Enomoto <[email protected]>
* EncryptedXmlTest.cs :
	  removed problematic culture change (was for debugging).


svn path=/trunk/mcs/; revision=65760
2006-09-21 12:50:51 +00:00
Atsushi Eno eb9e570294 2006-09-21 Atsushi Enomoto <[email protected]>
* EncryptedXml.cs : True fix for DecryptData(). It indeed uses block size
	  (or possibly IV size) in Transform(), but only for stripping the heading
	  n bytes garbage.

	* EncryptedXmlTest.cs : new file. Added practical example.
	* EncryptedXmlSample1.xml, sample.pfx : support files for the above test.

	* System.Security_test.dll.sources: added EncryptedXmlTest.cs.
	* Makefile: added some extra test support files as EXTRA_DISTFILES.


svn path=/trunk/mcs/; revision=65750
2006-09-21 07:25:48 +00:00
Atsushi Eno a09f566ab1 2006-09-20 Atsushi Enomoto <[email protected]>
* 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
2006-09-20 17:58:51 +00:00
Atsushi Eno 92fa75bd2c 2006-09-20 Atsushi Enomoto <[email protected]>
* SignedXml.cs : handle KeyInfoX509Data in GetPublicKey(). Fixed #1 of
	  bug #79454.


svn path=/trunk/mcs/; revision=65727
2006-09-20 16:35:24 +00:00
Atsushi Eno bab5d554e1 2006-09-07 Atsushi Enomoto <[email protected]>
* EncryptedXml.cs : DecryptData() should not pass block size to
	  Transform() as the index.


svn path=/trunk/mcs/; revision=65071
2006-09-07 17:20:19 +00:00
Atsushi Eno 690296b936 2006-09-06 Atsushi Enomoto <[email protected]>
* CipherReference.cs, EncryptedReference.cs : unify duplicate code.
	  Remove incorrect name check in the latter class so that it works
	  for DataReference and KeyReference as well.

	* DataReferenceTest.cs : new test.

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


svn path=/trunk/mcs/; revision=64990
2006-09-06 10:30:58 +00:00
Kornél Pál 546a1134d2 Converted source files to UTF-8 (without byte order mark). Use UTF-8 as the default encoding for compilers.
svn path=/trunk/mcs/; revision=64941
2006-09-05 13:54:12 +00:00
Sebastien Pouliot 74e8f43fa0 2006-05-31 Sebastien Pouliot <[email protected]>
* KeyInfoClause.cs: Under 2.0 the ctor is protected.
	* Transform.cs: Under 2.0 the ctor is protected. Enable the use of 
	XmlSecureResolver when the security manager is active.


svn path=/trunk/mcs/; revision=61337
2006-05-31 14:55:33 +00:00
Atsushi Eno 6fdeb62eef 2006-01-30 Atsushi Enomoto <[email protected]>
* XmlDsigEnvelopedSignatureTransform.cs :
	  It should not remove nodes in another XmlNodeList while its
	  iterator is in active use. This is exposed by the recent
	  XmlNodeList change.


svn path=/trunk/mcs/; revision=56250
2006-01-30 14:23:28 +00:00
Sebastien Pouliot 15cb8df83c 2005-11-09 Sebastien Pouliot <[email protected]>
* X509SelectionFlag.cs: Removed extra [Serializable].


svn path=/trunk/mcs/; revision=52789
2005-11-09 15:33:15 +00:00
Kornél Pál e36848f82d Updated runtime version to v2.0.50727 (2.0 RTM). Use Consts.MonoVersion, Consts.FxFileVersion and Consts.VsFileVersion in assembly attributes. Use Consts.RuntimeVersion as Environment.Version that makes maintenance easier.
svn path=/trunk/mcs/; revision=52607
2005-11-05 10:50:01 +00:00
Sebastien Pouliot 120b9ed232 2005-10-28 Sebastien Pouliot <[email protected]>
* AssemblyInfo.cs: Updated for 2.0 final.


svn path=/trunk/mcs/; revision=52319
2005-10-28 13:45:08 +00:00
Sebastien Pouliot b6487e1ece Added internal class Mono.Security.Cryptography.NativeDapiProtection to the build
svn path=/trunk/mcs/; revision=52283
2005-10-27 13:46:33 +00:00
Sebastien Pouliot f712b8fd3f 2005-10-27 Sebastien Pouliot <[email protected]>
* ProtectedData.cs: Added support for Windows (2000 and later) by 
	p/invoking DPAPI thru Mono.Security.Cryptography.NativeDapiProtection.


svn path=/trunk/mcs/; revision=52282
2005-10-27 13:46:03 +00:00
Sebastien Pouliot 7c505165df 2005-10-27 Sebastien Pouliot <[email protected]>
* NativeDapiProtection.cs: New. Native access to DPAPI (Data 
	Protection API) to implement ProtectedData on Windows (requires 
	Windows 2000 or later).


svn path=/trunk/mcs/; revision=52281
2005-10-27 13:44:19 +00:00
Sebastien Pouliot 79edec6fa6 Added new unit/CAS tests for System.Security.Cryptography namespace. Ignore some warnings during tests compilation. Added internal ManagedProtection class to the build.
svn path=/trunk/mcs/; revision=52001
2005-10-20 19:15:32 +00:00
Sebastien Pouliot de26591ab9 2005-10-20 Sebastien Pouliot <[email protected]>
* CryptographicAttributeCollection.cs: Fixed Add and Remove methods.
	* ProtectedMemory.cs: Implemented (unmanaged) for Windows only.
	* ProtectedData.cs: Implemented for everything except Windows ;-) by
	using the new ManagedProtection class.


svn path=/trunk/mcs/; revision=52000
2005-10-20 19:14:00 +00:00
Sebastien Pouliot 70ced1644f 2005-10-20 Sebastien Pouliot <[email protected]>
* ManagedProtection.cs: New. A managed class similar to ProtectedData.
	Source code will be reused in other assemblies to protect data.

svn path=/trunk/mcs/; revision=51999
2005-10-20 19:13:03 +00:00
Sebastien Pouliot e6e724d234 2005-10-20 Sebastien Pouliot <[email protected]>
* CryptographicAttributeObjectCas.cs: New. CAS unit tests.
	* CryptographicAttributeObjectEnumeratorCas.cs: New. CAS unit tests.
	* CryptographicAttributeObjectEnumeratorTest.cs: New. Unit tests.
	* CryptographicAttributeObjectCollectionCas.cs: New. CAS unit tests.
	* CryptographicAttributeObjectCollectionTest.cs: New. Unit tests.
	* ProtectedDataCas.cs: New. CAS unit tests.
	* ProtectedDataTest.cs: Reworked/complete unit tests.
	* ProtectedMemoryCas.cs: New. CAS unit tests.
	* ProtectedMemoryTest.cs: Reworked/complete unit tests.


svn path=/trunk/mcs/; revision=51996
2005-10-20 18:40:44 +00:00
Sebastien Pouliot a3a3c06b24 2005-10-20 Sebastien Pouliot <[email protected]>
* DataProtectionPermission.cs: Fixed Flags property to allow multiple 
	values.


svn path=/trunk/mcs/; revision=51995
2005-10-20 18:37:33 +00:00
Sebastien Pouliot 9d0db2f26d 2005-09-27 Sebastien Pouliot <[email protected]>
* X509Certificate2UI.cs: Hide constructor (it should have been a 
	static class). Fixed Display/DisplayCertificate method name.


svn path=/trunk/mcs/; revision=50862
2005-09-27 14:02:18 +00:00