Commit Graph
30 Commits
Author SHA1 Message Date
Miguel de Icaza 0699e4da36 Fix warnings in mscorlib's Test suite + bring a couple more tests + fix thread rename test 2014-09-23 10:56:04 -04:00
Sebastien Pouliot 4e60ea839a Fix old test cases so it's easier to reuse for the mobile profile / nunitlite 2012-03-22 20:34:34 -04:00
Gonzalo Paniagua Javier 7912621a54 Buffer sizes
workingBlock should be the InputBlockSize and currentBlock the
	OutputBlockSize. Allocate currentBlock lazily.

	Test contributed by Bassam Tabbara.
	Fixes bug #644740.
2010-10-08 15:31:43 -04:00
Gonzalo Paniagua Javier 8d29212331 [CryptoStream] Invalid enum in ctor
Throw on invalid enum value in the ctor.
2010-10-08 15:31:43 -04:00
Gonzalo Paniagua Javier 1ffb522d65 Dispose calls FlushFinalBlock
Dispose calls FlushFinalBlock (even for Read mode) and this in turn
	calls either FlushFinalBlock or Flush on the underlying stream.
2010-10-08 15:31:43 -04:00
Gonzalo Paniagua Javier 8fbfdf3790 Fix CryptoStream.Dispose
-Dispose will call TransformFinalBlock() for Read streams. Fixes bug #644648.
	-Dispose () will call Dispose (bool). Fixes bug #644654.
	-Stream.Close calls GC.SuppressFinalize(). Fixes bug #644660.
2010-10-07 14:59:52 -04:00
Sebastien Pouliot 63476c73a4 In Test/System.Security.Cryptography:
2009-09-22  Sebastien Pouliot  <[email protected]> 

	* CryptoStreamTest.cs: Add (nunit-ized) test cases provided by
	Santa Marta (via Atsushi) as repro for bugs #539288 and #539229

In System.Security.Cryptography:
2009-09-22  Sebastien Pouliot  <[email protected]>

	* CryptoStream.cs: Fix [Input|Output]BlockSize for custom streams.
	Patches by Santa Marta (via Atsushi).
	[Fix bug #539288 and #539229]


svn path=/trunk/mcs/; revision=142435
2009-09-22 19:48:12 +00:00
Sebastien Pouliot d3b0f1e249 2009-09-22 Sebastien Pouliot <[email protected]>
* CryptoStreamTest.cs: Convert to newer nunit syntax


svn path=/trunk/mcs/; revision=142413
2009-09-22 15:53:19 +00:00
Sebastien Pouliot dcfcd9ccc6 2007-05-16 Sebastien Pouliot <[email protected]>
* CryptoStreamTest.cs: Add test cases for WriteByte.


svn path=/trunk/mcs/; revision=77517
2007-05-16 22:20:05 +00:00
Sebastien Pouliot 99f85f2898 2007-03-22 Sebastien Pouliot <[email protected]>
* CryptoStreamTest.cs: Fixed some test cases to work properly on MS
	fx 2.0.

svn path=/trunk/mcs/; revision=74818
2007-03-22 16:48:34 +00:00
Sebastien Pouliot a3f776bbdd 2007-02-14 Sebastien Pouliot <[email protected]>
* CryptoConfigTest.cs: Adjust line-endings.
	* CryptoStreamTest.cs: Adjust line-endings.
	* DESTest.cs: Adjust line-endings.
	* DSACryptoServiceProviderTest.cs: Adjust line-endings.
	* DSATest.cs: Adjust line-endings.
	* RSACryptoServiceProviderTest.cs: Adjust line-endings.


svn path=/trunk/mcs/; revision=72893
2007-02-15 02:00:27 +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
Raja R Harinath e0cfa4925e Set svn:eol-style=native, delete svn:executable.
Fix line endings of System/Decimal.cs (only actual "change" in text, to force recompile of mscorlib to reflect changes in decimal constant handling in the compiler)


svn path=/trunk/mcs/; revision=44558
2005-05-16 12:23:26 +00:00
Sebastien Pouliot 9ae1e27f51 2005-03-30 Sebastien Pouliot <[email protected]>
* CryptoStreamTest.cs: Added test case when when no padding is used.


svn path=/trunk/mcs/; revision=42402
2005-03-30 22:54:01 +00:00
Ben Maurer ef310c002a typo
svn path=/trunk/mcs/; revision=40901
2005-02-19 03:24:35 +00:00
Ben Maurer 8a2c3a6645 avoid writing stuff to the assembly dir. use the temp folder
svn path=/trunk/mcs/; revision=40900
2005-02-19 02:02:23 +00:00
Ben Maurer faad63f1ab NotWorking fixes for 2.0
svn path=/trunk/mcs/; revision=40785
2005-02-17 04:04:54 +00:00
Sebastien Pouliot c3da8c2678 2005-01-19 Sebastien Pouliot <[email protected]>
* CryptoStreamTest.cs: Added [ExpectedException] for [Ignored] unit 
	tests that were converted to [Category]


svn path=/trunk/mcs/; revision=39190
2005-01-19 18:26:46 +00:00
Sebastien Pouliot 899535892d 2005-01-10 Sebastien Pouliot <[email protected]>
* CryptoStreamTest.cs, DSACryptoServiceProviderTest.cs,
	HashAlgorithmTest.cs, PKCS1MaskGenerationMethodTest.cs,
	RSAPKCS1KeyExchangeFormatterTest.cs, ToBase64TransformTest.cs:
	Use [Category ("NotDotNet")] for tests failing only on the MS runtime
	(so they are now executed on Mono).


svn path=/trunk/mcs/; revision=38614
2005-01-10 13:35:36 +00:00
Sebastien Pouliot ef2cd716e2 2005-01-04 Sebastien Pouliot <[email protected]>
* CryptoStreamTest.cs: Undo some previous fixes that have changed from
	2.0 Nov CTP. Stream chaining was working on Nov CTP but are failing 
	again with Dec.


svn path=/trunk/mcs/; revision=38317
2005-01-04 16:20:04 +00:00
Sebastien Pouliot ff688f36c7 2004-12-23 Sebastien Pouliot <[email protected]>
* CryptoStreamTest.cs: Fixed tests to execute properly on 2.0 Nov CTP.
	* DSACryptoServiceProviderTest.cs: Fixed tests to execute properly on 
	2.0 Nov CTP.
	* PaddingModeTest.cs: Fixed tests to execute properly on 2.0 Nov CTP.
	* RSACryptoServiceProviderTest.cs: Fixed tests to execute properly on 
	2.0 Nov CTP.


svn path=/trunk/mcs/; revision=38061
2004-12-23 14:28:11 +00:00
Sebastien Pouliot 1d2f1d82f4 2004-07-07 Sebastien Pouliot <[email protected]>
* AllTests2.cs: Updated to NUnit 2.2 Assert.
	* CipherModeTest.cs: New. Tests supported CipherMode for all
	SymmetricAlgorithm included in the framework (enum contains two more
	modes that aren't implemented in any Fx version).
	* CryptoConfigTest.cs: Ajusted new OID (for old names) in Fx 2.0.
	* CryptoStreamTest.cs: Fixed different reported exception in Fx 2.0.
	Fixed a bad test.
	* CspProviderFlagsTest.cs: New. Test the values of the enum.
	* DSACryptoServiceProviderTest.cs: Added new tests for new public
	properties and methods added in Fx 2.0. Duplicated test to import a
	key pair into a disposed instance (works in Fx 2.0). Removed all
	[Ignore]s in NET_2_0 as the MS class/runtime has been fixed.
	* DSASignatureDeformatterTest.cs: Converted from NUnit 1 to 2.2. Fixed
	different reported exception in Fx 2.0.
	* DSASignatureFormatterTest.cs: Converted from NUnit 1 to 2.2. Fixed
	different reported exception in Fx 2.0.
	* HMACRIPEMD160Test.cs: Fixed tests using TransformFinalBlock.
	* HMACSHA1Test.cs: Fixed tests so they work on both NET_1_1 and
	NET_2_0 profiles (as HMACSHA1 changed it's base class).
	* HashAlgorithmTest.cs: Fixed different reported exception in Fx 2.0.
	Removed [Ignore] in NET_2_0 as the MS class/runtime has been fixed.
	* MACTripleDESTest.cs: Fixed tests so they work on both NET_1_1 and
	NET_2_0 profiles.
	* PKCS1MaskGenerationMethodTest.cs: Removed [Ignore] in NET_2_0 as the
	MS class has been fixed.
	* PaddingModeTest.cs: Added new tests for the two new padding mode
	introduced in Fx 2.0. Converted to NUnit 2.2.
	* PasswordDeriveBytesTest.cs: Removed [ExpectedException] for
	StrangeBehaviour test as it is fixed in Fx 2.0.
	* RC2Test.cs: Changed exception from CryptographicException to
	CryptographicUnexpectedOperationException for Fx 1.1/2.0.
	* RIPEMD160Test.cs: Fixed tests using TransformFinalBlock.
	* RSACryptoServiceProviderTest.cs: Added new tests for new public
	properties and methods added in Fx 2.0. Duplicated test to import a
	key pair into a disposed instance (works in Fx 2.0). Duplicated test
	to sign with a null OID (Fx 2.0 use SHA1 oid in this case).
	* RSAOAEPKeyExchangeDeformatterTest.cs: Changed exception for a key
	exchange with no key (to match Fx 2.0).
	* RSAOAEPKeyExchangeFormatterTest.cs: Changed exception for a key
	exchange with no key (to match Fx 2.0).
	* RSAPKCS1KeyExchangeFormatterTest.cs: Changed exception for a key
	exchange with no key (to match Fx 2.0). Removed [Ignore] in NET_2_0 as
	the MS class/runtime has been fixed.
	* RSAPKCS1SignatureDeformatterTest.cs: Null keys, in constructor or in
	SetKey method, now throw an ArgumentNullException in Fx 2.0.
	* RSAPKCS1SignatureFormatterTest.cs: Null keys, in constructor or in
	SetKey method, now throw an ArgumentNullException in Fx 2.0.
	* Rfc2898DeriveBytesTest.cs: Typecasted a null as a string.
	* SymmetricAlgorithm2Test.cs: In Fx 2.0 an empty IV now throws a
	CryptographicException.
	* ToBase64TransformTest.cs: Fixed different reported exception in Fx 2.0.
	Removed [Ignore] in NET_2_0 as the MS class/runtime has been fixed.

svn path=/trunk/mcs/; revision=30836
2004-07-07 14:20:04 +00:00
Sebastien Pouliot 8c8082be00 2004-06-23 Sebastien Pouliot <[email protected]>
* CryptoStreamTest.cs: Added two tests for bug #60573. One shows that
	an encryptor doesn't reduce the number of block on Write while the
	second shows that a decryptor does reduce the number of blocks on
	Write.

svn path=/trunk/mcs/; revision=30200
2004-06-23 14:39:00 +00:00
Sebastien Pouliot 3d66415c6e 2004-05-26 Sebastien Pouliot <[email protected]>
* CryptoStreamTest.cs: Added new unit tests for overflows.

svn path=/trunk/mcs/; revision=28211
2004-05-27 00:28:58 +00:00
Sebastien Pouliot 2584b0aaf2 2004-05-20 Sebastien Pouliot <[email protected]>
* CryptoStreamTest.cs, DESCryptoServiceProviderTest.cs,
	DSACryptoServiceProviderTest.cs, DSATest.cs, FromBase64Transform.cs,
	HMACRIPEMD160Test.cs, MD5Test.cs, PKCS1MaskGenerationMethodTest.cs,
	RIPEMD160ManagedTest.cs, RNGCryptoServiceProviderTest.cs,
	RSACryptoServiceProviderTest.cs, RSAOAEPKeyExchangeDeformatterTest.cs,
	RSAOAEPKeyExchangeFormatterTest.cs, RSAPKCS1KeyExchangeDeformatterTest.cs,
	RSAPKCS1KeyExchangeFormatterTest.cs, RSAPKCS1SignatureDeformatterTest.cs,
	RSAPKCS1SignatureFormatterTest.cs, RSATest.cs: SetUp/TearDown are now
	public (required for new nunit).

svn path=/trunk/mcs/; revision=27790
2004-05-21 01:03:41 +00:00
Sebastien Pouliot 9706939834 2004-02-12 Sebastien Pouliot <[email protected]>
* CryptoStreamTest.cs: Added new tests for [From|To]Base64Transform
	(InputBlockSize != OutputBlockSize) and for cascading CryptoStreams.

svn path=/trunk/mcs/; revision=23025
2004-02-12 14:12:22 +00:00
Sebastien Pouliot 7ee111a44b 2004-02-04 Sebastien Pouliot <[email protected]>
* CryptoStreamTest.cs: Added many more tests for every problem found
	with CryptoStream using code samples from the internet.

svn path=/trunk/mcs/; revision=22771
2004-02-04 19:10:57 +00:00
Sebastien Pouliot 58c100ea0c 2003-10-04 Sebastien Pouliot <[email protected]>
* CryptoStreamTest.cs: Added test case from bugzilla #49323 from
	Carlos Guzm�n �lvarez and some small tests for empty stream with
	different PaddingMode (as found by Lluis Sanchez Gual).

svn path=/trunk/mcs/; revision=18587
2003-10-04 13:53:14 +00:00
Sebastien Pouliot fb4ecf4a40 2003-08-05 Sebastien Pouliot <[email protected]>
* CryptoStreamTest.cs: Added test case from bugzilla #40689 from
	Henning Westerholt.

svn path=/trunk/mcs/; revision=17091
2003-08-06 02:21:40 +00:00
Sebastien Pouliot 2f70adac08 2003-07-31 Sebastien Pouliot <[email protected]>
* CryptoStreamTest.cs: New. Very basic test for CryptoStream + the
	test case from bugzilla #46143 from Joerg Rosenkranz.
	* RSACryptoServiceProviderTest.cs: Fixed some exceptions that are
	different from .NET 1.0 and 1.1.

svn path=/trunk/mcs/; revision=16954
2003-07-31 20:55:16 +00:00