2006-10-08 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Sun, 8 Oct 2006 16:21:36 +0000 (16:21 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Sun, 8 Oct 2006 16:21:36 +0000 (16:21 -0000)
* X509Certificate2.cs: Ensure we can load certificates from read-only
files (fix bug #79616).

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

mcs/class/System/System.Security.Cryptography.X509Certificates/ChangeLog
mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs

index 2e875021be55ba2f05031fd01de8995d416c0a9a..794e5bedf899e08c2ef86dcb334f2bfb1c6a46b2 100644 (file)
@@ -1,3 +1,8 @@
+2006-10-08  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * X509Certificate2.cs: Ensure we can load certificates from read-only
+       files (fix bug #79616).
+
 2006-10-05  Andrew Skiba  <andrews@mainsoft.com>
 
        * X509CertificateCollection.cs: remove IEnumerable private imple-
index 46a15d9e07ea7302ace38d0a3ee5f4411022cfe4..8334c4a0bcf60a67ee519fa25cd6fb79495c7afd 100644 (file)
@@ -317,7 +317,7 @@ namespace System.Security.Cryptography.X509Certificates {
                private byte[] Load (string fileName)
                {
                        byte[] data = null;
-                       using (FileStream fs = new FileStream (fileName, FileMode.Open)) {
+                       using (FileStream fs = File.OpenRead (fileName)) {
                                data = new byte [fs.Length];
                                fs.Read (data, 0, data.Length);
                                fs.Close ();