2004-11-03 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Wed, 3 Nov 2004 12:07:57 +0000 (12:07 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Wed, 3 Nov 2004 12:07:57 +0000 (12:07 -0000)
* KeyPairPersistenceTest.cs: Re-fix as the UnauthorizedAccessException
is the InnerException of a CryptographicException.

svn path=/trunk/mcs/; revision=35594

mcs/class/Mono.Security/Test/Mono.Security.Cryptography/ChangeLog
mcs/class/Mono.Security/Test/Mono.Security.Cryptography/KeyPairPersistenceTest.cs

index cebf0aa4c27b2604c88a3d3aa19f50809b19b8b2..ab956f00cde11330843d2f3354c5ef99081f32a8 100644 (file)
@@ -1,3 +1,8 @@
+2004-11-03  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * KeyPairPersistenceTest.cs: Re-fix as the UnauthorizedAccessException
+       is the InnerException of a CryptographicException.
+
 2004-10-28  Sebastien Pouliot  <sebastien@ximian.com>
 
        * KeyPairPersistenceTest.cs: Fix two tests to work even if the user 
index ae6fb23dbee7526ef0a5bff229cfda0426b75da2..4aa8b6b012e871e323e132af32fe4e13fdd767ff 100755 (executable)
@@ -134,8 +134,10 @@ namespace MonoTests.Mono.Security.Cryptography {
                                kpp.Remove ();
                                Assert ("Remove-!Exists", !File.Exists (kpp.Filename));
                        }
-                       catch (UnauthorizedAccessException) {
+                       catch (CryptographicException ce) {
                                // not everyone can write to the machine store
+                               if (!(ce.InnerException is UnauthorizedAccessException))
+                                       throw;
                        }
                }