using System.Collections;
using System.Threading;
using System.Threading.Tasks;
+using System.Security.Authentication.ExtendedProtection;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
ArrayList wait_queue; // List<ListenerAsyncResult> wait_queue;
Hashtable connections;
+ ServiceNameStore defaultServiceNames;
+ ExtendedProtectionPolicy extendedProtectionPolicy;
+ ExtendedProtectionSelector extendedProtectionSelectorDelegate;
+
+ public delegate ExtendedProtectionPolicy ExtendedProtectionSelector (HttpListenerRequest request);
+
public HttpListener ()
{
prefixes = new HttpListenerPrefixCollection (this);
ctx_queue = new ArrayList ();
wait_queue = new ArrayList ();
auth_schemes = AuthenticationSchemes.Anonymous;
+ defaultServiceNames = new ServiceNameStore ();
+ extendedProtectionPolicy = new ExtendedProtectionPolicy (PolicyEnforcement.Never);
}
internal HttpListener (X509Certificate certificate, IMonoTlsProvider tlsProvider, MSI.MonoTlsSettings tlsSettings)
}
}
+ public ExtendedProtectionSelector ExtendedProtectionSelectorDelegate
+ {
+ get { return extendedProtectionSelectorDelegate; }
+ set {
+ CheckDisposed();
+ if (value == null)
+ throw new ArgumentNullException ();
+
+ if (!AuthenticationManager.OSSupportsExtendedProtection)
+ throw new PlatformNotSupportedException (SR.GetString (SR.security_ExtendedProtection_NoOSSupport));
+
+ extendedProtectionSelectorDelegate = value;
+ }
+ }
+
public bool IgnoreWriteExceptions {
get { return ignore_write_exceptions; }
set {
}
}
+ [MonoTODO]
+ public HttpListenerTimeoutManager TimeoutManager {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ [MonoTODO ("not used anywhere in the implementation")]
+ public ExtendedProtectionPolicy ExtendedProtectionPolicy
+ {
+ get {
+ return extendedProtectionPolicy;
+ }
+ set {
+ CheckDisposed ();
+
+ if (value == null)
+ throw new ArgumentNullException ("value");
+
+ if (!AuthenticationManager.OSSupportsExtendedProtection && value.PolicyEnforcement == PolicyEnforcement.Always)
+ throw new PlatformNotSupportedException (SR.GetString(SR.security_ExtendedProtection_NoOSSupport));
+
+ if (value.CustomChannelBinding != null)
+ throw new ArgumentException (SR.GetString (SR.net_listener_cannot_set_custom_cbt), "CustomChannelBinding");
+
+ extendedProtectionPolicy = value;
+ }
+ }
+
+ public ServiceNameCollection DefaultServiceNames
+ {
+ get {
+ return defaultServiceNames.ServiceNames;
+ }
+ }
+
// TODO: use this
public string Realm {
get { return realm; }