Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Pouliot <sebastien@ximian.com>2006-10-08 20:21:36 +0400
committerSebastien Pouliot <sebastien@ximian.com>2006-10-08 20:21:36 +0400
commit167cb24b45e963bfe900dda29c07ad95df0c7d24 (patch)
tree603358bebaac75a4c9a9fabf1f2ab82fe0d03ff8 /mcs/class/System/System.Security.Cryptography.X509Certificates
parente8cf1f347d19e6543cb8a6467715ffadb4e46056 (diff)
2006-10-08 Sebastien Pouliot <sebastien@ximian.com>
* X509Certificate2.cs: Ensure we can load certificates from read-only files (fix bug #79616). svn path=/trunk/mcs/; revision=66414
Diffstat (limited to 'mcs/class/System/System.Security.Cryptography.X509Certificates')
-rw-r--r--mcs/class/System/System.Security.Cryptography.X509Certificates/ChangeLog5
-rw-r--r--mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs2
2 files changed, 6 insertions, 1 deletions
diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/ChangeLog b/mcs/class/System/System.Security.Cryptography.X509Certificates/ChangeLog
index 2e875021be5..794e5bedf89 100644
--- a/mcs/class/System/System.Security.Cryptography.X509Certificates/ChangeLog
+++ b/mcs/class/System/System.Security.Cryptography.X509Certificates/ChangeLog
@@ -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-
diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs
index 46a15d9e07e..8334c4a0bcf 100644
--- a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs
+++ b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs
@@ -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 ();