Merge pull request #3622 from rolfbjarne/remove-stray-file
[mono.git] / mcs / class / System.Web / System.Web / HttpClientCertificate.cs
index 5d256a9bde45912f71644cd427ffdc268fddacd2..40bb542582c7e1d8c68cb0a7b64e3474bc2e8042 100644 (file)
@@ -4,7 +4,7 @@
 // Author:
 //     Sebastien Pouliot  <sebastien@ximian.com>
 //
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2009 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
 using System.Collections.Specialized;
 using System.Globalization;
 using System.Security.Permissions;
+using System.Web.Util;
 
-namespace System.Web {
-
+namespace System.Web
+{
        // CAS
        [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
        [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-       public class HttpClientCertificate : NameValueCollection {
-
-               private HttpWorkerRequest hwr;
-               private int flags;
-               private DateTime from;
-               private DateTime until;
-
+       public class HttpClientCertificate : NameValueCollection
+       {
+               HttpWorkerRequest hwr;
+               int flags;
+               DateTime from;
+               DateTime until;
 
                internal HttpClientCertificate (HttpWorkerRequest hwr)
                {
-#if NET_2_0
                        // we don't check hwr for null so we end up throwing a 
                        // NullReferenceException just like MS implementation
                        // if the public ctor for HttpRequest is used
-#else
-                       if (hwr == null)
-                               throw new ArgumentNullException ("hwr");
-#endif
                        this.hwr = hwr;
                        flags = GetIntNoPresense ("CERT_FLAGS");
                        if (IsPresent) {
@@ -64,7 +59,6 @@ namespace System.Web {
                        }
                }
 
-
                public byte[] BinaryIssuer {
                        get { return hwr.GetClientCertificateBinaryIssuer (); }
                }
@@ -148,8 +142,8 @@ namespace System.Web {
                        }
                }
 
-               // private stuff
-               private int GetInt (string variable)
+               // stuff
+               int GetInt (string variable)
                {
                        if (!IsPresent)
                                return 0;
@@ -157,21 +151,21 @@ namespace System.Web {
                        return GetIntNoPresense (variable);
                }
 
-               private int GetIntNoPresense (string variable)
+               int GetIntNoPresense (string variable)
                {
                        string s = hwr.GetServerVariable (variable);
                        if (s == null)
                                return 0;
 
                        try {
-                               return Int32.Parse (s, CultureInfo.InvariantCulture);
+                               return Int32.Parse (s, Helpers.InvariantCulture);
                        }
                        catch {
                                return 0;
                        }
                }
 
-               private string GetString (string variable)
+               string GetString (string variable)
                {
                        if (!IsPresent)
                                return String.Empty;