// 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) {
}
}
-
public byte[] BinaryIssuer {
get { return hwr.GetClientCertificateBinaryIssuer (); }
}
}
}
- // private stuff
- private int GetInt (string variable)
+ // stuff
+ int GetInt (string variable)
{
if (!IsPresent)
return 0;
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;