Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=13953
MSDN documents that RSACryptoServiceProvider.SignData()'s provider
paramter may contain an OID name:
http://msdn.microsoft.com/en-us/library/y2wf1b6k.aspx
> The halg parameter can accept a String, a HashAlgorithm, or a Type.
> The string value can be one of the following:
> * The object identifier (OID) friendly name of the hash algorithm to use,
> either a name registered in the crypto config file or one in the
> Crypto API OID table.
> * The OID value. The OID must be one recognized by the Crypto API.
> For example, you could use SignData(new byte[5], "1.3.14.3.2.26") or
> SignData(new byte[5], "sha1"), or SignData(new byte[5], "SHA1").
Add support for this OID names as the provider.
* System.Security.Cryptography/CryptoConfig.cs: Add OID for RIPEMD160
* System.Security.Cryptography/RSACryptoServiceProvider.cs: Update
GetHashNameFromOID to include SHA2-family OIDs. Remove historical
comments about 1.x FX behavior.
* Test/System.Security.Cryptography/CryptoConfigTest.cs: Add test cases
wrt RIPEMD160 OID
* Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs: Add
test case for SignHash with all FX-provided hash implementations (all
working except RIPEMD160). Remove some NET_2_0/NET_1_1 defines.
* Test/System.Security.Cryptography/RSAPKCS1SignatureFormatterTest.cs:
Remove hacks that were needed for running the tests under FX 1.x. Remove
some NET_2_0/NET_1_1 defines.
workingBlock should be the InputBlockSize and currentBlock the
OutputBlockSize. Allocate currentBlock lazily.
Test contributed by Bassam Tabbara.
Fixes bug #644740.
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
* 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
* 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
* 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
* 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
* 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