Commit Graph
129 Commits
Author SHA1 Message Date
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 2890567651 2008-09-17 Sebastien Pouliot <[email protected]>
* CryptoConfigTest.cs: Add test cases for HMAC URI.


svn path=/trunk/mcs/; revision=113342
2008-09-17 18:23:59 +00:00
Néstor Salceda 6bf0d5d000 2008-07-13 Nestor Salceda <[email protected]>
* RSAPKCS1KeyExchangeFormatterTest.cs: Add test case where you are
	passing null parameters to SetKey method and constructor with
	the key as parameter.  Fixes the bug #408738.


svn path=/trunk/mcs/; revision=107829
2008-07-13 21:33:39 +00:00
Sebastien Pouliot 217e98e49a 2008-04-21 Sebastien Pouliot <[email protected]>
* HMACSHA1Test.cs: Add test case where data reside inside a byte
	array. Patch by Kazuki Oikawa.


svn path=/trunk/mcs/; revision=101295
2008-04-21 13:39:10 +00:00
Sebastien Pouliot 553ea4bc01 2008-04-17 Sebastien Pouliot <[email protected]>
* DSATest.cs: Add valid test cases with invalid xml. Update to
	NUnit 2 syntax.
	* HashAlgorithmTest.cs: Fix compiler warnings.
	* RSATest.cs: Add valid test cases with invalid xml. Update to
	NUnit 2 syntax.
	* SHA256Test.cs, SHA384Test.cs, SHA512Test.cs: Flush


svn path=/trunk/mcs/; revision=101004
2008-04-17 14:59:25 +00:00
Sebastien Pouliot b350794fc0 2008-03-04 Sebastien Pouliot <[email protected]>
* PaddingModeTest.cs: Add test case for #366623 ANSI padding bug.


svn path=/trunk/mcs/; revision=97310
2008-03-04 14:51:15 +00:00
Sebastien Pouliot 83d9a5a235 2008-02-21 Sebastien Pouliot <[email protected]>
* Rfc2898DeriveBytesTest.cs: Add test cases for consecutive calls to
	GetBytes and compare the result to a single, larger, call. Converted 
	all exitsing tests to NUnit 2.2.


svn path=/trunk/mcs/; revision=96343
2008-02-21 13:55:49 +00:00
Sebastien Pouliot 72641da16d 2008-01-02 Sebastien Pouliot <[email protected]>
* RC2CryptoServiceProviderTest.cs: Fix Create[De|En]cryptor_KeyNull 
	test case not to fail about 1 out of 256 times under the 2.0 profile.
	* TripleDESCryptoServiceProviderTest.cs: Fix Create[De|En]cryptor_KeyNull
	test case not to fail about 1 out of 256 times under the 2.0 profile.


svn path=/trunk/mcs/; revision=92119
2008-01-02 17:34:34 +00:00
Sebastien Pouliot 485df1d306 2007-11-20 Sebastien Pouliot <[email protected]>
* DESCryptoServiceProviderTest.cs: Fix CreateDecryptor_KeyNull test 
	case not to fail about 1 out of 256 times under the 2.0 profile.


svn path=/trunk/mcs/; revision=90058
2007-11-21 01:56:10 +00:00
Sebastien Pouliot 77f4e03876 2007-10-23 Sebastien Pouliot <[email protected]>
* DESCryptoServiceProviderTest.cs: Fix CreateEncryptor_KeyNull test 
	case not to fail about 1 out of 256 times under the 2.0 profile.


svn path=/trunk/mcs/; revision=88016
2007-10-23 18:45:34 +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 425435496e 2007-05-08 Randolph Chung <[email protected]>
* DSACryptoServiceProviderTest.cs: Remove "NotWorking" annotation
	for the blob tests that should now pass.


svn path=/trunk/mcs/; revision=76981
2007-05-09 02:47:31 +00:00
Sebastien Pouliot 3b25a717cd 2007-05-08 Sebastien Pouliot <[email protected]>
* DSATest.cs: Add test case where we import a key that has a null Y
	(public part) but where X (private part) is available - and usable
	to compute Y.


svn path=/trunk/mcs/; revision=76951
2007-05-08 17:56:44 +00:00
Sebastien Pouliot 415318ea69 2007-03-22 Sebastien Pouliot <[email protected]>
* Rfc2898DeriveBytesTest.cs: Add test case to trigger an endian bug.

svn path=/trunk/mcs/; revision=74840
2007-03-22 20:34:13 +00:00
Sebastien Pouliot a5b9b197b4 2007-03-22 Sebastien Pouliot <[email protected]>
* PasswordDeriveBytesTest.cs: Fix test case that used Reset (as the 
	method was fixed to reset the state in fx 2.0).

svn path=/trunk/mcs/; revision=74830
2007-03-22 19:44:20 +00:00
Sebastien Pouliot 0bac68ecef 2007-03-22 Sebastien Pouliot <[email protected]>
* SymmetricAlgorithmTransformTest.cs: Change/split test cases so that
	they work properly under both MS 1.1 and 2.0. In some cases tests are
	marked as NotWorking because Mono implements the, more consistent, 2.0
	behavior for all transforms.

svn path=/trunk/mcs/; revision=74827
2007-03-22 19:19:21 +00:00
Sebastien Pouliot 78fa5ed2f3 2007-03-22 Sebastien Pouliot <[email protected]>
* DSACryptoServiceProviderTest.cs: Normalize line endings.
	* RSACryptoServiceProviderTest.cs: Normalize line endings.

svn path=/trunk/mcs/; revision=74822
2007-03-22 17:34:00 +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 b7f96e7ff3 2007-03-22 Sebastien Pouliot <[email protected]>
* CryptoConfigTest.cs: Fix upper/lower/mixed cases tests as they work 
	only for 2.0.


svn path=/trunk/mcs/; revision=74810
2007-03-22 14:51:08 +00:00
Roei Erez 42930a5f97 Adding some TARGET_JVM tags.
svn path=/trunk/mcs/; revision=74388
2007-03-15 15:38:38 +00:00
Sebastien Pouliot 3b58d13b8e 2007-03-05 Sebastien Pouliot <[email protected]>
* SymmetricAlgorithmTransformTest.cs: Add test cases for #81008 by
	looking at the encrypted/decrypted block length when TransformBlock is
	called with different MoO and paddings.


svn path=/trunk/mcs/; revision=73713
2007-03-05 14:28:33 +00:00
Sebastien Pouliot bbeac1e494 2007-02-14 Sebastien Pouliot <[email protected]>
* HashAlgorithmTest.cs: Convert to NUnit 2.2 format.
	* HMACMD5Test.cs: Convert to NUnit 2.2 format.
	* HMACRIPEMD160Test.cs: Convert to NUnit 2.2 format.
	* HMACSHA1Test.cs: Convert to NUnit 2.2 format.
	* HMACSHA256Test.cs: Convert to NUnit 2.2 format.
	* HMACSHA384Test.cs: Convert to NUnit 2.2 format. Add test cases from
	RFC4231 using the correct block size (128) and the "legacy" size (64).
	* HMACSHA512Test.cs: Convert to NUnit 2.2 format. . Add test cases from
	RFC4231 using the correct block size (128) and the "legacy" size (64).
	* KeyedHashAlgorithmTest.cs: Convert to NUnit 2.2 format.
	* SHA1CryptoServiceProviderTest.cs: Convert to NUnit 2.2 format.
	* SHA1Test.cs: Convert to NUnit 2.2 format.
	* SHA256ManagedTest.cs: Convert to NUnit 2.2 format.
	* SHA256Test.cs: Convert to NUnit 2.2 format.
	* SHA384ManagedTest.cs: Convert to NUnit 2.2 format.
	* SHA384Test.cs: Convert to NUnit 2.2 format.
	* SHA512ManagedTest.cs: Convert to NUnit 2.2 format.
	* SHA512Test.cs: Convert to NUnit 2.2 format.


svn path=/trunk/mcs/; revision=72895
2007-02-15 02:05:39 +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
Sebastien Pouliot 16b6203a41 2007-01-08 Sebastien Pouliot <[email protected]>
* DESCryptoServiceProviderTest.cs: Remove test cases for bug #80439
	as they are more general than DES and the default padding.
	* SymmetricAlgorithmTransformTest.cs: New. Extensive test cases for
	bug #80439, all symmtric ciphers (all block size), all mode of 
	operations and all supported padding modes.


svn path=/trunk/mcs/; revision=70688
2007-01-09 02:59:25 +00:00
Sebastien Pouliot c0c072e9c4 2007-01-04 Sebastien Pouliot <[email protected]>
* DESCryptoServiceProviderTest.cs: Update and add new test cases for
	bug #80439.


svn path=/trunk/mcs/; revision=70493
2007-01-04 17:57:36 +00:00
Sebastien Pouliot 7d367f814f 2007-01-03 Sebastien Pouliot <[email protected]>
* DESCryptoServiceProviderTest.cs: Add tests for bug #80439 where 
	inputCount is reduced to fit into the output buffer (for any mode).


svn path=/trunk/mcs/; revision=70428
2007-01-03 17:17:30 +00:00
Sebastien Pouliot fd0689388f 2006-11-24 Sebastien Pouliot <[email protected]>
* CryptoConfigTest.cs: Added test case for X509Chain.


svn path=/trunk/mcs/; revision=68430
2006-11-24 14:45:55 +00:00
Sebastien Pouliot 854e962bd3 2006-11-16 Sebastien Pouliot <[email protected]>
* PasswordDeriveBytesTest.cs: Added test case for bug #79499


svn path=/trunk/mcs/; revision=68000
2006-11-16 15:09:53 +00:00
Sebastien Pouliot c7ce314e54 2006-10-11 Sebastien Pouliot <[email protected]>
* CryptoConfigTest.cs: Added test cases to ensure lower/mixed-case of 
	algorithm names are supported by CreateFromName and MapNameToOID (fix 
	bug #79641). Updated some OID that were changed (well nulled) in the 
	final 2.0 release of MS framework.


svn path=/trunk/mcs/; revision=66548
2006-10-11 12:45:03 +00:00
Sebastien Pouliot 1916ea66c9 2006-09-08 Sebastien Pouliot <[email protected]>
* RSACryptoServiceProviderTest.cs: Added test cases for decoding bad
	PKCS1 and OAEP padding - both resulting in a CryptographicException.
	* RSAOAEPKeyExchangeDeformatterTest.cs: Add test case for bad padding.
	* RSAPKCS1KeyExchangeDeformatterTest.cs: Add test case for bad padding


svn path=/trunk/mcs/; revision=65100
2006-09-08 14:23:30 +00:00
Sebastien Pouliot 31c90e9e97 2006-09-05 Sebastien Pouliot <[email protected]>
* RSACryptoServiceProviderTest.cs: Test case for #79269 where we 
	ensure a CryptographicException (not a NRE) when decrypting without a
	private key.


svn path=/trunk/mcs/; revision=64940
2006-09-05 13:53:59 +00:00
Kornél Pál 2d604bc51e Converted ChangeLogs to UTF-8 and recovered incorrectly encoded characters.
svn path=/trunk/mcs/; revision=63835
2006-08-16 19:42:08 +00:00
Sebastien Pouliot 2ef5a78b0d 2006-07-01 Sebastien Pouliot <[email protected]>
* RSAPKCS1SignatureDeformatterTest.cs: Added test case where 
	SetHashAlgorithm isn't called and the hash algorithm name is derived
	from the hash instance. From bug #78744 by Diego Mesa Tabares.


svn path=/trunk/mcs/; revision=62171
2006-07-01 14:50:36 +00:00
Sebastien Pouliot 98fa25d599 2006-06-15 Sebastien Pouliot <[email protected]>
* HashAlgorithmTest.cs: Added new test cases wrt the output buffer 
	used in TransformBlock (e.g. bug #78647). Updated existing test case
	to work under 2.0 final.
	* HMACMD5Test.cs: Fix SetUp to allow new inherited test cases to work 
	properly.
	* HMACRIPEMD160Test.cs: Fix SetUp to allow new inherited test cases to
	work properly.
	* HMACSHA1Test.cs: Fix SetUp to allow new inherited test cases to 
	work properly.
	* HMACSHA256Test.cs: Fix SetUp to allow new inherited test cases to 
	work properly.
	* HMACSHA384Test.cs: New. Basic test cases that, cheaply, inherits 
	the HashAlgorithm tests.
	* HMACSHA512Test.cs: New. Basic test cases that, cheaply, inherits 
	the HashAlgorithm tests.
	* KeyedHashAlgorithmTest.cs: Ensure we're always using the same key 
	(required for new, inherited, test cases). Fix ToString to match 
	KeyedHashAlgorithm (and not an inherited class).


svn path=/trunk/mcs/; revision=61769
2006-06-15 19:34:20 +00:00
Sebastien Pouliot b742419464 2006-06-01 Sebastien Pouliot <[email protected]>
* RandomNumberGeneratorTest.cs: Don't forget the last run in Runs. 
	Track both 0 and 1 runs. Changed runs ranges to match FIPS140-2 Change
	Notice #1 (fixes bug #78560). Updated test cases to NUnit 2.2 format.


svn path=/trunk/mcs/; revision=61375
2006-06-01 13:47:43 +00:00
Sebastien Pouliot c114fa1ed0 2005-12-15 Sebastien Pouliot <[email protected]>
* RijndaelTest.cs: Add test cases for cycling key sizes and block 
	sizes.
	* SymmetricAlgorithm2Test.cs: Added test case for re-setting the 
	BlockSize. Keeping the same value *doesn't* change the current IV 
	(while doing the same on the KeySize *does* change the key).


svn path=/trunk/mcs/; revision=54450
2005-12-15 13:47:02 +00:00
Sebastien Pouliot f4eed901ea 2005-11-22 Sebastien Pouliot <[email protected]>
* DSATest.cs: Added test case where J isn't imported. In this case we
	don't export (our internally calculated) J and it's also not part of 
	the XML output.


svn path=/trunk/mcs/; revision=53357
2005-11-22 19:07:00 +00:00
Sebastien Pouliot d0472a947b 2005-10-21 Sebastien Pouliot <[email protected]>
* RC2CryptoServiceProviderTest.cs: New. Unit tests specific to this 
	implementation (not algorithm specific but required to match MS 
	behaviour).
	* RijndaelManagedTest.cs: Added unit tests specific to this 
	implementation (not algorithm specific but required to match MS
	behaviour).
	* DESCryptoServiceProviderTest.cs: Added unit tests specific to this
	implementation (not algorithm specific but required to match MS
	behaviour).
	* TripleDESCryptoServiceProviderTest.cs: New. Unit tests specific to 
	this implementation (not algorithm specific but required to match MS
	behaviour).


svn path=/trunk/mcs/; revision=52044
2005-10-21 19:13:01 +00:00
Sebastien Pouliot 69e30416b2 2005-09-29 Sebastien Pouliot <[email protected]>
* HMACSHA1Test.cs: Use the new ctor(byte[],bool) introduced in 2.0 RC
	in some of the existing tests (under 2.0).


svn path=/trunk/mcs/; revision=51011
2005-09-29 21:04:29 +00:00
Sebastien Pouliot fe8226f28c 2005-04-27 Sebastien Pouliot <[email protected]>
* DSACryptoServiceProviderTest.cs: Catch UnauthorizedAccessException
	directly in UseMachineKeyStore (not just wrapped inside a 
	CryptographicException). 
	* RSACryptoServiceProviderTest.cs: Catch UnauthorizedAccessException
	directly in UseMachineKeyStore (not just wrapped inside a 
	CryptographicException). 


svn path=/trunk/mcs/; revision=43675
2005-04-27 18:38:36 +00:00
Sebastien Pouliot 822235c4de 2005-04-25 Sebastien Pouliot <[email protected]>
* CryptoConfigTest.cs: Check that ArgumentNullException is throw in
	EncodeOID for 2.0. Comment test for RSA OID (2.0).
	* DESTest.cs: Check that null keys throws CryptographicException in 
	IsWeakKey and IsSemiWeakKey for 2.0.
	* TripleDESTest.cs: Check that null keys throws CryptographicException
	in IsWeakKey for 2.0.
	* SymmetricAlgorithm2Test.cs: Check that a FeedbackSize of zero throws
	a CryptographicException in 2.0.


svn path=/trunk/mcs/; revision=43555
2005-04-25 17:26:14 +00:00
Sebastien Pouliot b0ead59ad0 2005-04-18 Sebastien Pouliot <[email protected]>
* SymmetricAlgorithm2Test.cs: Added a test case where the FeedBackSize
	is set to 0 before starting encryption.


svn path=/trunk/mcs/; revision=43209
2005-04-18 12:49:21 +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
Sebastien Pouliot 4fb2fd5a4e 2005-03-24 Sebastien Pouliot <[email protected]>
* CryptoConfigCas.cs: New. CAS unit tests for CryptoConfig.
	* CryptoAPITransformCas.cs: New. CAS unit tests for CryptoAPITransform.


svn path=/trunk/mcs/; revision=42206
2005-03-24 13:19:07 +00:00
Sebastien Pouliot 981fb2f786 2005-02-10 Sebastien Pouliot <[email protected]>
* DSATest.cs: Added unit test for Counter == 0. Actualized test cases
	for NET_2_0 now that we can inherit from DSA outside corlib.


svn path=/trunk/mcs/; revision=40405
2005-02-10 16:07:45 +00:00
Sebastien Pouliot d0d7913498 2005-01-30 Sebastien Pouliot <[email protected]>
* PasswordDeriveBytesTest.cs: Changed [Ignore] to [Category
	("NotWorking")] to reduce nunit logs.


svn path=/trunk/mcs/; revision=39811
2005-01-30 20:12:44 +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 5a50745c65 2005-01-11 Sebastien Pouliot <[email protected]>
* DSACryptoServiceProviderTest.cs: Fixed VerifySignatureWithoutKey to
	ensure that Mono didn't create the key before starting verification.
	* RSACryptoServiceProviderTest.cs: Added tests for PublicOnly in the
	constructor tests and for VerifyHash with a null OID.
	* RSAPKCS1SignatureFormatterTest.cs: Fixed signatures values for 
	SHA256, SHA384 and SHA512 for NET_2_0 profile. The older signatures
	(working only in Mono) can't be used because 2.0 use new OID for those
	hash algorithms. Note that this still only works with Mono in 2.0!

svn path=/trunk/mcs/; revision=38721
2005-01-11 19:42:44 +00:00
Sebastien Pouliot 09ad4137d8 2005-01-11 Sebastien Pouliot <[email protected]>
* CryptoConfigTest.cs: Added new RIPEMD160 hash algorithm and new HMAC
	algorithms (HMACMD5, HMACRIPEMD160, HMACSHA256, HMACSHA384 and 
	HMACSHA512) to the tests.


svn path=/trunk/mcs/; revision=38684
2005-01-11 12:57:11 +00:00