+2010-07-23 Sebastien Pouliot <sebastien@ximian.com>
+
+ * ClientSessionCache.cs: Do not let the ValidityInterval be
+ controlled by an environment variable for Moonlight
+ * HttpsClientStream.cs: Simplify code for Moonlight profile
+
2010-05-10 Sebastien Pouliot <sebastien@ximian.com>
* CipherSuite.cs:
static ClientSessionInfo ()
{
+#if MOONLIGHT
+ ValidityInterval = DefaultValidityInterval;
+#else
string user_cache_timeout = Environment.GetEnvironmentVariable ("MONO_TLS_SESSION_CACHE_TIMEOUT");
if (user_cache_timeout == null) {
ValidityInterval = DefaultValidityInterval;
ValidityInterval = DefaultValidityInterval;
}
}
+#endif
}
public ClientSessionInfo (string hostname, byte[] id)
_status = 0;
if (buffer != null)
InputBuffer.Write (buffer, 0, buffer.Length);
-#if !NET_1_0
+#if !MOONLIGHT
// also saved from reflection
base.CheckCertRevocationStatus = ServicePointManager.CheckCertificateRevocationList;
-#endif
+
ClientCertSelection += delegate (X509CertificateCollection clientCerts, X509Certificate serverCertificate,
string targetHost, X509CertificateCollection serverRequestedCertificates) {
return ((clientCerts == null) || (clientCerts.Count == 0)) ? null : clientCerts [0];
X509Certificate2 cert = (certificate as X509Certificate2);
return (cert == null) ? null : cert.PrivateKey;
};
+#endif
}
public bool TrustFailure {
}
}
+#if MOONLIGHT
+ internal override bool RaiseServerCertificateValidation (X509Certificate certificate, int[] certificateErrors)
+ {
+ return true;
+ }
+#else
internal override bool RaiseServerCertificateValidation (X509Certificate certificate, int[] certificateErrors)
{
bool failed = (certificateErrors.Length > 0);
}
return failed;
}
+#endif
}
}