X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2Fcorlib%2FTest%2FSystem.Security.Cryptography%2FRSACryptoServiceProviderTest.cs;h=8767c8156c3980ffff04c57111e864fb1a7e9fb4;hb=3d693eeb90339833968d66c3dc9fde2fa3ba2cef;hp=e2f0c499b5947de9a1017576d6caebf3da88d7e0;hpb=9975a45f43793e34318e593ddacd3f332f8d91c0;p=mono.git diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs index e2f0c499b59..8767c8156c3 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs @@ -166,28 +166,28 @@ public class RSACryptoServiceProviderTest : Assertion { [ExpectedException (typeof (CryptographicException))] public void TooSmallKeyPair () { - rsa = new RSACryptoServiceProvider (256); -#if NET_2_0 - // in 2.0 MS delay the creation of the key pair until it is required - // (same trick that Mono almost always used ;-) but they also delay - // the parameter validation (what Mono didn't). So here we must "get" - // the key (export) to trigger the exception - rsa.ToXmlString (true); -#endif + rsa = new RSACryptoServiceProvider (256); +#if NET_2_0 + // in 2.0 MS delay the creation of the key pair until it is required + // (same trick that Mono almost always used ;-) but they also delay + // the parameter validation (what Mono didn't). So here we must "get" + // the key (export) to trigger the exception + rsa.ToXmlString (true); +#endif } [Test] [ExpectedException (typeof (CryptographicException))] public void TooBigKeyPair () { - rsa = new RSACryptoServiceProvider (32768); -#if NET_2_0 - // in 2.0 MS delay the creation of the key pair until it is required - // (same trick that Mono almost always used ;-) but they also delay - // the parameter validation (what Mono didn't). So here we must "get" - // the key (export) to trigger the exception - rsa.ToXmlString (true); -#endif + rsa = new RSACryptoServiceProvider (32768); +#if NET_2_0 + // in 2.0 MS delay the creation of the key pair until it is required + // (same trick that Mono almost always used ;-) but they also delay + // the parameter validation (what Mono didn't). So here we must "get" + // the key (export) to trigger the exception + rsa.ToXmlString (true); +#endif } [Test] @@ -309,8 +309,8 @@ public class RSACryptoServiceProviderTest : Assertion { rsa = new RSACryptoServiceProvider (minKeySize); rsa.VerifyHash (hash, null, sign); } -#endif - +#endif + [Test] [ExpectedException (typeof (ObjectDisposedException))] public void SignHashDisposed () @@ -395,9 +395,9 @@ public class RSACryptoServiceProviderTest : Assertion { byte[] hash = new byte [20]; rsa = new RSACryptoServiceProvider (minKeySize); rsa.VerifyHash (hash, "1.3.14.3.2.26", null); - } - -#if NET_2_0 + } + +#if NET_2_0 [Test] [Category ("NotWorking")] public void ImportDisposed () @@ -1135,19 +1135,19 @@ public class RSACryptoServiceProviderTest : Assertion { { rsa = new RSACryptoServiceProvider (minKeySize); CspKeyContainerInfo info = rsa.CspKeyContainerInfo; - Assert ("Accessible", info.Accessible); -// FIXME AssertNotNull ("CryptoKeySecurity", info.CryptoKeySecurity); - Assert ("Exportable", info.Exportable); + Assert ("Accessible", info.Accessible); +// FIXME AssertNotNull ("CryptoKeySecurity", info.CryptoKeySecurity); + Assert ("Exportable", info.Exportable); Assert ("HardwareDevice", !info.HardwareDevice); AssertNotNull ("KeyContainerName", info.KeyContainerName); AssertEquals ("KeyNumber", KeyNumber.Exchange, info.KeyNumber); - Assert ("MachineKeyStore", !info.MachineKeyStore); - Assert ("Protected", !info.Protected); + Assert ("MachineKeyStore", !info.MachineKeyStore); + Assert ("Protected", !info.Protected); AssertNotNull ("ProviderName", info.ProviderName); AssertEquals ("ProviderType", 1, info.ProviderType); Assert ("RandomlyGenerated", info.RandomlyGenerated); - Assert ("Removable", !info.Removable); - AssertNotNull ("UniqueKeyContainerName", info.UniqueKeyContainerName); + Assert ("Removable", !info.Removable); + AssertNotNull ("UniqueKeyContainerName", info.UniqueKeyContainerName); } [Test] @@ -1158,8 +1158,8 @@ public class RSACryptoServiceProviderTest : Assertion { RSAParameters rsap = AllTests.GetRsaKey (true); rsa.ImportParameters (rsap); CspKeyContainerInfo info = rsa.CspKeyContainerInfo; - Assert ("Accessible", info.Accessible); -// FIXME AssertNotNull ("CryptoKeySecurity", info.CryptoKeySecurity); + Assert ("Accessible", info.Accessible); +// FIXME AssertNotNull ("CryptoKeySecurity", info.CryptoKeySecurity); Assert ("Exportable", info.Exportable); Assert ("HardwareDevice", !info.HardwareDevice); AssertNotNull ("KeyContainerName", info.KeyContainerName); @@ -1182,8 +1182,8 @@ public class RSACryptoServiceProviderTest : Assertion { RSAParameters rsap = AllTests.GetRsaKey (false); rsa.ImportParameters (rsap); CspKeyContainerInfo info = rsa.CspKeyContainerInfo; - Assert ("Accessible", !info.Accessible); - // info.CryptoKeySecurity throws a CryptographicException at this stage + Assert ("Accessible", !info.Accessible); + // info.CryptoKeySecurity throws a CryptographicException at this stage // info.Exportable throws a CryptographicException at this stage Assert ("HardwareDevice", !info.HardwareDevice); AssertNotNull ("KeyContainerName", info.KeyContainerName);