In .:
authorSebastien Pouliot <sebastien@ximian.com>
Wed, 21 Jul 2010 13:36:35 +0000 (13:36 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Wed, 21 Jul 2010 13:36:35 +0000 (13:36 -0000)
2010-07-21  Sebastien Pouliot  <sebastien@ximian.com>

* Makefile: Ensure SECURITY_DEP gets defined in our moonlight
raw profile

In System.Net:
2010-07-21  Sebastien Pouliot  <sebastien@ximian.com>

* ServicePointManager.cs: Add special validation for Moonlight
* WebConnection.cs: Change a define to NET_2_1

In System.Net.Security:
2010-07-21  Sebastien Pouliot  <sebastien@ximian.com>

* LocalCertificateSelectionCallback.cs:
* SslStream.cs:
Don't use alias in moonlight build (not needed and breaks
compilation otherwise)

svn path=/trunk/mcs/; revision=160675

mcs/class/System/ChangeLog
mcs/class/System/Makefile
mcs/class/System/System.Net.Security/ChangeLog
mcs/class/System/System.Net.Security/LocalCertificateSelectionCallback.cs
mcs/class/System/System.Net.Security/SslStream.cs
mcs/class/System/System.Net/ChangeLog
mcs/class/System/System.Net/ServicePointManager.cs
mcs/class/System/System.Net/WebConnection.cs

index 53e564dad4b0ec6b8ebd848aecaa1f629adb5898..321c80768286a3344a28f9451a1073e942c5149d 100644 (file)
@@ -1,3 +1,8 @@
+2010-07-21  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * Makefile: Ensure SECURITY_DEP gets defined in our moonlight
+       raw profile
+
 2010-05-10  Sebastien Pouliot  <sebastien@ximian.com>
 
        * moonlight_bootstrap_System.dll.sources: Minimal build for 
index 16f511676ae42bfaf80f4a78209c532859e9c04b..26b47c9cb3a2a876d39360b3d5fc127774f074ce 100644 (file)
@@ -31,6 +31,9 @@ NOT_SL := $(filter net_2_0 net_4_0 monotouch, $(PROFILE))
 endif
 ifeq (2.1, $(FRAMEWORK_VERSION))
 LIB_MCS_FLAGS += -d:INSIDE_SYSTEM
+ifeq (moonlight_raw, $(PROFILE))
+LIB_MCS_FLAGS += -d:SECURITY_DEP
+endif
 endif
 
 EXTRA_DISTFILES = \
index 7df7885d85b50f9c8b34a033d30861df6c81aa80..33c00ccbca6a802b33906174937f04e02ba012d6 100644 (file)
@@ -1,3 +1,10 @@
+2010-07-21  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * LocalCertificateSelectionCallback.cs:
+       * SslStream.cs:
+               Don't use alias in moonlight build (not needed and breaks
+               compilation otherwise)
+
 2010-06-29  Sebastien Pouliot  <sebastien@ximian.com>
 
        * RemoteCertificateValidationCallback.cs: Remove SECURITY_DEP use
index 7f062133d32ce587600c4e0b7b0175611c2d147b..dd3448675f048973b0de2400ee6d5b28be3ac4c0 100644 (file)
 //
 
 #if NET_2_0 && SECURITY_DEP
-extern alias PrebuiltSystem;
 
-using System.Security.Cryptography.X509Certificates;
+#if !MOONLIGHT
+extern alias PrebuiltSystem;
 
 using X509CertificateCollection = PrebuiltSystem::System.Security.Cryptography.X509Certificates.X509CertificateCollection;
+#endif
+
+using System.Security.Cryptography.X509Certificates;
 
 namespace System.Net.Security 
 {
index bd8b0162ca712568443eac97c9b08af15b553382..bcaeadac8968f3f75fa5606f692fc2762eeaa6ad 100644 (file)
 //
 
 #if NET_2_0 && SECURITY_DEP
+
+#if !MOONLIGHT
 extern alias PrebuiltSystem;
+using X509CertificateCollection = PrebuiltSystem::System.Security.Cryptography.X509Certificates.X509CertificateCollection;
+#endif
 
 using System;
 using System.IO;
@@ -51,8 +55,6 @@ using MonoHashAlgorithmType = Mono.Security.Protocol.Tls.HashAlgorithmType;
 using MonoExchangeAlgorithmType = Mono.Security.Protocol.Tls.ExchangeAlgorithmType;
 using MonoSecurityProtocolType = Mono.Security.Protocol.Tls.SecurityProtocolType;
 
-using X509CertificateCollection = PrebuiltSystem::System.Security.Cryptography.X509Certificates.X509CertificateCollection;
-
 namespace System.Net.Security 
 {
        [MonoTODO ("Non-X509Certificate2 certificate is not supported")]
index 4f6e98335d8d789a366883006f0eb8348350e531..28f2b747b7c503c5a4a8180b0d927f500e9cff8d 100644 (file)
@@ -1,3 +1,8 @@
+2010-07-21  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * ServicePointManager.cs: Add special validation for Moonlight
+       * WebConnection.cs: Change a define to NET_2_1
+
 2010-07-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
 
        * WebClient.cs: ignore values set in CachePolicy and
index e00b7d2b89b5370036a7cfd9cd3091f1ce587ef6..b277d9f89cc9430d8633987824445e1783f177e6 100644 (file)
@@ -377,7 +377,25 @@ namespace System.Net
                                        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;
index d197f837de4194afe12b5230902308c9fd7426e7..6cb5e1c7f2d9786bd07c435051c29cc80561f57e 100644 (file)
@@ -209,7 +209,7 @@ namespace System.Net
                                if (sslStream != null)
                                        return;
 
-#if MONOTOUCH && SECURITY_DEP
+#if NET_2_1 && SECURITY_DEP
                                sslStream = typeof (Mono.Security.Protocol.Tls.HttpsClientStream);
 #else
                                // HttpsClientStream is an internal glue class in Mono.Security.dll