summaryrefslogtreecommitdiff
path: root/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs')
-rw-r--r--mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs12
1 files changed, 1 insertions, 11 deletions
diff --git a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs
index e2e5f793f3..8ca0307c4d 100644
--- a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs
+++ b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs
@@ -94,7 +94,7 @@ namespace System.Security.Cryptography.X509Certificates {
public static X509Certificate CreateFromCertFile (string filename)
{
- byte[] data = Load (filename);
+ byte[] data = File.ReadAllBytes (filename);
return new X509Certificate (data);
}
@@ -376,16 +376,6 @@ namespace System.Security.Cryptography.X509Certificates {
return sb.ToString ();
}
- private static byte[] Load (string fileName)
- {
- byte[] data = null;
- using (FileStream fs = File.OpenRead (fileName)) {
- data = new byte [fs.Length];
- fs.Read (data, 0, data.Length);
- fs.Close ();
- }
- return data;
- }
#if NET_4_0
protected static string FormatDate (DateTime date)
{