Author: spouliot
Date: 2007-03-22 14:44:20 -0500 (Thu, 22 Mar 2007)
New Revision: 74830
Modified:
trunk/mcs/class/corlib/Test/System.Security.Cryptography/ChangeLog
trunk/mcs/class/corlib/Test/System.Security.Cryptography/PasswordDeriveBytesTest.cs
Log:
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).
Modified: trunk/mcs/class/corlib/Test/System.Security.Cryptography/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Test/System.Security.Cryptography/ChangeLog
2007-03-22 19:43:04 UTC (rev 74829)
+++ trunk/mcs/class/corlib/Test/System.Security.Cryptography/ChangeLog
2007-03-22 19:44:20 UTC (rev 74830)
@@ -1,10 +1,12 @@
-2007-03-22 Sebastien Pouliot <[EMAIL PROTECTED]>
+2007-03-22 Sebastien Pouliot <[EMAIL PROTECTED]>
* CryptoConfigTest.cs: Fix upper/lower/mixed cases tests as they work
only for 2.0.
* CryptoStreamTest.cs: Fixed some test cases to work properly on MS
fx 2.0.
* DSACryptoServiceProviderTest.cs: Normalize line endings.
+ * PasswordDeriveBytesTest.cs: Fix test case that used Reset (as the
+ method was fixed to reset the state in fx 2.0).
* RSACryptoServiceProviderTest.cs: Normalize line endings.
* SymmetricAlgorithmTransformTest.cs: Change/split test cases so that
they work properly under both MS 1.1 and 2.0. In some cases tests are
Modified:
trunk/mcs/class/corlib/Test/System.Security.Cryptography/PasswordDeriveBytesTest.cs
===================================================================
---
trunk/mcs/class/corlib/Test/System.Security.Cryptography/PasswordDeriveBytesTest.cs
2007-03-22 19:43:04 UTC (rev 74829)
+++
trunk/mcs/class/corlib/Test/System.Security.Cryptography/PasswordDeriveBytesTest.cs
2007-03-22 19:44:20 UTC (rev 74830)
@@ -5,7 +5,7 @@
// Sebastien Pouliot ([EMAIL PROTECTED])
//
// (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com)
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004,2007 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -662,8 +662,15 @@
catch (Exception e) {
Assert.Fail ("PKCS#5 can't set IterationCount after
GetBytes - expected CryptographicException but got " + e.ToString ());
}
+
+ pd.Reset ();
+#if NET_2_0
+ // finally a useful reset :)
+ pd.HashName = "SHA256";
+ pd.Salt = expectedKey;
+ pd.IterationCount = 10;
+#else
// same thing after Reset
- pd.Reset ();
try {
pd.HashName = "SHA256";
Assert.Fail ("PKCS#5 can't set HashName after Reset -
expected CryptographicException but got none");
@@ -694,6 +701,7 @@
catch (Exception e) {
Assert.Fail ("PKCS#5 can't set IterationCount after
Reset - expected CryptographicException but got " + e.ToString ());
}
+#endif
}
// FIXME: should we treat this as a bug or as a feature ?
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches