using System.Net.Configuration;
using System.Security.Cryptography.X509Certificates;
-#if NET_2_0
using System.Globalization;
using System.Net.Security;
#if SECURITY_DEP
using Mono.Security.Protocol.Tls;
using MSX = Mono.Security.X509;
#endif
-#endif
//
// notes:
#endif
static bool useNagle;
#endif
-#if NET_2_0
static RemoteCertificateValidationCallback server_cert_cb;
-#endif
// Fields
set { _securityProtocol = value; }
}
-#if NET_2_0
public static RemoteCertificateValidationCallback ServerCertificateValidationCallback
{
get {
server_cert_cb = value;
}
}
-#endif
#if NET_1_1
public static bool Expect100Continue {
servicePoints.Remove (list.GetByIndex (i));
}
}
-#if NET_2_0 && SECURITY_DEP
+#if MOONLIGHT && SECURITY_DEP
+ internal class ChainValidationHelper {
+ object sender;
+
+ public ChainValidationHelper (object sender)
+ {
+ this.sender = sender;
+ }
+
+ // no need to check certificates since we are either
+ // (a) loading from the site of origin (and we accepted its certificate to load from it)
+ // (b) loading from a cross-domain site and we downloaded the policy file using the browser stack
+ // i.e. the certificate was accepted (or the policy would not be valid)
+ internal ValidationResult ValidateChain (Mono.Security.X509.X509CertificateCollection certs)
+ {
+ return new ValidationResult (true, false, 0);
+ }
+ }
+#elif NET_2_0 && SECURITY_DEP
internal class ChainValidationHelper {
object sender;
string host;