Author: spouliot
Date: 2005-04-25 13:26:14 -0400 (Mon, 25 Apr 2005)
New Revision: 43555
Modified:
trunk/mcs/class/corlib/Test/System.Security.Cryptography/ChangeLog
trunk/mcs/class/corlib/Test/System.Security.Cryptography/CryptoConfigTest.cs
trunk/mcs/class/corlib/Test/System.Security.Cryptography/DESTest.cs
trunk/mcs/class/corlib/Test/System.Security.Cryptography/SymmetricAlgorithm2Test.cs
trunk/mcs/class/corlib/Test/System.Security.Cryptography/TripleDESTest.cs
Log:
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.
Modified: trunk/mcs/class/corlib/Test/System.Security.Cryptography/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Test/System.Security.Cryptography/ChangeLog
2005-04-25 17:22:53 UTC (rev 43554)
+++ trunk/mcs/class/corlib/Test/System.Security.Cryptography/ChangeLog
2005-04-25 17:26:14 UTC (rev 43555)
@@ -1,3 +1,14 @@
+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.
+
2005-04-18 Sebastien Pouliot <[EMAIL PROTECTED]>
* SymmetricAlgorithm2Test.cs: Added a test case where the FeedBackSize
Modified:
trunk/mcs/class/corlib/Test/System.Security.Cryptography/CryptoConfigTest.cs
===================================================================
---
trunk/mcs/class/corlib/Test/System.Security.Cryptography/CryptoConfigTest.cs
2005-04-25 17:22:53 UTC (rev 43554)
+++
trunk/mcs/class/corlib/Test/System.Security.Cryptography/CryptoConfigTest.cs
2005-04-25 17:26:14 UTC (rev 43555)
@@ -170,8 +170,11 @@
static byte[] oidmd5withRSAEncryption = { 0x06, 0x09, 0x2A, 0x86, 0x48,
0x86, 0xF7, 0x0D, 0x01, 0x01, 0x04 };
[Test]
+#if NET_2_0
+ [ExpectedException (typeof (ArgumentNullException))]
+#else
[ExpectedException (typeof (NullReferenceException))]
- // LAMESPEC NullReferenceException is thrown (not
ArgumentNullException) if parameter is NULL
+#endif
public void EncodeOIDNull ()
{
byte[] o = CryptoConfig.EncodeOID (null);
@@ -296,7 +299,7 @@
MapNameToOID ("TripleDESKeyWrap", "1.2.840.113549.1.9.16.3.6");
#if NET_2_0
// new OID defined in Fx 2.0
- MapNameToOID ("RSA", "1.2.840.113549.1.1.1");
+// MapNameToOID ("RSA", "1.2.840.113549.1.1.1");
MapNameToOID ("DSA", "1.2.840.10040.4.1");
MapNameToOID ("DES", "1.3.14.3.2.7");
MapNameToOID ("3DES", "1.2.840.113549.3.7");
Modified: trunk/mcs/class/corlib/Test/System.Security.Cryptography/DESTest.cs
===================================================================
--- trunk/mcs/class/corlib/Test/System.Security.Cryptography/DESTest.cs
2005-04-25 17:22:53 UTC (rev 43554)
+++ trunk/mcs/class/corlib/Test/System.Security.Cryptography/DESTest.cs
2005-04-25 17:26:14 UTC (rev 43555)
@@ -1086,7 +1086,11 @@
}
[Test]
+#if NET_2_0
+ [ExpectedException (typeof (CryptographicException))]
+#else
[ExpectedException (typeof (NullReferenceException))]
+#endif
public void IsWeakKey_Null ()
{
DES.IsWeakKey (null);
@@ -4189,7 +4193,11 @@
}
[Test]
+#if NET_2_0
+ [ExpectedException (typeof (CryptographicException))]
+#else
[ExpectedException (typeof (NullReferenceException))]
+#endif
public void IsSemiWeakKey_Null ()
{
DES.IsSemiWeakKey (null);
Modified:
trunk/mcs/class/corlib/Test/System.Security.Cryptography/SymmetricAlgorithm2Test.cs
===================================================================
---
trunk/mcs/class/corlib/Test/System.Security.Cryptography/SymmetricAlgorithm2Test.cs
2005-04-25 17:22:53 UTC (rev 43554)
+++
trunk/mcs/class/corlib/Test/System.Security.Cryptography/SymmetricAlgorithm2Test.cs
2005-04-25 17:26:14 UTC (rev 43555)
@@ -145,6 +145,9 @@
}
[Test]
+#if NET_2_0
+ [ExpectedException (typeof (CryptographicException))]
+#endif
public void FeedbackZero ()
{
// thanks to Yakk for the sample
Modified:
trunk/mcs/class/corlib/Test/System.Security.Cryptography/TripleDESTest.cs
===================================================================
--- trunk/mcs/class/corlib/Test/System.Security.Cryptography/TripleDESTest.cs
2005-04-25 17:22:53 UTC (rev 43554)
+++ trunk/mcs/class/corlib/Test/System.Security.Cryptography/TripleDESTest.cs
2005-04-25 17:26:14 UTC (rev 43555)
@@ -4,7 +4,7 @@
// Author:
// Sebastien Pouliot ([EMAIL PROTECTED])
//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2005 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
@@ -128,7 +128,11 @@
}
[Test]
+#if NET_2_0
+ [ExpectedException (typeof (CryptographicException))]
+#else
[ExpectedException (typeof (NullReferenceException))]
+#endif
public void IsSemiWeakKey_Null ()
{
TripleDES.IsWeakKey (null);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches