Author: spouliot
Date: 2006-09-05 11:20:13 -0400 (Tue, 05 Sep 2006)
New Revision: 64948
Modified:
trunk/mcs/class/Mono.Security/Test/Mono.Security.Cryptography/ChangeLog
trunk/mcs/class/Mono.Security/Test/Mono.Security.Cryptography/RSAManagedTest.cs
Log:
2006-09-05 Sebastien Pouliot <[EMAIL PROTECTED]>
* RSAManagedTest.cs: Add a test case for #79269 (wrong exception).
Modified:
trunk/mcs/class/Mono.Security/Test/Mono.Security.Cryptography/ChangeLog
===================================================================
--- trunk/mcs/class/Mono.Security/Test/Mono.Security.Cryptography/ChangeLog
2006-09-05 15:14:39 UTC (rev 64947)
+++ trunk/mcs/class/Mono.Security/Test/Mono.Security.Cryptography/ChangeLog
2006-09-05 15:20:13 UTC (rev 64948)
@@ -1,3 +1,7 @@
+2006-09-05 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * RSAManagedTest.cs: Add a test case for #79269 (wrong exception).
+
2005-04-27 Sebastien Pouliot <[EMAIL PROTECTED]>
* KeyPairPersistenceTest.cs: Upgrade to NUnit 2.2 API to use Ignore.
Modified:
trunk/mcs/class/Mono.Security/Test/Mono.Security.Cryptography/RSAManagedTest.cs
===================================================================
---
trunk/mcs/class/Mono.Security/Test/Mono.Security.Cryptography/RSAManagedTest.cs
2006-09-05 15:14:39 UTC (rev 64947)
+++
trunk/mcs/class/Mono.Security/Test/Mono.Security.Cryptography/RSAManagedTest.cs
2006-09-05 15:20:13 UTC (rev 64948)
@@ -6,7 +6,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,2006 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
@@ -532,5 +532,17 @@
rsa.FromXmlString (MonoXml2048woCRT);
EncryptDecrypt ("Mono-2048-WithoutCRT", rsa);
}
+
+ [Test]
+ [ExpectedException (typeof (CryptographicException))]
+ public void Bug79269 ()
+ {
+ RSAManaged rsa = new RSAManaged ();
+ rsa.FromXmlString
("<RSAKeyValue><Modulus>iSObDmmhDgrl4NiLaviFcpv4NdysBWJcqiVz3AQbPdajtXaQQ8VJdfRkixah132yKOFGCWZhHS3EuPMh8dcNwGwta2nh+m2IV6ktzI4+mZ7CSNAsmlDY0JI+H8At1vKvNArlC5jkVGuliYroJeSU/NLPLNYgspi7TtXGy9Rfug8=</Modulus><Exponent>EQ==</Exponent></RSAKeyValue>");
+ Assert.IsTrue (rsa.PublicOnly, "PublicOnly");
+ string b64 =
@"YgyAhscnTTIcDeLJTZcOYYyHVxNhV6d03jeZYjq0sPMEsfCCbE/NcFyYHD9BTuiduqPplCLbGpfZIZYJ6vAP9m5z4Q9eEw79kmEFCsm8wSKEo/gKiptVpwQ78VOPrWd/wEkTTeeg2nVim3JIsTKGFlV7rKxIWQhGN9aAqgP8nZI=";
+ byte [] bytes = Convert.FromBase64String (b64);
+ rsa.Decrypt (bytes, true);
+ }
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches