Merge pull request #3609 from xmcclure/checked-imageset
authormonojenkins <jo.shields+jenkins@xamarin.com>
Thu, 22 Sep 2016 20:15:03 +0000 (22:15 +0200)
committerGitHub <noreply@github.com>
Thu, 22 Sep 2016 20:15:03 +0000 (22:15 +0200)
Fix outstanding failures in "metadata" checked build mode

Fix two problems with the checked build metadata mode which were causing spurious failures, one a bug introduced by my last commit, one of which has been present since the start:

- Check assemblies in `references[]` are non-NULL before looking up their images
- A "from" imageset only needs to reference every image in the "to" imageset, it does not need to actually contain every image.

Also added support for a checked build jenkins lane.

74 files changed:
eglib/src/gfile-win32.c
eglib/src/glib.h
man/mkbundle.1
mcs/class/Makefile
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StackFrame.cs
mcs/class/Mono.Debugger.Soft/Test/dtest.cs
mcs/class/Mono.Security.Providers.DotNet/Makefile [deleted file]
mcs/class/Mono.Security.Providers.DotNet/Mono.Security.Providers.DotNet-net_4_x.csproj [deleted file]
mcs/class/Mono.Security.Providers.DotNet/Mono.Security.Providers.DotNet.dll.sources [deleted file]
mcs/class/Mono.Security.Providers.DotNet/Mono.Security.Providers.DotNet/DotNetSslStreamImpl.cs [deleted file]
mcs/class/Mono.Security.Providers.DotNet/Mono.Security.Providers.DotNet/DotNetTlsProvider.cs [deleted file]
mcs/class/Mono.Security.Providers.DotNet/Properties/AssemblyInfo.cs [deleted file]
mcs/class/Mono.Security.Providers.DotNet/README.md [deleted file]
mcs/class/Mono.Security.Providers.NewSystemSource/Makefile [deleted file]
mcs/class/Mono.Security.Providers.NewSystemSource/Mono.Security.Providers.NewSystemSource-net_4_x.csproj [deleted file]
mcs/class/Mono.Security.Providers.NewSystemSource/Mono.Security.Providers.NewSystemSource.dll.sources [deleted file]
mcs/class/Mono.Security.Providers.NewSystemSource/Properties/AssemblyInfo.cs [deleted file]
mcs/class/Mono.Security.Providers.NewSystemSource/README.md [deleted file]
mcs/class/Mono.Security.Providers.NewTls/Makefile [deleted file]
mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls-net_4_x.csproj [deleted file]
mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls.dll.sources [deleted file]
mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls/ITlsConfiguration.cs [deleted file]
mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls/ITlsContext.cs [deleted file]
mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls/MonoNewTlsStream.cs [deleted file]
mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls/MonoNewTlsStreamFactory.cs [deleted file]
mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls/NewTlsProvider.cs [deleted file]
mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls/TlsContextWrapper.cs [deleted file]
mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls/TlsProviderFactory.cs [deleted file]
mcs/class/Mono.Security.Providers.NewTls/Properties/AssemblyInfo.cs [deleted file]
mcs/class/Mono.Security.Providers.NewTls/mobile_Mono.Security.Providers.NewTls.dll.sources [deleted file]
mcs/class/Mono.Security.Providers.NewTls/mobile_static_Mono.Security.Providers.NewTls.dll.sources [deleted file]
mcs/class/Mono.Security.Providers.OldTls/Makefile [deleted file]
mcs/class/Mono.Security.Providers.OldTls/Mono.Security.Providers.OldTls-net_4_x.csproj [deleted file]
mcs/class/Mono.Security.Providers.OldTls/Mono.Security.Providers.OldTls.dll.sources [deleted file]
mcs/class/Mono.Security.Providers.OldTls/Mono.Security.Providers.OldTls/OldTlsProvider.cs [deleted file]
mcs/class/Mono.Security.Providers.OldTls/Properties/AssemblyInfo.cs [deleted file]
mcs/class/Mono.Security/Assembly/AssemblyInfo.cs
mcs/class/Mono.Security/Mono.Security.Interface/MonoTlsConnectionInfo.cs
mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.cs
mcs/class/System/Assembly/AssemblyInfo.cs
mcs/class/System/Mono.Net.Security/MonoTlsProviderFactory.cs
mcs/class/System/ReferenceSources/Internal.cs [deleted file]
mcs/class/System/ReferenceSources/SSPIConfiguration.cs [deleted file]
mcs/class/System/ReferenceSources/SSPISafeHandles.cs [deleted file]
mcs/class/System/ReferenceSources/SSPIWrapper.cs [deleted file]
mcs/class/System/ReferenceSources/SslStream.cs [deleted file]
mcs/class/System/ReferenceSources/_SecureChannel.cs [deleted file]
mcs/class/System/ReferenceSources/_SslState.cs [deleted file]
mcs/class/System/ReferenceSources/_SslStream.cs [deleted file]
mcs/class/System/System-bare-net_4_x.csproj
mcs/class/System/System-net_4_x.csproj
mcs/class/System/System.Net.NetworkInformation/IPAddressCollection.cs
mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs
mcs/class/System/System.dll.sources
mcs/class/System/Test/System.Net.NetworkInformation/IPInterfacePropertiesTest.cs
mcs/class/System/mobile_System.dll.sources
mcs/class/corlib/Assembly/AssemblyInfo.cs
mcs/class/corlib/Test/System/GCTest.cs [new file with mode: 0644]
mcs/class/corlib/corlib_test.dll.sources
mcs/tools/corcompare/mono-api-info.cs
mcs/tools/mkbundle/mkbundle.cs
mono/metadata/icall-def.h
mono/metadata/loader.c
mono/metadata/loader.h
mono/metadata/sgen-os-win32.c
mono/mini/debugger-agent.c
mono/mini/main.c
mono/utils/mono-counters.c
mono/utils/mono-threads.c
msvc/mono.def
msvc/monosgen.def
msvc/scripts/order.xml
net_4_x.sln

index 2dde793dfeec7409333f5d7468a1278ae0cb5286..61e23cbe442856e8cabea65ed09ac4e6ec3d3c3c 100644 (file)
@@ -35,6 +35,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <sys/types.h>
+#include <direct.h>
 
 #ifdef G_OS_WIN32
 #include <io.h>
@@ -68,6 +69,26 @@ int mkstemp (char *tmp_template)
        return fd;
 }
 
+gchar *
+g_mkdtemp (char *tmp_template)
+{
+       gunichar2* utf16_template;
+
+       utf16_template  = u8to16 (tmp_template);
+
+       utf16_template = _wmktemp(utf16_template);
+       if (utf16_template && *utf16_template) {
+               if (_wmkdir (utf16_template) == 0){
+                       char *ret = u16to8 (utf16_template);
+                       g_free (utf16_template);
+                       return ret;
+               }
+       }
+
+       g_free (utf16_template);
+       return NULL;
+}
+            
 #ifdef _MSC_VER
 #pragma warning(disable:4701)
 #endif
index 23781c168526edd95498a3260697cbd76af23ff6..d7173264c1b580ee1b65a47a21a7b8977f614005 100644 (file)
@@ -887,6 +887,12 @@ gboolean   g_file_test (const gchar *filename, GFileTest test);
 #define g_ascii_strtod strtod
 #define g_ascii_isalnum isalnum
 
+#ifdef WIN32
+gchar *g_mkdtemp (gchar *tmpl);
+#else
+#define g_mkdtemp mkdtemp
+#endif
+
 /*
  * Pattern matching
  */
index 95861e0aeab8e58ebbaaf64c8758ffe813b0f818..305cfcc7f7224d787f72e728310c6a0e66c49d43 100644 (file)
@@ -159,10 +159,16 @@ flag to bundle all available encodings.
 Or you can use a comma delimited list of the workds CJK, MidWest,
 Other, Rare and West to specificy which encoding assemblies to distribute.
 .TP
-.TP
 .I "-L path"
 Adds the `path' do the search list for assemblies.  The rules are the
 same as for the compiler -lib: or -L flags.
+.TP
+.I "--library [LIB,]PATH"
+Embeds the dynamic library file pointed to by `PATH' and optionally
+give it the name `LIB' into the bundled executable.   This is used to
+ship native library dependencies that are unpacked at startup and
+loaded from the runtime.
+.TP
 .I "--lists-targets"
 Lists all of the available local cross compilation targets available
 as precompiled binaries on the Mono distribution server.
index f9ff19f76daaef6fba55e1e370d13050e90cb521..e170ff9c9964324fb67db81714d6468c3a330bec 100644 (file)
@@ -51,9 +51,6 @@ mobile_common_dirs := \
        System.Xml.Serialization \
        Mono.CSharp     \
        Microsoft.CSharp \
-       Mono.Security.Providers.DotNet  \
-       Mono.Security.Providers.NewSystemSource \
-       Mono.Security.Providers.NewTls  \
        System.Runtime.InteropServices.RuntimeInformation       \
        System.Reflection.DispatchProxy \
        System.Xml.XPath.XmlDocument \
@@ -140,10 +137,6 @@ xammac_4_5_dirs := \
        System.Data.Linq                \
        System.Net.Http \
        System.Net.Http.WebRequest \
-       Mono.Security.Providers.DotNet \
-       Mono.Security.Providers.OldTls \
-       Mono.Security.Providers.NewSystemSource \
-       Mono.Security.Providers.NewTls \
        System.Runtime.InteropServices.RuntimeInformation \
        System.Reflection.Context       \
        System.Net.Http.WinHttpHandler  \
@@ -232,8 +225,6 @@ net_4_x_dirs := \
        System.Web.Http \
        System.Web.Http.SelfHost \
        System.Web.Http.WebHost \
-       Mono.Security.Providers.NewSystemSource \
-       Mono.Security.Providers.NewTls \
        System.Runtime.InteropServices.RuntimeInformation
 
 # These are the subdirs which depends on libs in net_4_x_dirs
@@ -277,8 +268,6 @@ net_4_x_parallel_dirs := \
        System.ComponentModel.Composition.4.5 \
        System.Windows \
        System.Xml.Serialization \
-       Mono.Security.Providers.DotNet \
-       Mono.Security.Providers.OldTls \
        System.DirectoryServices.Protocols      \
        RabbitMQ.Client                 \
        Microsoft.VisualC               \
index 93e9a959eee4900912bf6f521a86a3acd01e9d31..a5b902db57322eaff402889d0becf162902b735b 100644 (file)
@@ -420,7 +420,7 @@ namespace Mono.Debugger.Soft
                 * with newer runtimes, and vice versa.
                 */
                internal const int MAJOR_VERSION = 2;
-               internal const int MINOR_VERSION = 43;
+               internal const int MINOR_VERSION = 44;
 
                enum WPSuspendPolicy {
                        NONE = 0,
@@ -590,6 +590,7 @@ namespace Mono.Debugger.Soft
                        GET_THIS = 2,
                        SET_VALUES = 3,
                        GET_DOMAIN = 4,
+                       SET_THIS = 5,
                }
 
                enum CmdArrayRef {
@@ -2410,6 +2411,10 @@ namespace Mono.Debugger.Soft
                        return SendReceive (CommandSet.STACK_FRAME, (int)CmdStackFrame.GET_DOMAIN, new PacketWriter ().WriteId (thread_id).WriteId (id)).ReadId ();
                }
 
+               internal void StackFrame_SetThis (long thread_id, long id, ValueImpl value) {
+                       SendReceive (CommandSet.STACK_FRAME, (int)CmdStackFrame.SET_THIS, new PacketWriter ().WriteId (thread_id).WriteId (id).WriteValue (value));
+               }
+
                /*
                 * ARRAYS
                 */
index f160c4a37a716890c6619877aaff762374e10395..c92f2240ef8036b0d2a162a82846dba70c082bfb 100644 (file)
@@ -166,6 +166,15 @@ namespace Mono.Debugger.Soft
                        return vm.DecodeValue (vm.conn.StackFrame_GetThis (thread.Id, Id));
                }
 
+               // Since protocol version 2.44
+               public void SetThis (Value value) {
+                       if (value == null)
+                               throw new ArgumentNullException ("value");
+                       if (Method.IsStatic || !Method.DeclaringType.IsValueType)
+                               throw new InvalidOperationException ("The frame's method needs to be a valuetype instance method.");
+                       vm.conn.StackFrame_SetThis (thread.Id, Id, vm.EncodeValue (value));
+               }
+
                public void SetValue (LocalVariable var, Value value) {
                        if (var == null)
                                throw new ArgumentNullException ("var");
index 581e90744aafe5ab50bcb89d996758ddc3f78113..505ab2abdbed718b6c4b74e583045da1a0fc4ab2 100644 (file)
@@ -1775,6 +1775,16 @@ public class DebuggerTests
                AssertValue ("T", s ["s"]);
                AssertValue (45, s ["k"]);
 
+               // Test SetThis ()
+               s ["i"] = vm.CreateValue (55);
+               frame.SetThis (s);
+               obj = frame.GetThis ();
+               Assert.IsTrue (obj is StructMirror);
+               s = obj as StructMirror;
+               AssertValue (55, s ["i"]);
+               AssertValue ("T", s ["s"]);
+               AssertValue (45, s ["k"]);
+
                // this on static vtype methods
                e = run_until ("vtypes3");
                e = step_until (e.Thread, "static_foo");
diff --git a/mcs/class/Mono.Security.Providers.DotNet/Makefile b/mcs/class/Mono.Security.Providers.DotNet/Makefile
deleted file mode 100644 (file)
index a42b8c5..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-thisdir = class/Mono.Security.Providers.DotNet
-SUBDIRS = 
-include ../../build/rules.make
-
-LIBRARY = Mono.Security.Providers.DotNet.dll
-LIB_REFS = System Mono.Security
-LIB_MCS_FLAGS = -unsafe -nowarn:1030 -keyfile:../mono.pub -delaysign
-
-EXTRA_DISTFILES = README.md
-
-include ../../build/library.make
-
-$(the_lib): ../Mono.Security/Makefile
-
diff --git a/mcs/class/Mono.Security.Providers.DotNet/Mono.Security.Providers.DotNet-net_4_x.csproj b/mcs/class/Mono.Security.Providers.DotNet/Mono.Security.Providers.DotNet-net_4_x.csproj
deleted file mode 100644 (file)
index 115c3f2..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
-  <PropertyGroup>\r
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
-    <ProductVersion>9.0.30729</ProductVersion>\r
-    <SchemaVersion>2.0</SchemaVersion>\r
-    <ProjectGuid>{391EDD2B-85AC-4FCA-B607-AAD6C51E6799}</ProjectGuid>\r
-    <OutputType>Library</OutputType>\r
-    <NoWarn>1699,1030</NoWarn>\r
-    <OutputPath>./../../class/lib/net_4_x</OutputPath>\r
-    <IntermediateOutputPath>obj-net_4_x</IntermediateOutputPath>\r
-    <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>\r
-    <NoStdLib>True</NoStdLib>\r
-    \r
-    <NoConfig>True</NoConfig>\r
-    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>\r
-    <AppDesignerFolder>Properties</AppDesignerFolder>\r
-    <RootNamespace>\r
-    </RootNamespace>\r
-    <AssemblyName>Mono.Security.Providers.DotNet</AssemblyName>\r
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
-    <FileAlignment>512</FileAlignment>\r
-  </PropertyGroup>\r
-    <PropertyGroup>\r
-    <SignAssembly>true</SignAssembly>\r
-    <DelaySign>true</DelaySign>\r
-  </PropertyGroup>\r
-  <PropertyGroup>\r
-    <AssemblyOriginatorKeyFile>../mono.pub</AssemblyOriginatorKeyFile>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
-    <DebugSymbols>true</DebugSymbols>\r
-    <DebugType>full</DebugType>\r
-    <NoWarn>1699,1030</NoWarn>\r
-    <Optimize>false</Optimize>\r
-    <DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>\r
-    <ErrorReport>prompt</ErrorReport>\r
-    <WarningLevel>4</WarningLevel>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
-    <DebugType>pdbonly</DebugType>\r
-    <NoWarn>1699,1030</NoWarn>\r
-    <Optimize>true</Optimize>\r
-    <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>\r
-    <ErrorReport>prompt</ErrorReport>\r
-    <WarningLevel>4</WarningLevel>\r
-  </PropertyGroup>\r
-  <!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0, \r
-  Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This\r
-  is a problem to compile the Mono mscorlib.dll -->\r
-  <PropertyGroup>\r
-    <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>\r
-  </PropertyGroup>\r
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
-  <ItemGroup>\r
-    <Compile Include="..\..\build\common\Consts.cs" />\r
-    <Compile Include="..\..\build\common\Locale.cs" />\r
-    <Compile Include=".\Mono.Security.Providers.DotNet\DotNetSslStreamImpl.cs" />\r
-    <Compile Include=".\Mono.Security.Providers.DotNet\DotNetTlsProvider.cs" />\r
-    <Compile Include=".\Properties\AssemblyInfo.cs" />\r  </ItemGroup>\r
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
-       Other similar extension points exist, see Microsoft.Common.targets.\r
-  <Target Name="BeforeBuild">\r
-  </Target>\r
-  <Target Name="AfterBuild">\r
-  </Target>\r
-  -->\r
-  <PropertyGroup>\r
-    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
-
-    </PreBuildEvent>\r
-    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
-\r
-    </PreBuildEvent>\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
-
-    </PostBuildEvent>\r
-    <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
-\r
-    </PostBuildEvent>\r
-  </PropertyGroup>\r
-  <ItemGroup>\r
-    <ProjectReference Include="../corlib/corlib-net_4_x.csproj">\r
-      <Project>{2CA6026B-2DC8-4C4C-A12C-1E8234049DB7}</Project>\r
-      <Name>corlib-net_4_x</Name>\r
-    </ProjectReference>\r
-    <ProjectReference Include="../System/System-net_4_x.csproj">\r
-      <Project>{2762E921-91A8-4C87-91E9-BA628013F753}</Project>\r
-      <Name>System-net_4_x</Name>\r
-    </ProjectReference>\r
-    <ProjectReference Include="../Mono.Security/Mono.Security-net_4_x.csproj">\r
-      <Project>{42D59DE7-586F-4ACF-BDD5-E7869E39E3EF}</Project>\r
-      <Name>Mono.Security-net_4_x</Name>\r
-    </ProjectReference>\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <Folder Include="Properties\" />\r
-  </ItemGroup>\r
-</Project>\r
-
diff --git a/mcs/class/Mono.Security.Providers.DotNet/Mono.Security.Providers.DotNet.dll.sources b/mcs/class/Mono.Security.Providers.DotNet/Mono.Security.Providers.DotNet.dll.sources
deleted file mode 100644 (file)
index 7afb9f3..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-./Properties/AssemblyInfo.cs
-../../build/common/Consts.cs
-../../build/common/Locale.cs
-
-./Mono.Security.Providers.DotNet/DotNetTlsProvider.cs
-./Mono.Security.Providers.DotNet/DotNetSslStreamImpl.cs
diff --git a/mcs/class/Mono.Security.Providers.DotNet/Mono.Security.Providers.DotNet/DotNetSslStreamImpl.cs b/mcs/class/Mono.Security.Providers.DotNet/Mono.Security.Providers.DotNet/DotNetSslStreamImpl.cs
deleted file mode 100644 (file)
index c6be703..0000000
+++ /dev/null
@@ -1,317 +0,0 @@
-//
-// DotNetSslStreamImpl.cs
-//
-// Author:
-//       Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2015 Xamarin, Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.IO;
-using System.Net;
-using System.Net.Security;
-using System.Threading.Tasks;
-using System.Security.Authentication;
-using System.Security.Cryptography.X509Certificates;
-using System.Security.Principal;
-using System.Security.Cryptography;
-using MSI = Mono.Security.Interface;
-
-namespace Mono.Security.Providers.DotNet
-{
-       class DotNetSslStreamImpl : MSI.IMonoSslStream
-       {
-               DotNetTlsProvider provider;
-               SslStream impl;
-
-               internal SslStream Impl {
-                       get {
-                               CheckDisposed ();
-                               return impl;
-                       }
-               }
-
-               public DotNetSslStreamImpl (
-                       Stream innerStream, bool leaveInnerStreamOpen, DotNetTlsProvider provider,
-                       RemoteCertificateValidationCallback userCertificateValidationCallback,
-                       LocalCertificateSelectionCallback userCertificateSelectionCallback)
-               {
-                       this.provider = provider;
-                       impl = new SslStream (
-                               innerStream, leaveInnerStreamOpen,
-                               userCertificateValidationCallback,
-                               userCertificateSelectionCallback);
-               }
-
-               public void AuthenticateAsClient (string targetHost)
-               {
-                       Impl.AuthenticateAsClient (targetHost);
-               }
-
-               public void AuthenticateAsClient (string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
-               {
-                       Impl.AuthenticateAsClient (targetHost, clientCertificates, enabledSslProtocols, checkCertificateRevocation);
-               }
-
-               public IAsyncResult BeginAuthenticateAsClient (string targetHost, AsyncCallback asyncCallback, object asyncState)
-               {
-                       return Impl.BeginAuthenticateAsClient (targetHost, asyncCallback, asyncState);
-               }
-
-               public IAsyncResult BeginAuthenticateAsClient (string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState)
-               {
-                       return Impl.BeginAuthenticateAsClient (targetHost, clientCertificates, enabledSslProtocols, checkCertificateRevocation, asyncCallback, asyncState);
-               }
-
-               public void EndAuthenticateAsClient (IAsyncResult asyncResult)
-               {
-                       Impl.EndAuthenticateAsClient (asyncResult);
-               }
-
-               public void AuthenticateAsServer (X509Certificate serverCertificate)
-               {
-                       Impl.AuthenticateAsServer (serverCertificate);
-               }
-
-               public void AuthenticateAsServer (X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
-               {
-                       Impl.AuthenticateAsServer (serverCertificate, clientCertificateRequired, enabledSslProtocols, checkCertificateRevocation);
-               }
-
-               public IAsyncResult BeginAuthenticateAsServer (X509Certificate serverCertificate, AsyncCallback asyncCallback, object asyncState)
-               {
-                       return Impl.BeginAuthenticateAsServer (serverCertificate, asyncCallback, asyncState);
-               }
-
-               public IAsyncResult BeginAuthenticateAsServer (X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState)
-               {
-                       return Impl.BeginAuthenticateAsServer (serverCertificate, clientCertificateRequired, enabledSslProtocols, checkCertificateRevocation, asyncCallback, asyncState);
-               }
-
-               public void EndAuthenticateAsServer (IAsyncResult asyncResult)
-               {
-                       Impl.EndAuthenticateAsServer (asyncResult);
-               }
-
-               public Task AuthenticateAsClientAsync (string targetHost)
-               {
-                       return Impl.AuthenticateAsClientAsync (targetHost);
-               }
-
-               public Task AuthenticateAsClientAsync (string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
-               {
-                       return Impl.AuthenticateAsClientAsync (targetHost, clientCertificates, enabledSslProtocols, checkCertificateRevocation);
-               }
-
-               public Task AuthenticateAsServerAsync (X509Certificate serverCertificate)
-               {
-                       return Impl.AuthenticateAsServerAsync (serverCertificate);
-               }
-
-               public Task AuthenticateAsServerAsync (X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
-               {
-                       return Impl.AuthenticateAsServerAsync (serverCertificate, clientCertificateRequired, enabledSslProtocols, checkCertificateRevocation);
-               }
-
-               public void Flush ()
-               {
-                       Impl.Flush ();
-               }
-
-               public int Read (byte[] buffer, int offset, int count)
-               {
-                       return Impl.Read (buffer, offset, count);
-               }
-
-               public void Write (byte[] buffer)
-               {
-                       Impl.Write (buffer);
-               }
-
-               public void Write (byte[] buffer, int offset, int count)
-               {
-                       Impl.Write (buffer, offset, count);
-               }
-
-               public IAsyncResult BeginRead (byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState)
-               {
-                       return Impl.BeginRead (buffer, offset, count, asyncCallback, asyncState);
-               }
-
-               public int EndRead (IAsyncResult asyncResult)
-               {
-                       return Impl.EndRead (asyncResult);
-               }
-
-               public IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState)
-               {
-                       return Impl.BeginWrite (buffer, offset, count, asyncCallback, asyncState);
-               }
-
-               public void EndWrite (IAsyncResult asyncResult)
-               {
-                       Impl.EndWrite (asyncResult);
-               }
-
-               public TransportContext TransportContext {
-                       get { throw new NotSupportedException (); }
-               }
-
-               public bool IsAuthenticated {
-                       get { return Impl.IsAuthenticated; }
-               }
-
-               public bool IsMutuallyAuthenticated {
-                       get { return Impl.IsMutuallyAuthenticated; }
-               }
-
-               public bool IsEncrypted {
-                       get { return Impl.IsEncrypted; }
-               }
-
-               public bool IsSigned {
-                       get { return Impl.IsSigned; }
-               }
-
-               public bool IsServer {
-                       get { return Impl.IsServer; }
-               }
-
-               public CipherAlgorithmType CipherAlgorithm {
-                       get { return Impl.CipherAlgorithm; }
-               }
-
-               public int CipherStrength {
-                       get { return Impl.CipherStrength; }
-               }
-
-               public HashAlgorithmType HashAlgorithm {
-                       get { return Impl.HashAlgorithm; }
-               }
-
-               public int HashStrength {
-                       get { return Impl.HashStrength; }
-               }
-
-               public ExchangeAlgorithmType KeyExchangeAlgorithm {
-                       get { return Impl.KeyExchangeAlgorithm; }
-               }
-
-               public int KeyExchangeStrength {
-                       get { return KeyExchangeStrength; }
-               }
-
-               public bool CanRead {
-                       get { return Impl.CanRead; }
-               }
-
-               public bool CanTimeout {
-                       get { return Impl.CanTimeout; }
-               }
-
-               public bool CanWrite {
-                       get { return Impl.CanWrite; }
-               }
-
-               public long Length {
-                       get { return Impl.Length; }
-               }
-
-               public long Position {
-                       get { return Impl.Position; }
-               }
-
-               public void SetLength (long value)
-               {
-                       Impl.SetLength (value);
-               }
-
-               public AuthenticatedStream AuthenticatedStream {
-                       get { return Impl; }
-               }
-
-               public int ReadTimeout {
-                       get { return Impl.ReadTimeout; }
-                       set { Impl.ReadTimeout = value; }
-               }
-
-               public int WriteTimeout {
-                       get { return Impl.WriteTimeout; }
-                       set { Impl.WriteTimeout = value; }
-               }
-
-               public bool CheckCertRevocationStatus {
-                       get { return Impl.CheckCertRevocationStatus; }
-               }
-
-               public X509Certificate InternalLocalCertificate {
-                       get {
-                               try {
-                                       return LocalCertificate;
-                               } catch {
-                                       return null;
-                               }
-                       }
-               }
-
-               public X509Certificate LocalCertificate {
-                       get { return Impl.LocalCertificate; }
-               }
-
-               public X509Certificate RemoteCertificate {
-                       get { return Impl.RemoteCertificate; }
-               }
-
-               public SslProtocols SslProtocol {
-                       get { return Impl.SslProtocol; }
-               }
-
-               MSI.MonoTlsProvider MSI.IMonoSslStream.Provider {
-                       get { return provider; }
-               }
-
-               MSI.MonoTlsConnectionInfo MSI.IMonoSslStream.GetConnectionInfo ()
-               {
-                       return null;
-               }
-
-               void CheckDisposed ()
-               {
-                       if (impl == null)
-                               throw new ObjectDisposedException ("MonoSslStream");
-               }
-
-               public void Dispose ()
-               {
-                       Dispose (true);
-                       GC.SuppressFinalize (this);
-               }
-
-               protected void Dispose (bool disposing)
-               {
-                       if (impl != null && disposing) {
-                               impl.Dispose ();
-                               impl = null;
-                       }
-               }
-       }
-}
-
diff --git a/mcs/class/Mono.Security.Providers.DotNet/Mono.Security.Providers.DotNet/DotNetTlsProvider.cs b/mcs/class/Mono.Security.Providers.DotNet/Mono.Security.Providers.DotNet/DotNetTlsProvider.cs
deleted file mode 100644 (file)
index 3be685a..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-//
-// MonoDefaultTlsProvider.cs
-//
-// Author:
-//       Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2015 Xamarin, Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-using System;
-using System.IO;
-using System.Net;
-using System.Net.Security;
-using System.Security.Authentication;
-using System.Security.Cryptography.X509Certificates;
-using Mono.Security.Interface;
-
-namespace Mono.Security.Providers.DotNet
-{
-       /*
-        * This provider only uses the public .NET APIs from System.dll.
-        * 
-        * It is primarily intended for testing.
-        */
-       public class DotNetTlsProvider : MonoTlsProvider
-       {
-               static readonly Guid id = new Guid ("3a7b3a26-0dbd-4572-a5b8-fdce766bf0dd");
-
-               public override Guid ID {
-                       get { return id; }
-               }
-
-               public override string Name {
-                       get { return "dotnet"; }
-               }
-
-               public override bool SupportsSslStream {
-                       get { return true; }
-               }
-
-               public override bool SupportsConnectionInfo {
-                       get { return false; }
-               }
-
-               public override bool SupportsMonoExtensions {
-                       get { return false; }
-               }
-
-               internal override bool SupportsTlsContext {
-                       get { return false; }
-               }
-
-               public override SslProtocols SupportedProtocols {
-                       get { return (SslProtocols)ServicePointManager.SecurityProtocol; }
-               }
-
-               public override IMonoSslStream CreateSslStream (
-                       Stream innerStream, bool leaveInnerStreamOpen,
-                       MonoTlsSettings settings = null)
-               {
-                       if (settings != null)
-                               throw new NotSupportedException ("Mono-specific API Extensions not available.");
-
-                       RemoteCertificateValidationCallback validation_callback = null;
-                       LocalCertificateSelectionCallback selection_callback = null;
-
-                       if (settings != null) {
-                               validation_callback = ConvertCallback (settings.RemoteCertificateValidationCallback);
-                               selection_callback = ConvertCallback (settings.ClientCertificateSelectionCallback);
-                       }
-
-                       return new DotNetSslStreamImpl (innerStream, leaveInnerStreamOpen, this, validation_callback, selection_callback);
-               }
-
-               internal override IMonoTlsContext CreateTlsContext (
-                       string hostname, bool serverMode, TlsProtocols protocolFlags,
-                       X509Certificate serverCertificate, X509CertificateCollection clientCertificates,
-                       bool remoteCertRequired, MonoEncryptionPolicy encryptionPolicy,
-                       MonoTlsSettings settings)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               internal static RemoteCertificateValidationCallback ConvertCallback (MonoRemoteCertificateValidationCallback callback)
-               {
-                       if (callback == null)
-                               return null;
-
-                       return (s, c, ch, e) => callback (null, c, ch, (MonoSslPolicyErrors)e);
-               }
-
-               internal static LocalCertificateSelectionCallback ConvertCallback (MonoLocalCertificateSelectionCallback callback)
-               {
-                       if (callback == null)
-                               return null;
-
-                       return (s, t, lc, rc, ai) => callback (t, lc, rc, ai);
-               }
-
-       }
-}
-
diff --git a/mcs/class/Mono.Security.Providers.DotNet/Properties/AssemblyInfo.cs b/mcs/class/Mono.Security.Providers.DotNet/Properties/AssemblyInfo.cs
deleted file mode 100644 (file)
index cbbd002..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// AssemblyInfo.cs
-//
-// Author:
-//       Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2015 Xamarin, Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-using System;
-using System.Reflection;
-using System.Resources;
-using System.Security;
-using System.Security.Permissions;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about the system assembly
-
-[assembly: AssemblyVersion (Consts.FxVersion)]
-
-[assembly: AssemblyCompany ("MONO development team")]
-[assembly: AssemblyCopyright ("(c) 2015 Xamarin")]
-[assembly: AssemblyDescription ("Mono.Security.Providers.DotNet.dll")]
-[assembly: AssemblyProduct ("MONO CLI")]
-[assembly: AssemblyTitle ("Mono.Security.Providers.DotNet.dll")]
-[assembly: CLSCompliant (true)]
-[assembly: ComVisible (false)]
-[assembly: NeutralResourcesLanguage ("en-US")]
-
diff --git a/mcs/class/Mono.Security.Providers.DotNet/README.md b/mcs/class/Mono.Security.Providers.DotNet/README.md
deleted file mode 100644 (file)
index 4c47efd..0000000
+++ /dev/null
@@ -1 +0,0 @@
-See mcs/class/Mono.Security.Providers.NewSystemSource/README.md for a detailed README.
diff --git a/mcs/class/Mono.Security.Providers.NewSystemSource/Makefile b/mcs/class/Mono.Security.Providers.NewSystemSource/Makefile
deleted file mode 100644 (file)
index 61beeb4..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-thisdir = class/Mono.Security.Providers.NewSystemSource
-SUBDIRS = 
-include ../../build/rules.make
-
-LIB_REFS = System
-
-LIBRARY = Mono.Security.Providers.NewSystemSource.dll
-
-LIB_MCS_FLAGS = -d:SECURITY_DEP \
-       -unsafe -nowarn:1030 -keyfile:../mono.pub -delaysign -d:MONO -d:FEATURE_PAL -d:MONO_FEATURE_NEW_TLS \
-       -d:MONO_FEATURE_NEW_SYSTEM_SOURCE -d:DISABLE_CAS_USE
-
-ifdef MOBILE_PROFILE
-LIB_REFS += Mono.Security
-else
-LIB_REFS += MonoSecurity=Mono.Security
-LIB_MCS_FLAGS += -d:MONO_SECURITY_ALIAS
-endif
-
-EXTRA_DISTFILES = README.md
-
-include ../../build/library.make
-
-$(the_lib): ../Mono.Security/Makefile
diff --git a/mcs/class/Mono.Security.Providers.NewSystemSource/Mono.Security.Providers.NewSystemSource-net_4_x.csproj b/mcs/class/Mono.Security.Providers.NewSystemSource/Mono.Security.Providers.NewSystemSource-net_4_x.csproj
deleted file mode 100644 (file)
index 771d99f..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
-  <PropertyGroup>\r
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
-    <ProductVersion>9.0.30729</ProductVersion>\r
-    <SchemaVersion>2.0</SchemaVersion>\r
-    <ProjectGuid>{0BB4541F-9B1A-4CBC-BEB1-00B31B37F74E}</ProjectGuid>\r
-    <OutputType>Library</OutputType>\r
-    <NoWarn>1699,1030</NoWarn>\r
-    <OutputPath>./../../class/lib/net_4_x</OutputPath>\r
-    <IntermediateOutputPath>obj-net_4_x</IntermediateOutputPath>\r
-    <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>\r
-    <NoStdLib>True</NoStdLib>\r
-    \r
-    <NoConfig>True</NoConfig>\r
-    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>\r
-    <AppDesignerFolder>Properties</AppDesignerFolder>\r
-    <RootNamespace>\r
-    </RootNamespace>\r
-    <AssemblyName>Mono.Security.Providers.NewSystemSource</AssemblyName>\r
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
-    <FileAlignment>512</FileAlignment>\r
-  </PropertyGroup>\r
-    <PropertyGroup>\r
-    <SignAssembly>true</SignAssembly>\r
-    <DelaySign>true</DelaySign>\r
-  </PropertyGroup>\r
-  <PropertyGroup>\r
-    <AssemblyOriginatorKeyFile>../mono.pub</AssemblyOriginatorKeyFile>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
-    <DebugSymbols>true</DebugSymbols>\r
-    <DebugType>full</DebugType>\r
-    <NoWarn>1699,1030</NoWarn>\r
-    <Optimize>false</Optimize>\r
-    <DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE;SECURITY_DEP;MONO;FEATURE_PAL;MONO_FEATURE_NEW_TLS;MONO_FEATURE_NEW_SYSTEM_SOURCE;DISABLE_CAS_USE;MONO_SECURITY_ALIAS</DefineConstants>\r
-    <ErrorReport>prompt</ErrorReport>\r
-    <WarningLevel>4</WarningLevel>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
-    <DebugType>pdbonly</DebugType>\r
-    <NoWarn>1699,1030</NoWarn>\r
-    <Optimize>true</Optimize>\r
-    <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE;SECURITY_DEP;MONO;FEATURE_PAL;MONO_FEATURE_NEW_TLS;MONO_FEATURE_NEW_SYSTEM_SOURCE;DISABLE_CAS_USE;MONO_SECURITY_ALIAS</DefineConstants>\r
-    <ErrorReport>prompt</ErrorReport>\r
-    <WarningLevel>4</WarningLevel>\r
-  </PropertyGroup>\r
-  <!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0, \r
-  Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This\r
-  is a problem to compile the Mono mscorlib.dll -->\r
-  <PropertyGroup>\r
-    <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>\r
-  </PropertyGroup>\r
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
-  <ItemGroup>\r
-    <Compile Include="..\..\build\common\Consts.cs" />\r
-    <Compile Include="..\..\build\common\Locale.cs" />\r
-    <Compile Include="..\..\build\common\SR.cs" />\r
-    <Compile Include="..\referencesource\mscorlib\InternalApis\NDP_Common\inc\PinnableBufferCache.cs" />\r
-    <Compile Include="..\referencesource\System\net\System\Net\_LazyAsyncResult.cs" />\r
-    <Compile Include="..\referencesource\System\net\System\Net\_LoggingObject.cs" />\r
-    <Compile Include="..\referencesource\System\net\System\Net\_NTAuthentication.cs" />\r
-    <Compile Include="..\referencesource\System\net\System\Net\_SecureChannel.cs" />\r
-    <Compile Include="..\referencesource\System\net\System\Net\_SslSessionsCache.cs" />\r
-    <Compile Include="..\referencesource\System\net\System\Net\Logging.cs" />\r
-    <Compile Include="..\referencesource\System\net\System\Net\SecureProtocols\_FixedSizeReader.cs" />\r
-    <Compile Include="..\referencesource\System\net\System\Net\SecureProtocols\_HelperAsyncResults.cs" />\r
-    <Compile Include="..\referencesource\System\net\System\Net\SecureProtocols\_SslState.cs" />\r
-    <Compile Include="..\referencesource\System\net\System\Net\SecureProtocols\_SslStream.cs" />\r
-    <Compile Include="..\referencesource\System\net\System\Net\SecureProtocols\SslStream.cs" />\r
-    <Compile Include="..\System\Mono.Net.Security\CallbackHelpers.cs" />\r
-    <Compile Include="..\System\Mono.Net.Security\IMonoTlsProvider.cs" />\r
-    <Compile Include="..\System\Mono.Net.Security\MonoTlsProviderFactory.cs" />\r
-    <Compile Include="..\System\Mono.Net.Security\MonoTlsProviderWrapper.cs" />\r
-    <Compile Include="..\System\ReferenceSources\_SecureChannel.cs" />\r
-    <Compile Include="..\System\ReferenceSources\_SslState.cs" />\r
-    <Compile Include="..\System\ReferenceSources\_SslStream.cs" />\r
-    <Compile Include="..\System\ReferenceSources\Internal.cs" />\r
-    <Compile Include="..\System\ReferenceSources\SR.cs" />\r
-    <Compile Include="..\System\ReferenceSources\SR2.cs" />\r
-    <Compile Include="..\System\ReferenceSources\SslStream.cs" />\r
-    <Compile Include="..\System\ReferenceSources\SSPIConfiguration.cs" />\r
-    <Compile Include="..\System\ReferenceSources\SSPISafeHandles.cs" />\r
-    <Compile Include="..\System\ReferenceSources\SSPIWrapper.cs" />\r
-    <Compile Include=".\Properties\AssemblyInfo.cs" />\r  </ItemGroup>\r
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
-       Other similar extension points exist, see Microsoft.Common.targets.\r
-  <Target Name="BeforeBuild">\r
-  </Target>\r
-  <Target Name="AfterBuild">\r
-  </Target>\r
-  -->\r
-  <PropertyGroup>\r
-    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
-
-    </PreBuildEvent>\r
-    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
-\r
-    </PreBuildEvent>\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
-
-    </PostBuildEvent>\r
-    <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
-\r
-    </PostBuildEvent>\r
-  </PropertyGroup>\r
-  <ItemGroup>\r
-    <ProjectReference Include="../corlib/corlib-net_4_x.csproj">\r
-      <Project>{2CA6026B-2DC8-4C4C-A12C-1E8234049DB7}</Project>\r
-      <Name>corlib-net_4_x</Name>\r
-    </ProjectReference>\r
-    <ProjectReference Include="../System/System-net_4_x.csproj">\r
-      <Project>{2762E921-91A8-4C87-91E9-BA628013F753}</Project>\r
-      <Name>System-net_4_x</Name>\r
-    </ProjectReference>\r
-    <ProjectReference Include="../Mono.Security/Mono.Security-net_4_x.csproj">\r
-      <Project>{42D59DE7-586F-4ACF-BDD5-E7869E39E3EF}</Project>\r
-      <Name>Mono.Security-net_4_x</Name>\r
-      <Aliases>MonoSecurity</Aliases>    </ProjectReference>\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <Folder Include="Properties\" />\r
-  </ItemGroup>\r
-</Project>\r
-
diff --git a/mcs/class/Mono.Security.Providers.NewSystemSource/Mono.Security.Providers.NewSystemSource.dll.sources b/mcs/class/Mono.Security.Providers.NewSystemSource/Mono.Security.Providers.NewSystemSource.dll.sources
deleted file mode 100644 (file)
index c0765d5..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-./Properties/AssemblyInfo.cs
-../../build/common/SR.cs
-../../build/common/Consts.cs
-../../build/common/Locale.cs
-
-../referencesource/System/net/System/Net/Logging.cs
-../referencesource/System/net/System/Net/_SslSessionsCache.cs
-../referencesource/System/net/System/Net/_LazyAsyncResult.cs
-../referencesource/System/net/System/Net/_LoggingObject.cs
-../referencesource/System/net/System/Net/_NTAuthentication.cs
-../referencesource/System/net/System/Net/_SecureChannel.cs
-../referencesource/System/net/System/Net/SecureProtocols/SslStream.cs
-../referencesource/System/net/System/Net/SecureProtocols/_SslState.cs
-../referencesource/System/net/System/Net/SecureProtocols/_SslStream.cs
-../referencesource/System/net/System/Net/SecureProtocols/_FixedSizeReader.cs
-../referencesource/System/net/System/Net/SecureProtocols/_HelperAsyncResults.cs
-../referencesource/mscorlib/InternalApis/NDP_Common/inc/PinnableBufferCache.cs
-
-../System/ReferenceSources/SR.cs
-../System/ReferenceSources/SR2.cs
-../System/ReferenceSources/Internal.cs
-../System/ReferenceSources/SSPIWrapper.cs
-../System/ReferenceSources/SSPISafeHandles.cs
-../System/ReferenceSources/SslStream.cs
-../System/ReferenceSources/_SslState.cs
-../System/ReferenceSources/_SslStream.cs
-../System/ReferenceSources/_SecureChannel.cs
-../System/ReferenceSources/SSPIConfiguration.cs
-../System/Mono.Net.Security/CallbackHelpers.cs
-../System/Mono.Net.Security/IMonoTlsProvider.cs
-../System/Mono.Net.Security/MonoTlsProviderFactory.cs
-../System/Mono.Net.Security/MonoTlsProviderWrapper.cs
-
diff --git a/mcs/class/Mono.Security.Providers.NewSystemSource/Properties/AssemblyInfo.cs b/mcs/class/Mono.Security.Providers.NewSystemSource/Properties/AssemblyInfo.cs
deleted file mode 100644 (file)
index 23ba5bb..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-//
-// AssemblyInfo.cs
-//
-// Author:
-//       Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2015 Xamarin, Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-using System;
-using System.Reflection;
-using System.Resources;
-using System.Security;
-using System.Security.Permissions;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about the system assembly
-
-[assembly: AssemblyVersion (Consts.FxVersion)]
-
-[assembly: AssemblyCompany ("MONO development team")]
-[assembly: AssemblyCopyright ("(c) 2015 Xamarin")]
-[assembly: AssemblyDescription ("Mono.Security.Providers.NewSystemSource.dll")]
-[assembly: AssemblyProduct ("MONO CLI")]
-[assembly: AssemblyTitle ("Mono.Security.Providers.NewSystemSource.dll")]
-[assembly: CLSCompliant (true)]
-[assembly: ComVisible (false)]
-[assembly: NeutralResourcesLanguage ("en-US")]
-
-[assembly: InternalsVisibleTo ("Mono.Security.Providers.NewTls, PublicKey=002400000480000094000000060200000024000052534131000400001100000003336d6aed41624ca156ab579881fe90a576f1dfec48378fc94e4e440f4556776224e2d70c18996d91f36227f539fdb44340e07651f1455a489b29a7e6219a8f85e52b0f8588b4f8a857746a8468d37b556223d1452f3fcbaf0f269cdf1900ceb68f69485dc5887750d19571030c732331e00387d9b813a9ad52891087301793")]
-[assembly: InternalsVisibleTo ("Mono.Security.Providers.NewTls, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
diff --git a/mcs/class/Mono.Security.Providers.NewSystemSource/README.md b/mcs/class/Mono.Security.Providers.NewSystemSource/README.md
deleted file mode 100644 (file)
index 03447c0..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-Mono.Security.Interface / Mono.Security.Providers
-=================================================
-
-This is not a public API yet, but will eventually become public.
-
-
-Mono.Security.Interface
------------------------
-
-`Mono.Security.Interface` provides an abstraction layer for the TLS
-APIs that are currently being used by Mono's class libraries.
-
-The main API entry points are `MonoTlsProviderFactory.GetProvider()`
-and `MonoTlsProviderFactory.InstallProvider()`.
-
-Mono.Net.Security
------------------
-
-`Mono.Net.Security` provides the internal implementation and lives
-inside `System.dll` as private and internal APIs.  `Mono.Security.dll`
-uses reflection to access these.
-
-On Mobile, the `Mono.Security.Interface` APIs are included as public
-APIs in `System.dll`.
-
-Mono.Security.Providers
------------------------
-
-Implementations of the `Mono.Security.Interface.MonoTlsProvider` class
-to provide TLS functionality.
-
-The default provider is inside `System.dll` - it will be used automatically
-if you don't explicitly install a custom provider, so simply call
-`MonoTlsProviderFactory.GetProvider()` to use it.
-
-* DotNet:
-  Provides the default `SslStream` implementation from `System.dll`, only using
-  public .NET types.
-  
-* NewSystemSource:
-  Compiles several referencesource files which would normally live inside
-  `System.dll` if we compiled it with their `SslStream` implementation.
-  
-  This allows to keep the code in `System.dll` as-is, while still providing the
-  new `SslStream`, which will be required by the new TLS code.
-  
-  `System.dll` needs to make its internals visible and we're using several compiler /
-  external alias tricks in here to make this work.
-  
-  In this configuration, `MONO_SYSTEM_ALIAS`, `MONO_FEATURE_NEW_TLS` and
-  `MONO_FEATURE_NEW_SYSTEM_SOURCE` (defining conditional for this configuration)
-  are defined.  We do not define `MONO_X509_ALIAS here`.
-  
-The `Mono.Security.Providers.DotNet` and `Mono.Security.Providers.NewSystemSource` directory is currently
-enabled in the top-level `Makefile`, but the resulting binaries should only be used to test the new TLS
-code and not shipped as stable APIs.
-
-Pending changes
----------------
-
-This code is not actually being used in `System.dll` yet.  I have some
-local changes which will switch the existing code in `WebClient`,
-`SmptClient` and `FtpWebRequest` over, but these need to be carefully
-tested.
-
-At the moment, this work branch only provides new code and build
-changes, which shuffle some stuff around.  There are also several
-new files which are conditional and not actually being built by
-default.
-
-Build Configurations
---------------------
-
-* Normal build:
-  Builds everything as before with some new APIs added, but without
-  modifying any existing functionality.
-  
-* Build with the `newtls` profile:
-  Builds `System.dll` with the new `SslStream` implementation from the
-  referencesource.  This is currently a "build then throw away" profile
-  and not enabled from the top-level Makefile.  The resulting `System.dll`
-  won't actually work at runtime since it's missing the new TLS code;
-  building it helps find problems and ensures that it will actually
-  be possible to build this once we deploy it.
-
-* Mono.Security.Providers:
-  The new TLS code requires the newly built `System` and `Mono.Security.Providers.NewSystemSource`
-  from this branch installed in the system.  It is recommended to install it
-  into a custom prefix and set that as custom runtime in Xamarin Studio.
-
-
-Last changed March 07th, 2015,
-Martin Baulig <martin.baulig@xamarin.com>
-
-
diff --git a/mcs/class/Mono.Security.Providers.NewTls/Makefile b/mcs/class/Mono.Security.Providers.NewTls/Makefile
deleted file mode 100644 (file)
index 54270bc..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-thisdir = class/Mono.Security.Providers.NewTls
-SUBDIRS = 
-include ../../build/rules.make
-
-LIBRARY = Mono.Security.Providers.NewTls.dll
-LIB_REFS = System NewSystemSource=Mono.Security.Providers.NewSystemSource Mono.Security
-LIB_MCS_FLAGS = -unsafe -nowarn:1030 -keyfile:../mono.pub -delaysign
-
-include ../../build/library.make
-
-$(the_lib): ../Mono.Security/Makefile
-
diff --git a/mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls-net_4_x.csproj b/mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls-net_4_x.csproj
deleted file mode 100644 (file)
index 158b095..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
-  <PropertyGroup>\r
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
-    <ProductVersion>9.0.30729</ProductVersion>\r
-    <SchemaVersion>2.0</SchemaVersion>\r
-    <ProjectGuid>{C8B8E524-BB3A-44E2-8C22-E3313E9F477C}</ProjectGuid>\r
-    <OutputType>Library</OutputType>\r
-    <NoWarn>1699,1030</NoWarn>\r
-    <OutputPath>./../../class/lib/net_4_x</OutputPath>\r
-    <IntermediateOutputPath>obj-net_4_x</IntermediateOutputPath>\r
-    <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>\r
-    <NoStdLib>True</NoStdLib>\r
-    \r
-    <NoConfig>True</NoConfig>\r
-    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>\r
-    <AppDesignerFolder>Properties</AppDesignerFolder>\r
-    <RootNamespace>\r
-    </RootNamespace>\r
-    <AssemblyName>Mono.Security.Providers.NewTls</AssemblyName>\r
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
-    <FileAlignment>512</FileAlignment>\r
-  </PropertyGroup>\r
-    <PropertyGroup>\r
-    <SignAssembly>true</SignAssembly>\r
-    <DelaySign>true</DelaySign>\r
-  </PropertyGroup>\r
-  <PropertyGroup>\r
-    <AssemblyOriginatorKeyFile>../mono.pub</AssemblyOriginatorKeyFile>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
-    <DebugSymbols>true</DebugSymbols>\r
-    <DebugType>full</DebugType>\r
-    <NoWarn>1699,1030</NoWarn>\r
-    <Optimize>false</Optimize>\r
-    <DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>\r
-    <ErrorReport>prompt</ErrorReport>\r
-    <WarningLevel>4</WarningLevel>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
-    <DebugType>pdbonly</DebugType>\r
-    <NoWarn>1699,1030</NoWarn>\r
-    <Optimize>true</Optimize>\r
-    <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>\r
-    <ErrorReport>prompt</ErrorReport>\r
-    <WarningLevel>4</WarningLevel>\r
-  </PropertyGroup>\r
-  <!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0, \r
-  Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This\r
-  is a problem to compile the Mono mscorlib.dll -->\r
-  <PropertyGroup>\r
-    <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>\r
-  </PropertyGroup>\r
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
-  <ItemGroup>\r
-    <Compile Include="..\..\build\common\Consts.cs" />\r
-    <Compile Include="..\..\build\common\Locale.cs" />\r
-    <Compile Include="..\..\build\common\SR.cs" />\r
-    <Compile Include=".\Mono.Security.Providers.NewTls\ITlsConfiguration.cs" />\r
-    <Compile Include=".\Mono.Security.Providers.NewTls\ITlsContext.cs" />\r
-    <Compile Include=".\Mono.Security.Providers.NewTls\MonoNewTlsStream.cs" />\r
-    <Compile Include=".\Mono.Security.Providers.NewTls\MonoNewTlsStreamFactory.cs" />\r
-    <Compile Include=".\Mono.Security.Providers.NewTls\NewTlsProvider.cs" />\r
-    <Compile Include=".\Mono.Security.Providers.NewTls\TlsContextWrapper.cs" />\r
-    <Compile Include=".\Mono.Security.Providers.NewTls\TlsProviderFactory.cs" />\r
-    <Compile Include=".\Properties\AssemblyInfo.cs" />\r  </ItemGroup>\r
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
-       Other similar extension points exist, see Microsoft.Common.targets.\r
-  <Target Name="BeforeBuild">\r
-  </Target>\r
-  <Target Name="AfterBuild">\r
-  </Target>\r
-  -->\r
-  <PropertyGroup>\r
-    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
-
-    </PreBuildEvent>\r
-    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
-\r
-    </PreBuildEvent>\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
-
-    </PostBuildEvent>\r
-    <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
-\r
-    </PostBuildEvent>\r
-  </PropertyGroup>\r
-  <ItemGroup>\r
-    <ProjectReference Include="../corlib/corlib-net_4_x.csproj">\r
-      <Project>{2CA6026B-2DC8-4C4C-A12C-1E8234049DB7}</Project>\r
-      <Name>corlib-net_4_x</Name>\r
-    </ProjectReference>\r
-    <ProjectReference Include="../System/System-net_4_x.csproj">\r
-      <Project>{2762E921-91A8-4C87-91E9-BA628013F753}</Project>\r
-      <Name>System-net_4_x</Name>\r
-    </ProjectReference>\r
-    <ProjectReference Include="../Mono.Security/Mono.Security-net_4_x.csproj">\r
-      <Project>{42D59DE7-586F-4ACF-BDD5-E7869E39E3EF}</Project>\r
-      <Name>Mono.Security-net_4_x</Name>\r
-    </ProjectReference>\r
-    <ProjectReference Include="../Mono.Security.Providers.NewSystemSource/Mono.Security.Providers.NewSystemSource-net_4_x.csproj">\r
-      <Project>{0BB4541F-9B1A-4CBC-BEB1-00B31B37F74E}</Project>\r
-      <Name>Mono.Security.Providers.NewSystemSource-net_4_x</Name>\r
-      <Aliases>NewSystemSource</Aliases>    </ProjectReference>\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <Folder Include="Properties\" />\r
-  </ItemGroup>\r
-</Project>\r
-
diff --git a/mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls.dll.sources b/mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls.dll.sources
deleted file mode 100644 (file)
index 12d8a20..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-./Properties/AssemblyInfo.cs
-../../build/common/SR.cs
-../../build/common/Consts.cs
-../../build/common/Locale.cs
-
-./Mono.Security.Providers.NewTls/ITlsConfiguration.cs
-./Mono.Security.Providers.NewTls/ITlsContext.cs
-
-./Mono.Security.Providers.NewTls/MonoNewTlsStream.cs
-./Mono.Security.Providers.NewTls/MonoNewTlsStreamFactory.cs
-./Mono.Security.Providers.NewTls/NewTlsProvider.cs
-./Mono.Security.Providers.NewTls/TlsContextWrapper.cs
-./Mono.Security.Providers.NewTls/TlsProviderFactory.cs
diff --git a/mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls/ITlsConfiguration.cs b/mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls/ITlsConfiguration.cs
deleted file mode 100644 (file)
index 401afd7..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-//
-// ITlsContext.cs
-//
-// Author:
-//       Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2015-2016 Xamarin, Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Security.Cryptography;
-
-using Mono.Security.Interface;
-using MX = Mono.Security.X509;
-
-namespace Mono.Security.Providers.NewTls
-{
-       interface ITlsConfiguration
-       {
-               bool HasCredentials {
-                       get;
-               }
-
-               void SetCertificate (MX.X509Certificate certificate, AsymmetricAlgorithm privateKey);
-
-               bool? AskForClientCertificate {
-                       get; set;
-               }
-       }
-}
diff --git a/mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls/ITlsContext.cs b/mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls/ITlsContext.cs
deleted file mode 100644 (file)
index 0d69805..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-// ITlsContext.cs
-//
-// Author:
-//       Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2015-2016 Xamarin, Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-extern alias NewSystemSource;
-
-using System;
-using System.Security.Cryptography;
-
-using Mono.Security.Interface;
-using MX = Mono.Security.X509;
-
-namespace Mono.Security.Providers.NewTls
-{
-       interface ITlsContext : IDisposable
-       {
-               bool IsValid {
-                       get;
-               }
-
-               TlsException LastError {
-                       get;
-               }
-
-               bool ReceivedCloseNotify {
-                       get;
-               }
-
-               MonoTlsConnectionInfo ConnectionInfo {
-                       get;
-               }
-
-               MX.X509Certificate GetRemoteCertificate (out MX.X509CertificateCollection remoteCertificateStore);
-
-               bool VerifyRemoteCertificate ();
-
-               int GenerateNextToken (TlsBuffer incoming, TlsMultiBuffer outgoing);
-
-               int DecryptMessage (ref TlsBuffer incoming);
-
-               int EncryptMessage (ref TlsBuffer incoming);
-
-               byte[] CreateAlert (Alert alert);
-
-               byte[] CreateHelloRequest ();
-       }
-}
-
diff --git a/mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls/MonoNewTlsStream.cs b/mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls/MonoNewTlsStream.cs
deleted file mode 100644 (file)
index 6117f0f..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-//
-// MonoNewTlsStream.cs
-//
-// Author:
-//       Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2015 Xamarin, Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-extern alias NewSystemSource;
-
-using EncryptionPolicy = NewSystemSource::System.Net.Security.EncryptionPolicy;
-using LocalCertificateSelectionCallback = NewSystemSource::System.Net.Security.LocalCertificateSelectionCallback;
-using RemoteCertificateValidationCallback = NewSystemSource::System.Net.Security.RemoteCertificateValidationCallback;
-using SslStream = NewSystemSource::System.Net.Security.SslStream;
-
-using System;
-using System.IO;
-using System.Threading.Tasks;
-
-using MSI = Mono.Security.Interface;
-
-using XAuthenticatedStream = System.Net.Security.AuthenticatedStream;
-using System.Security.Cryptography.X509Certificates;
-
-namespace Mono.Security.Providers.NewTls
-{
-       public class MonoNewTlsStream : SslStream, MSI.IMonoSslStream
-       {
-               MSI.MonoTlsProvider provider;
-
-               internal MonoNewTlsStream (Stream innerStream, MSI.MonoTlsProvider provider, MSI.MonoTlsSettings settings)
-                       : this (innerStream, false, provider, settings)
-               {
-               }
-
-               internal MonoNewTlsStream (Stream innerStream, bool leaveOpen, MSI.MonoTlsProvider provider, MSI.MonoTlsSettings settings)
-                       : base (innerStream, leaveOpen, EncryptionPolicy.RequireEncryption, provider, settings)
-               {
-                       this.provider = provider;
-               }
-
-               public MSI.MonoTlsProvider Provider {
-                       get { return provider; }
-               }
-
-               new public bool IsClosed {
-                       get { return base.IsClosed; }
-               }
-
-               public MSI.MonoTlsConnectionInfo GetConnectionInfo ()
-               {
-                       return GetMonoConnectionInfo ();
-               }
-
-               public Task Shutdown ()
-               {
-                       return Task.Factory.FromAsync ((state, result) => BeginShutdown (state, result), EndShutdown, null);
-               }
-
-               public Task RequestRenegotiation ()
-               {
-                       return Task.Factory.FromAsync ((state, result) => BeginRenegotiate (state, result), EndRenegotiate, null);
-               }
-
-                X509Certificate MSI.IMonoSslStream.InternalLocalCertificate {
-                       get { return InternalLocalCertificate; }
-               }
-
-               XAuthenticatedStream MSI.IMonoSslStream.AuthenticatedStream {
-                       get { return this; }
-               }
-       }
-}
-
-
diff --git a/mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls/MonoNewTlsStreamFactory.cs b/mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls/MonoNewTlsStreamFactory.cs
deleted file mode 100644 (file)
index d39f1bb..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-//
-// MonoNewTlsStreamFactory.cs
-//
-// Author:
-//       Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2015 Xamarin, Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-extern alias NewSystemSource;
-
-using XEncryptionPolicy = NewSystemSource::System.Net.Security.EncryptionPolicy;
-using XSslPolicyErrors = NewSystemSource::System.Net.Security.SslPolicyErrors;
-using XLocalCertificateSelectionCallback = NewSystemSource::System.Net.Security.LocalCertificateSelectionCallback;
-using XRemoteCertificateValidationCallback = NewSystemSource::System.Net.Security.RemoteCertificateValidationCallback;
-
-using System;
-using System.IO;
-using System.Net.Security;
-using System.Security.Authentication;
-
-using Mono.Security.Interface;
-
-using PSSCX = System.Security.Cryptography.X509Certificates;
-using SSCX = System.Security.Cryptography.X509Certificates;
-
-namespace Mono.Security.Providers.NewTls
-{
-       public static class MonoNewTlsStreamFactory
-       {
-               internal static IMonoSslStream CreateSslStream (
-                       Stream innerStream, bool leaveInnerStreamOpen,
-                       MonoTlsProvider provider, MonoTlsSettings settings = null)
-               {
-                       return new MonoNewTlsStream (innerStream, leaveInnerStreamOpen, provider, settings);
-               }
-
-               public static MonoNewTlsStream CreateServer (
-                       Stream innerStream, bool leaveOpen, MonoTlsProvider provider, MonoTlsSettings settings,
-                       SSCX.X509Certificate serverCertificate, bool clientCertificateRequired,
-                       SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
-               {
-                       var stream = new MonoNewTlsStream (innerStream, leaveOpen, provider, settings);
-
-                       try {
-                               stream.AuthenticateAsServer (serverCertificate, clientCertificateRequired, enabledSslProtocols, checkCertificateRevocation);
-                       } catch (Exception ex) {
-                               var tlsEx = stream.LastError;
-                               if (tlsEx != null)
-                                       throw new AggregateException (ex, tlsEx);
-                               throw;
-                       }
-
-                       return stream;
-               }
-
-               public static MonoNewTlsStream CreateClient (
-                       Stream innerStream, bool leaveOpen, MonoTlsProvider provider, MonoTlsSettings settings,
-                       string targetHost, PSSCX.X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
-               {
-                       var stream = new MonoNewTlsStream (innerStream, leaveOpen, provider, settings);
-
-                       try {
-                               stream.AuthenticateAsClient (targetHost, clientCertificates, enabledSslProtocols, checkCertificateRevocation);
-                       } catch (Exception ex) {
-                               var tlsEx = stream.LastError;
-                               if (tlsEx != null)
-                                       throw new AggregateException (ex, tlsEx);
-                               throw;
-                       }
-                       return stream;
-               }
-       }
-}
diff --git a/mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls/NewTlsProvider.cs b/mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls/NewTlsProvider.cs
deleted file mode 100644 (file)
index e2b347f..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-//
-// NewTlsProvider.cs
-//
-// Author:
-//       Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2015 Xamarin, Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-extern alias NewSystemSource;
-
-using System;
-using System.IO;
-using System.Net;
-using System.Net.Security;
-using System.Security.Authentication;
-
-using MSI = Mono.Security.Interface;
-using MX = Mono.Security.X509;
-
-using PSSCX = System.Security.Cryptography.X509Certificates;
-using SSCX = System.Security.Cryptography.X509Certificates;
-
-namespace Mono.Security.Providers.NewTls
-{
-       public class NewTlsProvider : MSI.MonoTlsProvider
-       {
-               static readonly Guid id = new Guid ("e5ff34f1-8b7a-4aa6-aff9-24719d709693");
-
-               public override Guid ID {
-                       get { return id; }
-               }
-
-               public override string Name {
-                       get { return "newtls"; }
-               }
-
-               public override bool SupportsSslStream {
-                       get { return true; }
-               }
-
-               public override bool SupportsConnectionInfo {
-                       get { return true; }
-               }
-
-               public override bool SupportsMonoExtensions {
-                       get { return true; }
-               }
-
-               internal override bool SupportsTlsContext {
-                       get { return true; }
-               }
-
-               public override SslProtocols SupportedProtocols {
-                       get { return SslProtocols.Tls12 | SslProtocols.Tls11 | SslProtocols.Tls; }
-               }
-
-               public override MSI.IMonoSslStream CreateSslStream (
-                       Stream innerStream, bool leaveInnerStreamOpen,
-                       MSI.MonoTlsSettings settings = null)
-               {
-                       return MonoNewTlsStreamFactory.CreateSslStream (innerStream, leaveInnerStreamOpen, this, settings);
-               }
-
-               internal override MSI.IMonoTlsContext CreateTlsContext (
-                       string hostname, bool serverMode, MSI.TlsProtocols protocolFlags,
-                       SSCX.X509Certificate serverCertificate, PSSCX.X509CertificateCollection clientCertificates,
-                       bool remoteCertRequired, MSI.MonoEncryptionPolicy encryptionPolicy,
-                       MSI.MonoTlsSettings settings)
-               {
-                       var config = TlsProviderFactory.CreateTlsConfiguration (
-                               hostname, serverMode, protocolFlags, serverCertificate,
-                               remoteCertRequired, settings);
-                       return new TlsContextWrapper (config, serverMode);
-               }
-       }
-}
-
diff --git a/mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls/TlsContextWrapper.cs b/mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls/TlsContextWrapper.cs
deleted file mode 100644 (file)
index 389dd1a..0000000
+++ /dev/null
@@ -1,221 +0,0 @@
-//
-// TlsContextWrapper.cs
-//
-// Author:
-//       Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2015 Xamarin, Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-extern alias NewSystemSource;
-
-using System;
-using System.Security.Cryptography;
-
-using SSCX = System.Security.Cryptography.X509Certificates;
-using PSSCX = System.Security.Cryptography.X509Certificates;
-
-using MSI = Mono.Security.Interface;
-using MX = Mono.Security.X509;
-
-namespace Mono.Security.Providers.NewTls
-{
-       class TlsContextWrapper : IDisposable, MSI.IMonoTlsContext
-       {
-               ITlsConfiguration config;
-               ITlsContext context;
-               bool serverMode;
-
-               public TlsContextWrapper (ITlsConfiguration config, bool serverMode)
-               {
-                       this.config = config;
-                       this.serverMode = serverMode;
-               }
-
-               public bool IsServer {
-                       get { return serverMode; }
-               }
-
-               public bool IsValid {
-                       get { return context != null && context.IsValid; }
-               }
-
-               public void Initialize (MSI.IMonoTlsEventSink eventSink)
-               {
-                       if (context != null)
-                               throw new InvalidOperationException ();
-                       context = TlsProviderFactory.CreateTlsContext (config, serverMode, eventSink);
-               }
-
-               void Clear ()
-               {
-                       if (context != null) {
-                               context.Dispose ();
-                               context = null;
-                       }
-               }
-
-               public ITlsConfiguration Configuration {
-                       get {
-                               if (config == null)
-                                       throw new ObjectDisposedException ("TlsConfiguration");
-                               return config;
-                       }
-               }
-
-               public ITlsContext Context {
-                       get {
-                               if (!IsValid)
-                                       throw new ObjectDisposedException ("TlsContext");
-                               return context;
-                       }
-               }
-
-               public bool HasCredentials {
-                       get { return Configuration.HasCredentials; }
-               }
-
-               public void SetCertificate (SSCX.X509Certificate certificate, AsymmetricAlgorithm privateKey)
-               {
-                       var monoCert = new MX.X509Certificate (certificate.GetRawCertData ());
-                       Configuration.SetCertificate (monoCert, privateKey);
-               }
-
-               public int GenerateNextToken (MSI.IBufferOffsetSize incoming, out MSI.IBufferOffsetSize outgoing)
-               {
-                       var input = incoming != null ? new MSI.TlsBuffer (BOSWrapper.Wrap (incoming)) : null;
-                       var output = new MSI.TlsMultiBuffer ();
-                       var retval = Context.GenerateNextToken (input, output);
-                       if (output.IsEmpty)
-                               outgoing = null;
-                       outgoing = BOSWrapper.Wrap (output.StealBuffer ());
-                       return (int)retval;
-               }
-
-               public int EncryptMessage (ref MSI.IBufferOffsetSize incoming)
-               {
-                       var buffer = new MSI.TlsBuffer (BOSWrapper.Wrap (incoming));
-                       var retval = Context.EncryptMessage (ref buffer);
-                       incoming = BOSWrapper.Wrap (buffer.GetRemaining ());
-                       return (int)retval;
-               }
-
-               public int DecryptMessage (ref MSI.IBufferOffsetSize incoming)
-               {
-                       var buffer = new MSI.TlsBuffer (BOSWrapper.Wrap (incoming));
-                       var retval = Context.DecryptMessage (ref buffer);
-                       incoming = buffer != null ? BOSWrapper.Wrap (buffer.GetRemaining ()) : null;
-                       return (int)retval;
-               }
-
-               class BOSWrapper : MSI.IBufferOffsetSize
-               {
-                       public byte[] Buffer {
-                               get;
-                               private set;
-                       }
-
-                       public int Offset {
-                               get;
-                               private set;
-                       }
-
-                       public int Size {
-                               get;
-                               private set;
-                       }
-
-                       BOSWrapper (byte[] buffer, int offset, int size)
-                       {
-                               Buffer = buffer;
-                               Offset = offset;
-                               Size = size;
-                       }
-
-                       public static BOSWrapper Wrap (MSI.IBufferOffsetSize bos)
-                       {
-                               return bos != null ? new BOSWrapper (bos.Buffer, bos.Offset, bos.Size) : null;
-                       }
-               }
-
-               public byte[] CreateCloseNotify ()
-               {
-                       return Context.CreateAlert (new MSI.Alert (MSI.AlertLevel.Warning, MSI.AlertDescription.CloseNotify));
-               }
-
-               public byte[] CreateHelloRequest ()
-               {
-                       return Context.CreateHelloRequest ();
-               }
-
-               public SSCX.X509Certificate GetRemoteCertificate (out PSSCX.X509CertificateCollection remoteCertificateStore)
-               {
-                       MX.X509CertificateCollection monoCollection;
-                       var remoteCert = Context.GetRemoteCertificate (out monoCollection);
-                       if (remoteCert == null) {
-                               remoteCertificateStore = null;
-                               return null;
-                       }
-
-                       remoteCertificateStore = new PSSCX.X509CertificateCollection ();
-                       foreach (var cert in monoCollection) {
-                               remoteCertificateStore.Add (new PSSCX.X509Certificate2 (cert.RawData));
-                       }
-                       return new PSSCX.X509Certificate2 (remoteCert.RawData);
-
-               }
-
-               public bool VerifyRemoteCertificate ()
-               {
-                       return Context.VerifyRemoteCertificate ();
-               }
-
-               public Exception LastError {
-                       get {
-                               if (context != null)
-                                       return context.LastError;
-                               return null;
-                       }
-               }
-
-               public bool ReceivedCloseNotify {
-                       get {
-                               return Context.ReceivedCloseNotify;
-                       }
-               }
-
-               public MSI.MonoTlsConnectionInfo GetConnectionInfo ()
-               {
-                       return Context.ConnectionInfo;
-               }
-
-               public void Dispose ()
-               {
-                       Dispose (true);
-                       GC.SuppressFinalize (this);
-               }
-
-               void Dispose (bool disposing)
-               {
-                       Clear ();
-               }
-       }
-}
-
diff --git a/mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls/TlsProviderFactory.cs b/mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls/TlsProviderFactory.cs
deleted file mode 100644 (file)
index 92d8ab0..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-//
-// TlsProviderFactory.cs
-//
-// Author:
-//       Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2015-2016 Xamarin, Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-extern alias NewSystemSource;
-
-using System;
-using System.IO;
-
-using System.Net;
-using System.Net.Security;
-using System.Security.Authentication;
-
-using MSI = Mono.Security.Interface;
-using MX = Mono.Security.X509;
-
-using PSSCX = System.Security.Cryptography.X509Certificates;
-using SSCX = System.Security.Cryptography.X509Certificates;
-
-namespace Mono.Security.Providers.NewTls
-{
-       static class TlsProviderFactory
-       {
-               const string assemblyName = "Mono.Security.NewTls, Version=4.0.0.0, Culture=neutral, PublicKeyToken=84e3aee7225169c2";
-               const string tlsConfigTypeName = "Mono.Security.NewTls.TlsConfiguration";
-               const string tlsContextTypeName = "Mono.Security.NewTls.TlsContext";
-
-               static object CreateInstance (string typeName, object[] args)
-               {
-                       var type = Type.GetType (typeName + ", " + assemblyName);
-                       return Activator.CreateInstance (type, args);
-               }
-
-               internal static ITlsConfiguration CreateTlsConfiguration (
-                       string hostname, bool serverMode, MSI.TlsProtocols protocolFlags,
-                       SSCX.X509Certificate serverCertificate, bool remoteCertRequired,
-                       MSI.MonoTlsSettings settings)
-               {
-                       object[] args;
-                       ITlsConfiguration config;
-                       if (serverMode) {
-                               var cert = (PSSCX.X509Certificate2)serverCertificate;
-                               var monoCert = new MX.X509Certificate (cert.RawData);
-                               args = new object[] {
-                                       (MSI.TlsProtocols)protocolFlags,
-                                       (MSI.MonoTlsSettings)settings,
-                                       monoCert,
-                                       cert.PrivateKey
-                               };
-                       } else {
-                               args = new object[] {
-                                       (MSI.TlsProtocols)protocolFlags,
-                                       (MSI.MonoTlsSettings)settings,
-                                       hostname
-                               };
-                       }
-
-                       config = (ITlsConfiguration)CreateInstance (tlsConfigTypeName, args);
-
-                       if (serverMode && remoteCertRequired)
-                               config.AskForClientCertificate = true;
-
-                       return config;
-               }
-
-               internal static ITlsContext CreateTlsContext (
-                       ITlsConfiguration config, bool serverMode,
-                       MSI.IMonoTlsEventSink eventSink)
-               {
-                       return (ITlsContext)CreateInstance (
-                               tlsContextTypeName,
-                               new object[] { config, serverMode, eventSink });
-               }
-       }
-}
diff --git a/mcs/class/Mono.Security.Providers.NewTls/Properties/AssemblyInfo.cs b/mcs/class/Mono.Security.Providers.NewTls/Properties/AssemblyInfo.cs
deleted file mode 100644 (file)
index e369093..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-//
-// AssemblyInfo.cs
-//
-// Author:
-//       Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2015 Xamarin, Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-using System;
-using System.Reflection;
-using System.Resources;
-using System.Security;
-using System.Security.Permissions;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about the system assembly
-
-[assembly: AssemblyVersion (Consts.FxVersion)]
-
-[assembly: AssemblyCompany ("Xamarin")]
-[assembly: AssemblyCopyright ("(c) 2015 Xamarin")]
-[assembly: AssemblyDescription ("Mono.Security.Providers.NewTls.dll")]
-[assembly: AssemblyProduct ("MONO CLI")]
-[assembly: AssemblyTitle ("Mono.Security.Providers.NewTls.dll")]
-[assembly: CLSCompliant (false)]
-[assembly: ComVisible (false)]
-[assembly: NeutralResourcesLanguage ("en-US")]
-
-[assembly: InternalsVisibleTo ("Mono.Security.NewTls, PublicKey=002400000480000094000000060200000024000052534131000400001100000003336d6aed41624ca156ab579881fe90a576f1dfec48378fc94e4e440f4556776224e2d70c18996d91f36227f539fdb44340e07651f1455a489b29a7e6219a8f85e52b0f8588b4f8a857746a8468d37b556223d1452f3fcbaf0f269cdf1900ceb68f69485dc5887750d19571030c732331e00387d9b813a9ad52891087301793")]
diff --git a/mcs/class/Mono.Security.Providers.NewTls/mobile_Mono.Security.Providers.NewTls.dll.sources b/mcs/class/Mono.Security.Providers.NewTls/mobile_Mono.Security.Providers.NewTls.dll.sources
deleted file mode 100644 (file)
index 7218dab..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-Properties/AssemblyInfo.cs
-
-Mono.Security.Providers.NewTls/ITlsConfiguration.cs
-Mono.Security.Providers.NewTls/ITlsContext.cs
-
-Mono.Security.Providers.NewTls/MonoNewTlsStream.cs
-Mono.Security.Providers.NewTls/MonoNewTlsStreamFactory.cs
diff --git a/mcs/class/Mono.Security.Providers.NewTls/mobile_static_Mono.Security.Providers.NewTls.dll.sources b/mcs/class/Mono.Security.Providers.NewTls/mobile_static_Mono.Security.Providers.NewTls.dll.sources
deleted file mode 100644 (file)
index baded51..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include mobile_Mono.Security.Providers.NewTls.dll.sources
diff --git a/mcs/class/Mono.Security.Providers.OldTls/Makefile b/mcs/class/Mono.Security.Providers.OldTls/Makefile
deleted file mode 100644 (file)
index 5dc06c0..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-thisdir = class/Mono.Security.Providers.OldTls
-SUBDIRS = 
-include ../../build/rules.make
-
-LIBRARY = Mono.Security.Providers.OldTls.dll
-LIB_REFS = System Mono.Security
-LIB_MCS_FLAGS = -unsafe -nowarn:1030 -keyfile:../mono.pub -delaysign -d:SECURITY_DEP
-
-include ../../build/library.make
-
-$(the_lib): ../Mono.Security/Makefile
-
diff --git a/mcs/class/Mono.Security.Providers.OldTls/Mono.Security.Providers.OldTls-net_4_x.csproj b/mcs/class/Mono.Security.Providers.OldTls/Mono.Security.Providers.OldTls-net_4_x.csproj
deleted file mode 100644 (file)
index 32ceb30..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
-  <PropertyGroup>\r
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
-    <ProductVersion>9.0.30729</ProductVersion>\r
-    <SchemaVersion>2.0</SchemaVersion>\r
-    <ProjectGuid>{E485E885-59B1-4081-BC66-56AAAFD8771A}</ProjectGuid>\r
-    <OutputType>Library</OutputType>\r
-    <NoWarn>1699,1030</NoWarn>\r
-    <OutputPath>./../../class/lib/net_4_x</OutputPath>\r
-    <IntermediateOutputPath>obj-net_4_x</IntermediateOutputPath>\r
-    <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>\r
-    <NoStdLib>True</NoStdLib>\r
-    \r
-    <NoConfig>True</NoConfig>\r
-    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>\r
-    <AppDesignerFolder>Properties</AppDesignerFolder>\r
-    <RootNamespace>\r
-    </RootNamespace>\r
-    <AssemblyName>Mono.Security.Providers.OldTls</AssemblyName>\r
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
-    <FileAlignment>512</FileAlignment>\r
-  </PropertyGroup>\r
-    <PropertyGroup>\r
-    <SignAssembly>true</SignAssembly>\r
-    <DelaySign>true</DelaySign>\r
-  </PropertyGroup>\r
-  <PropertyGroup>\r
-    <AssemblyOriginatorKeyFile>../mono.pub</AssemblyOriginatorKeyFile>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
-    <DebugSymbols>true</DebugSymbols>\r
-    <DebugType>full</DebugType>\r
-    <NoWarn>1699,1030</NoWarn>\r
-    <Optimize>false</Optimize>\r
-    <DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE;SECURITY_DEP</DefineConstants>\r
-    <ErrorReport>prompt</ErrorReport>\r
-    <WarningLevel>4</WarningLevel>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
-    <DebugType>pdbonly</DebugType>\r
-    <NoWarn>1699,1030</NoWarn>\r
-    <Optimize>true</Optimize>\r
-    <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE;SECURITY_DEP</DefineConstants>\r
-    <ErrorReport>prompt</ErrorReport>\r
-    <WarningLevel>4</WarningLevel>\r
-  </PropertyGroup>\r
-  <!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0, \r
-  Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This\r
-  is a problem to compile the Mono mscorlib.dll -->\r
-  <PropertyGroup>\r
-    <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>\r
-  </PropertyGroup>\r
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
-  <ItemGroup>\r
-    <Compile Include="..\..\build\common\Consts.cs" />\r
-    <Compile Include="..\..\build\common\Locale.cs" />\r
-    <Compile Include="..\..\build\common\MonoTODOAttribute.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Cryptography\MD5SHA1.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Cryptography\TlsHMAC.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Client\TlsClientCertificate.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Client\TlsClientCertificateVerify.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Client\TlsClientFinished.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Client\TlsClientHello.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Client\TlsClientKeyExchange.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Client\TlsServerCertificate.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Client\TlsServerCertificateRequest.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Client\TlsServerFinished.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Client\TlsServerHello.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Client\TlsServerHelloDone.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Client\TlsServerKeyExchange.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Server\TlsClientCertificate.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Server\TlsClientCertificateVerify.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Server\TlsClientFinished.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Server\TlsClientHello.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Server\TlsClientKeyExchange.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Server\TlsServerCertificate.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Server\TlsServerCertificateRequest.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Server\TlsServerFinished.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Server\TlsServerHello.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Server\TlsServerHelloDone.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Server\TlsServerKeyExchange.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake\ClientCertificateType.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake\HandshakeMessage.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake\HandshakeType.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\Alert.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\CipherAlgorithmType.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\CipherSuite.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\CipherSuiteCollection.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\CipherSuiteFactory.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\ClientContext.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\ClientRecordProtocol.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\ClientSessionCache.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\ContentType.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\Context.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\DebugHelper.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\ExchangeAlgorithmType.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\HandshakeState.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\HashAlgorithmType.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\HttpsClientStream.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\RecordProtocol.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\RSASslSignatureDeformatter.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\RSASslSignatureFormatter.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\SecurityCompressionType.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\SecurityParameters.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\SecurityProtocolType.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\ServerContext.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\ServerRecordProtocol.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\SslCipherSuite.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\SslClientStream.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\SslHandshakeHash.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\SslServerStream.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\SslStreamBase.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\TlsCipherSuite.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\TlsClientSettings.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\TlsException.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\TlsServerSettings.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\TlsStream.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.X509.Extensions\AuthorityKeyIdentifierExtension.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.X509.Extensions\ExtendedKeyUsageExtension.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.X509.Extensions\GeneralNames.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.X509.Extensions\NetscapeCertTypeExtension.cs" />\r
-    <Compile Include="..\Mono.Security\Mono.Security.X509.Extensions\SubjectAltNameExtension.cs" />\r
-    <Compile Include="..\System\Mono.Net.Security\LegacySslStream.cs" />\r
-    <Compile Include=".\Mono.Security.Providers.OldTls\OldTlsProvider.cs" />\r
-    <Compile Include=".\Properties\AssemblyInfo.cs" />\r  </ItemGroup>\r
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
-       Other similar extension points exist, see Microsoft.Common.targets.\r
-  <Target Name="BeforeBuild">\r
-  </Target>\r
-  <Target Name="AfterBuild">\r
-  </Target>\r
-  -->\r
-  <PropertyGroup>\r
-    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
-
-    </PreBuildEvent>\r
-    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
-\r
-    </PreBuildEvent>\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
-
-    </PostBuildEvent>\r
-    <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
-\r
-    </PostBuildEvent>\r
-  </PropertyGroup>\r
-  <ItemGroup>\r
-    <ProjectReference Include="../corlib/corlib-net_4_x.csproj">\r
-      <Project>{2CA6026B-2DC8-4C4C-A12C-1E8234049DB7}</Project>\r
-      <Name>corlib-net_4_x</Name>\r
-    </ProjectReference>\r
-    <ProjectReference Include="../System/System-net_4_x.csproj">\r
-      <Project>{2762E921-91A8-4C87-91E9-BA628013F753}</Project>\r
-      <Name>System-net_4_x</Name>\r
-    </ProjectReference>\r
-    <ProjectReference Include="../Mono.Security/Mono.Security-net_4_x.csproj">\r
-      <Project>{42D59DE7-586F-4ACF-BDD5-E7869E39E3EF}</Project>\r
-      <Name>Mono.Security-net_4_x</Name>\r
-    </ProjectReference>\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <Folder Include="Properties\" />\r
-  </ItemGroup>\r
-</Project>\r
-
diff --git a/mcs/class/Mono.Security.Providers.OldTls/Mono.Security.Providers.OldTls.dll.sources b/mcs/class/Mono.Security.Providers.OldTls/Mono.Security.Providers.OldTls.dll.sources
deleted file mode 100644 (file)
index 13653b8..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-./Properties/AssemblyInfo.cs
-../../build/common/Consts.cs
-../../build/common/Locale.cs
-../../build/common/MonoTODOAttribute.cs
-
-./Mono.Security.Providers.OldTls/OldTlsProvider.cs
-../System/Mono.Net.Security/LegacySslStream.cs
-
-../Mono.Security/Mono.Security.Cryptography/MD5SHA1.cs
-../Mono.Security/Mono.Security.Cryptography/TlsHMAC.cs
-../Mono.Security/Mono.Security.Protocol.Tls/Alert.cs
-../Mono.Security/Mono.Security.Protocol.Tls/CipherAlgorithmType.cs
-../Mono.Security/Mono.Security.Protocol.Tls/CipherSuite.cs
-../Mono.Security/Mono.Security.Protocol.Tls/CipherSuiteCollection.cs
-../Mono.Security/Mono.Security.Protocol.Tls/CipherSuiteFactory.cs
-../Mono.Security/Mono.Security.Protocol.Tls/ClientContext.cs
-../Mono.Security/Mono.Security.Protocol.Tls/ClientRecordProtocol.cs
-../Mono.Security/Mono.Security.Protocol.Tls/ClientSessionCache.cs
-../Mono.Security/Mono.Security.Protocol.Tls/ContentType.cs
-../Mono.Security/Mono.Security.Protocol.Tls/Context.cs
-../Mono.Security/Mono.Security.Protocol.Tls/DebugHelper.cs
-../Mono.Security/Mono.Security.Protocol.Tls/ExchangeAlgorithmType.cs
-../Mono.Security/Mono.Security.Protocol.Tls/HandshakeState.cs
-../Mono.Security/Mono.Security.Protocol.Tls/HashAlgorithmType.cs
-../Mono.Security/Mono.Security.Protocol.Tls/HttpsClientStream.cs
-../Mono.Security/Mono.Security.Protocol.Tls/RecordProtocol.cs
-../Mono.Security/Mono.Security.Protocol.Tls/RSASslSignatureDeformatter.cs
-../Mono.Security/Mono.Security.Protocol.Tls/RSASslSignatureFormatter.cs
-../Mono.Security/Mono.Security.Protocol.Tls/SecurityCompressionType.cs
-../Mono.Security/Mono.Security.Protocol.Tls/SecurityParameters.cs
-../Mono.Security/Mono.Security.Protocol.Tls/SecurityProtocolType.cs
-../Mono.Security/Mono.Security.Protocol.Tls/ServerContext.cs
-../Mono.Security/Mono.Security.Protocol.Tls/ServerRecordProtocol.cs
-../Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs
-../Mono.Security/Mono.Security.Protocol.Tls/SslCipherSuite.cs
-../Mono.Security/Mono.Security.Protocol.Tls/SslHandshakeHash.cs
-../Mono.Security/Mono.Security.Protocol.Tls/SslServerStream.cs
-../Mono.Security/Mono.Security.Protocol.Tls/SslStreamBase.cs
-../Mono.Security/Mono.Security.Protocol.Tls/TlsCipherSuite.cs
-../Mono.Security/Mono.Security.Protocol.Tls/TlsClientSettings.cs
-../Mono.Security/Mono.Security.Protocol.Tls/TlsException.cs
-../Mono.Security/Mono.Security.Protocol.Tls/TlsServerSettings.cs
-../Mono.Security/Mono.Security.Protocol.Tls/TlsStream.cs
-../Mono.Security/Mono.Security.Protocol.Tls.Handshake/ClientCertificateType.cs
-../Mono.Security/Mono.Security.Protocol.Tls.Handshake/HandshakeMessage.cs
-../Mono.Security/Mono.Security.Protocol.Tls.Handshake/HandshakeType.cs
-../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsClientCertificate.cs
-../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsClientCertificateVerify.cs
-../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsClientFinished.cs
-../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsClientHello.cs
-../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsClientKeyExchange.cs
-../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificate.cs
-../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificateRequest.cs
-../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerFinished.cs
-../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerHello.cs
-../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerHelloDone.cs
-../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerKeyExchange.cs
-../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsClientCertificate.cs
-../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsClientCertificateVerify.cs
-../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsClientFinished.cs
-../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsClientHello.cs
-../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsClientKeyExchange.cs
-../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsServerCertificate.cs
-../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsServerCertificateRequest.cs
-../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsServerFinished.cs
-../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsServerHello.cs
-../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsServerHelloDone.cs
-../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsServerKeyExchange.cs
-../Mono.Security/Mono.Security.X509.Extensions/AuthorityKeyIdentifierExtension.cs
-../Mono.Security/Mono.Security.X509.Extensions/ExtendedKeyUsageExtension.cs
-../Mono.Security/Mono.Security.X509.Extensions/GeneralNames.cs
-../Mono.Security/Mono.Security.X509.Extensions/NetscapeCertTypeExtension.cs
-../Mono.Security/Mono.Security.X509.Extensions/SubjectAltNameExtension.cs
diff --git a/mcs/class/Mono.Security.Providers.OldTls/Mono.Security.Providers.OldTls/OldTlsProvider.cs b/mcs/class/Mono.Security.Providers.OldTls/Mono.Security.Providers.OldTls/OldTlsProvider.cs
deleted file mode 100644 (file)
index 4532a17..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-//
-// OldTlsProvider.cs
-//
-// Author:
-//       Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2015 Xamarin, Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-using System;
-using System.IO;
-using System.Net;
-using System.Net.Security;
-using System.Security.Authentication;
-using System.Security.Cryptography.X509Certificates;
-using Mono.Security.Interface;
-using MNS = Mono.Net.Security;
-
-namespace Mono.Security.Providers.OldTls
-{
-       public class OldTlsProvider : MonoTlsProvider
-       {
-               static readonly Guid id = new Guid ("cf8baa0d-c6ed-40ae-b512-dec8d097e9af");
-
-               public override Guid ID {
-                       get { return id; }
-               }
-
-               public override string Name {
-                       get { return "old"; }
-               }
-
-               public override bool SupportsSslStream {
-                       get { return true; }
-               }
-
-               public override bool SupportsMonoExtensions {
-                       get { return false; }
-               }
-
-               public override bool SupportsConnectionInfo {
-                       get { return false; }
-               }
-
-               internal override bool SupportsTlsContext {
-                       get { return false; }
-               }
-
-               public override SslProtocols SupportedProtocols {
-                       get { return SslProtocols.Tls; }
-               }
-
-               public override IMonoSslStream CreateSslStream (
-                       Stream innerStream, bool leaveInnerStreamOpen,
-                       MonoTlsSettings settings = null)
-               {
-                       var impl = new MNS.Private.LegacySslStream (innerStream, leaveInnerStreamOpen, this, settings);
-                       return new MNS.Private.MonoSslStreamImpl (impl);
-               }
-
-               internal override IMonoTlsContext CreateTlsContext (
-                       string hostname, bool serverMode, TlsProtocols protocolFlags,
-                       X509Certificate serverCertificate, X509CertificateCollection clientCertificates,
-                       bool remoteCertRequired, MonoEncryptionPolicy encryptionPolicy,
-                       MonoTlsSettings settings)
-               {
-                       throw new NotSupportedException ();
-               }
-       }
-}
-
diff --git a/mcs/class/Mono.Security.Providers.OldTls/Properties/AssemblyInfo.cs b/mcs/class/Mono.Security.Providers.OldTls/Properties/AssemblyInfo.cs
deleted file mode 100644 (file)
index 923beca..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// AssemblyInfo.cs
-//
-// Author:
-//       Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2015 Xamarin, Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-using System;
-using System.Reflection;
-using System.Resources;
-using System.Security;
-using System.Security.Permissions;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about the system assembly
-
-[assembly: AssemblyVersion (Consts.FxVersion)]
-
-[assembly: AssemblyCompany ("MONO development team")]
-[assembly: AssemblyCopyright ("(c) 2015 Xamarin")]
-[assembly: AssemblyDescription ("Mono.Security.Providers.OldTls.dll")]
-[assembly: AssemblyProduct ("MONO CLI")]
-[assembly: AssemblyTitle ("Mono.Security.Providers.OldTls.dll")]
-[assembly: CLSCompliant (true)]
-[assembly: ComVisible (false)]
-[assembly: NeutralResourcesLanguage ("en-US")]
-
index 3e79d28a8fe09fc504f1cba2557b16b862df859c..eeccc251f7d6ed12f515024c5183ee374d19e6e4 100644 (file)
@@ -66,8 +66,3 @@ using System.Runtime.InteropServices;
 [assembly: InternalsVisibleTo ("System, PublicKey=00000000000000000400000000000000")]
 #endif
 
-[assembly: InternalsVisibleTo ("Mono.Security.Providers.NewTls, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
-[assembly: InternalsVisibleTo ("Mono.Security.Providers.OldTls, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
-[assembly: InternalsVisibleTo ("Mono.Security.Providers.DotNet, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
-[assembly: InternalsVisibleTo ("Mono.Security.Providers.NewSystemSource, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
-[assembly: InternalsVisibleTo ("Xamarin.BoringTls, PublicKey=002400000480000094000000060200000024000052534131000400001100000099dd12eda85767ae6f06023ee28e711c7e5a212462095c83868c29db75eddf6d8e296e03824c14fedd5f55553fed0b6173be3cc985a4b7f9fb7c83ccff8ba3938563b3d1f45a81122f12a1bcb73edcaad61a8456c7595a6da5184b4dd9d10f011b949ef1391fccfeab1ba62aa51c267ef8bd57ef1b6ba5a4c515d0badb81a78f")]
index 4bc5f436f454b6bb8e2e7e1896524836ddcc728f..63003e366b9db64eae270edd87fba522a81fe5e3 100644 (file)
@@ -49,6 +49,10 @@ namespace Mono.Security.Interface
                        get; set;
                }
 
+               public string PeerDomainName {
+                       get; set;
+               }
+
                public override string ToString ()
                {
                        return string.Format ("[MonoTlsConnectionInfo: {0}:{1}]", ProtocolVersion, CipherSuiteCode);
index cab5d34208680ac5f12accbe69744d2238c513cc..2ca12fb601a69ce9e90cc073953f6e34ac86690c 100644 (file)
@@ -71,7 +71,12 @@ namespace System.Runtime.Remoting.Channels.Tcp
                                        else {
                                                IPHostEntry he = Dns.Resolve (Dns.GetHostName());
                                                if (he.AddressList.Length == 0) throw new RemotingException ("IP address could not be determined for this host");
-                                               host = he.AddressList [0].ToString ();
+                                               AddressFamily addressFamily = (Socket.OSSupportsIPv4) ? AddressFamily.InterNetwork : AddressFamily.InterNetworkV6;
+                                               IPAddress addr = GetMachineAddress (he, addressFamily);
+                                               if (addr != null)
+                                                       host = addr.ToString ();
+                                               else
+                                                       host = he.AddressList [0].ToString ();
                                        }
                                }
                                else
@@ -259,6 +264,22 @@ namespace System.Runtime.Remoting.Channels.Tcp
                        server_thread.Join ();
                        server_thread = null;                   
                }
+
+               private static IPAddress GetMachineAddress (IPHostEntry host, AddressFamily addressFamily)
+               {
+                       IPAddress result = null;
+                       if (host != null) {
+                               IPAddress[] addressList = host.AddressList;
+                               for (int i = 0; i < addressList.Length; i++) {
+                                       if (addressList[i].AddressFamily == addressFamily) {
+                                               result = addressList[i];
+                                               break;
+                                       }
+                               }
+                       }
+
+                       return result;
+               }
        }
 
        class ClientConnection
index 3388150cf10fba174c9be43736c3cc1f233e82a5..a80606ef6681ab5fb206f56beb846e816f5bc309 100644 (file)
@@ -74,10 +74,5 @@ using System.Runtime.InteropServices;
        [assembly: StringFreezing]
        [assembly: DefaultDependency (LoadHint.Always)]
 
-       [assembly: InternalsVisibleTo ("Mono.Security.Providers.NewSystemSource, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
-       [assembly: InternalsVisibleTo ("Mono.Security.Providers.OldTls, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
-       [assembly: InternalsVisibleTo ("Mono.Security.Providers.NewTls, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
-       [assembly: InternalsVisibleTo ("Mono.Security.Providers.DotNet, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
        [assembly: InternalsVisibleTo ("Mono.Security, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
 
-       [assembly: InternalsVisibleTo ("Xamarin.BoringTls, PublicKey=002400000480000094000000060200000024000052534131000400001100000099dd12eda85767ae6f06023ee28e711c7e5a212462095c83868c29db75eddf6d8e296e03824c14fedd5f55553fed0b6173be3cc985a4b7f9fb7c83ccff8ba3938563b3d1f45a81122f12a1bcb73edcaad61a8456c7595a6da5184b4dd9d10f011b949ef1391fccfeab1ba62aa51c267ef8bd57ef1b6ba5a4c515d0badb81a78f")]
index e53b6eba4c8ee1c9e383102d0a4f548ee79ed983..3dc005344f3b50baf23a65d02938a18c479b4fa3 100644 (file)
@@ -104,21 +104,7 @@ namespace Mono.Net.Security
                static IMonoTlsProvider CreateDefaultProvider ()
                {
 #if SECURITY_DEP
-                       MSI.MonoTlsProvider provider = null;
-#if MONO_FEATURE_NEW_SYSTEM_SOURCE
-                       /*
-                        * This is a hack, which is used in the Mono.Security.Providers.NewSystemSource
-                        * assembly, which will provide a "fake" System.dll.  Use the public Mono.Security
-                        * API to get the "real" System.dll's provider via reflection, then wrap it with
-                        * the "fake" version's perceived view.
-                        *
-                        * NewSystemSource needs to compile MonoTlsProviderFactory.cs, IMonoTlsProvider.cs,
-                        * MonoTlsProviderWrapper.cs and CallbackHelpers.cs from this directory and only these.
-                        */
-                       provider = MSI.MonoTlsProviderFactory.GetProvider ();
-#else
-                       provider = CreateDefaultProviderImpl ();
-#endif
+                       MSI.MonoTlsProvider provider = CreateDefaultProviderImpl ();
                        if (provider != null)
                                return new Private.MonoTlsProviderWrapper (provider);
 #endif
@@ -131,7 +117,7 @@ namespace Mono.Net.Security
 
                #endregion
 
-#if SECURITY_DEP && !MONO_FEATURE_NEW_SYSTEM_SOURCE
+#if SECURITY_DEP
 
                static Dictionary<string,string> providerRegistration;
 
@@ -172,8 +158,6 @@ namespace Mono.Net.Security
                                        return;
                                providerRegistration = new Dictionary<string,string> ();
                                providerRegistration.Add ("legacy", "Mono.Net.Security.Private.MonoLegacyTlsProvider");
-                               providerRegistration.Add ("newtls", "Mono.Security.Providers.NewTls.NewTlsProvider, Mono.Security.Providers.NewTls, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756");
-                               providerRegistration.Add ("oldtls", "Mono.Security.Providers.OldTls.OldTlsProvider, Mono.Security.Providers.OldTls, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756");
 #if HAVE_BTLS
                                if (Mono.Btls.MonoBtlsProvider.IsSupported ())
                                        providerRegistration.Add ("btls", "Mono.Btls.MonoBtlsProvider");
diff --git a/mcs/class/System/ReferenceSources/Internal.cs b/mcs/class/System/ReferenceSources/Internal.cs
deleted file mode 100644 (file)
index 6c50450..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-//
-// Internal.cs
-//
-// Author:
-//       Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System.Runtime.InteropServices;
-using System.Security.Cryptography.X509Certificates;
-
-namespace System.Net.Security
-{
-       //From Schannel.h
-       [Flags]
-       internal enum SchProtocols
-       {
-               Zero = 0,
-               PctClient = 0x00000002,
-               PctServer = 0x00000001,
-               Pct = (PctClient | PctServer),
-               Ssl2Client = 0x00000008,
-               Ssl2Server = 0x00000004,
-               Ssl2 = (Ssl2Client | Ssl2Server),
-               Ssl3Client = 0x00000020,
-               Ssl3Server = 0x00000010,
-               Ssl3 = (Ssl3Client | Ssl3Server),
-               Tls10Client = 0x00000080,
-               Tls10Server = 0x00000040,
-               Tls10 = (Tls10Client | Tls10Server),
-               Tls11Client = 0x00000200,
-               Tls11Server = 0x00000100,
-               Tls11 = (Tls11Client | Tls11Server),
-               Tls12Client = 0x00000800,
-               Tls12Server = 0x00000400,
-               Tls12 = (Tls12Client | Tls12Server),
-               Ssl3Tls = (Ssl3 | Tls10),
-               UniClient = unchecked((int)0x80000000),
-               UniServer = 0x40000000,
-               Unified = (UniClient | UniServer),
-               ClientMask = (PctClient | Ssl2Client | Ssl3Client | Tls10Client | Tls11Client | Tls12Client | UniClient),
-               ServerMask = (PctServer | Ssl2Server | Ssl3Server | Tls10Server | Tls11Server | Tls12Server | UniServer)
-       }
-
-       //From Schannel.h
-       [StructLayout (LayoutKind.Sequential)]
-       internal class SslConnectionInfo
-       {
-               public readonly int Protocol;
-               public readonly int DataCipherAlg;
-               public readonly int DataKeySize;
-               public readonly int DataHashAlg;
-               public readonly int DataHashKeySize;
-               public readonly int KeyExchangeAlg;
-               public readonly int KeyExchKeySize;
-
-               internal SslConnectionInfo (int protocol)
-               {
-                       Protocol = protocol;
-               }
-       }
-}
diff --git a/mcs/class/System/ReferenceSources/SSPIConfiguration.cs b/mcs/class/System/ReferenceSources/SSPIConfiguration.cs
deleted file mode 100644 (file)
index 3ab4138..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// SSPIConfiguration.cs
-//
-// Author:
-//       Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-#if MONO_FEATURE_NEW_TLS && SECURITY_DEP
-#if MONO_SECURITY_ALIAS
-extern alias MonoSecurity;
-using MonoSecurity::Mono.Security.Interface;
-#else
-using Mono.Security.Interface;
-#endif
-using Mono.Net.Security;
-
-namespace System.Net.Security
-{
-       internal interface SSPIConfiguration
-       {
-               IMonoTlsProvider Provider {
-                       get;
-               }
-
-               MonoTlsSettings Settings {
-                       get;
-               }
-
-               IMonoTlsEventSink EventSink {
-                       get;
-               }
-       }
-}
-#endif
diff --git a/mcs/class/System/ReferenceSources/SSPISafeHandles.cs b/mcs/class/System/ReferenceSources/SSPISafeHandles.cs
deleted file mode 100644 (file)
index a12e395..0000000
+++ /dev/null
@@ -1,209 +0,0 @@
-//
-// SafeHandles.cs
-//
-// Author:
-//       Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-#if MONO_FEATURE_NEW_TLS && SECURITY_DEP
-#if MONO_SECURITY_ALIAS
-extern alias MonoSecurity;
-using IMonoTlsContext = MonoSecurity::Mono.Security.Interface.IMonoTlsContext;
-#else
-using IMonoTlsContext = Mono.Security.Interface.IMonoTlsContext;
-#endif
-
-using System.Runtime.InteropServices;
-using System.Security.Cryptography.X509Certificates;
-
-namespace System.Net.Security
-{
-       class DummySafeHandle : SafeHandle
-       {
-               protected DummySafeHandle ()
-                       : base ((IntPtr)(-1), true)
-               {
-               }
-
-               protected override bool ReleaseHandle ()
-               {
-                       return true;
-               }
-
-               public override bool IsInvalid {
-                       get { return handle == (IntPtr)(-1); }
-               }
-       }
-
-       class SafeFreeCertContext : DummySafeHandle
-       {
-       }
-
-       class SafeFreeCredentials : DummySafeHandle
-       {
-               SecureCredential credential;
-
-               public X509Certificate2 Certificate {
-                       get {
-                               if (IsInvalid)
-                                       throw new ObjectDisposedException ("Certificate");
-                               return credential.certificate;
-                       }
-               }
-
-               public SafeFreeCredentials (SecureCredential credential)
-               {
-                       this.credential = credential;
-                       bool success = true;
-                       DangerousAddRef (ref success);
-               }
-
-               public override bool IsInvalid {
-                       get {
-                               return credential.certificate == null;
-                       }
-               }
-
-               protected override bool ReleaseHandle ()
-               {
-                       credential.Clear ();
-                       return base.ReleaseHandle ();
-               }
-       }
-
-       class SafeDeleteContext : DummySafeHandle
-       {
-               IMonoTlsContext context;
-
-               public IMonoTlsContext Context {
-                       get {
-                               if (IsInvalid)
-                                       throw new ObjectDisposedException ("TlsContext");
-                               return context;
-                       }
-               }
-
-               public SafeDeleteContext (IMonoTlsContext context)
-               {
-                       this.context = context;
-               }
-
-               public override bool IsInvalid {
-                       get {
-                               return context == null || !context.IsValid;
-                       }
-               }
-
-               protected override bool ReleaseHandle ()
-               {
-                       context.Dispose ();
-                       context = null;
-                       return base.ReleaseHandle ();
-               }
-       }
-
-       struct SecureCredential
-       {
-               public const int CurrentVersion = 0x4;
-
-               [Flags]
-               public enum Flags
-               {
-                       Zero = 0,
-                       NoSystemMapper = 0x02,
-                       NoNameCheck = 0x04,
-                       ValidateManual = 0x08,
-                       NoDefaultCred = 0x10,
-                       ValidateAuto = 0x20,
-                       SendAuxRecord = 0x00200000,
-                       UseStrongCrypto = 0x00400000
-               }
-
-               int version;
-               internal X509Certificate2 certificate;
-               SchProtocols protocols;
-               EncryptionPolicy policy;
-
-               public SecureCredential (int version, X509Certificate2 certificate, SecureCredential.Flags flags, SchProtocols protocols, EncryptionPolicy policy)
-               {
-                       this.version = version;
-                       this.certificate = certificate;
-                       this.protocols = protocols;
-                       this.policy = policy;
-               }
-
-               public void Clear ()
-               {
-                       certificate = null;
-               }
-       }
-
-       internal class SafeCredentialReference : DummySafeHandle
-       {
-               //
-               // Static cache will return the target handle if found the reference in the table.
-               //
-               internal SafeFreeCredentials _Target;
-
-               //
-               //
-               internal static SafeCredentialReference CreateReference (SafeFreeCredentials target)
-               {
-                       SafeCredentialReference result = new SafeCredentialReference (target);
-                       if (result.IsInvalid)
-                               return null;
-
-                       return result;
-               }
-
-               private SafeCredentialReference (SafeFreeCredentials target)
-                       : base ()
-               {
-                       // Bumps up the refcount on Target to signify that target handle is statically cached so
-                       // its dispose should be postponed
-                       bool b = false;
-                       try {
-                               target.DangerousAddRef (ref b);
-                       } catch {
-                               if (b) {
-                                       target.DangerousRelease ();
-                                       b = false;
-                               }
-                       } finally {
-                               if (b) {
-                                       _Target = target;
-                                       SetHandle (new IntPtr (0));   // make this handle valid
-                               }
-                       }
-               }
-
-               override protected bool ReleaseHandle ()
-               {
-                       SafeFreeCredentials target = _Target;
-                       if (target != null)
-                               target.DangerousRelease ();
-                       _Target = null;
-                       return true;
-               }
-       }
-
-}
-#endif
diff --git a/mcs/class/System/ReferenceSources/SSPIWrapper.cs b/mcs/class/System/ReferenceSources/SSPIWrapper.cs
deleted file mode 100644 (file)
index a0cb8d5..0000000
+++ /dev/null
@@ -1,303 +0,0 @@
-//
-// SSPIWrapper.cs
-//
-// Author:
-//       Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-#if MONO_FEATURE_NEW_TLS && SECURITY_DEP
-#if MONO_SECURITY_ALIAS
-extern alias MonoSecurity;
-#endif
-
-#if MONO_SECURITY_ALIAS
-using MX = MonoSecurity::Mono.Security.X509;
-using MonoSecurity::Mono.Security.Interface;
-#else
-using MX = Mono.Security.X509;
-using Mono.Security.Interface;
-#endif
-
-using System.Runtime.InteropServices;
-using System.Security.Authentication.ExtendedProtection;
-using System.Security.Cryptography.X509Certificates;
-using MNS = Mono.Net.Security;
-
-namespace System.Net.Security
-{
-       internal class SSPIInterface
-       {
-               public IMonoTlsContext Context {
-                       get;
-                       private set;
-               }
-
-               public IMonoTlsEventSink EventSink {
-                       get;
-                       private set;
-               }
-
-               public SSPIInterface (IMonoTlsContext context, IMonoTlsEventSink eventSink)
-               {
-                       Context = context;
-                       EventSink = eventSink;
-               }
-       }
-
-       internal static class GlobalSSPI
-       {
-               internal static SSPIInterface Create (string hostname, bool serverMode, SchProtocols protocolFlags, X509Certificate serverCertificate, X509CertificateCollection clientCertificates,
-                                                          bool remoteCertRequired, bool checkCertName, bool checkCertRevocationStatus, EncryptionPolicy encryptionPolicy,
-                                                          LocalCertSelectionCallback certSelectionDelegate, RemoteCertValidationCallback remoteValidationCallback, SSPIConfiguration userConfig)
-               {
-                       if (userConfig.Settings != null && remoteValidationCallback != null)
-                               throw new InvalidOperationException ();
-                       var context = userConfig.Provider.CreateTlsContext (
-                               hostname, serverMode, (TlsProtocols)protocolFlags, serverCertificate, clientCertificates,
-                               remoteCertRequired, checkCertName, checkCertRevocationStatus,
-                               (MonoEncryptionPolicy)encryptionPolicy, userConfig.Settings);
-                       return new SSPIInterface (context, userConfig.EventSink);
-               }
-       }
-
-       /*
-        * SSPIWrapper _is a _class that provides a managed implementation of the equivalent
-        * _class _in Microsofts .NET Framework.   
-        * 
-        * The SSPIWrapper class is used by the TLS/SSL stack to implement both the 
-        * protocol handshake as well as the encryption and decryption of messages.
-        * 
-        * Microsoft's implementation of this class is merely a P/Invoke wrapper
-        * around the native SSPI APIs on Windows.   This implementation instead, 
-        * provides a managed implementation that uses the cross platform Mono.Security 
-        * to provide the equivalent functionality.
-        * 
-        * Ideally, this should be abstracted with a different name, and decouple
-        * the naming from the SSPIWrapper name, but this allows Mono to reuse
-        * the .NET code with minimal changes.
-        * 
-        * The "internal" methods here are the API that is consumed by the class
-        * libraries.
-        */
-       internal static class SSPIWrapper
-       {
-               static void SetCredentials (SSPIInterface secModule, SafeFreeCredentials credentials)
-               {
-                       if (credentials != null && !credentials.IsInvalid) {
-                               if (!secModule.Context.HasCredentials && credentials.Certificate != null) {
-                                       var cert = new X509Certificate2 (credentials.Certificate.RawData);
-                                       secModule.Context.SetCertificate (cert, credentials.Certificate.PrivateKey);
-                               }
-                               bool success = true;
-                               credentials.DangerousAddRef (ref success);
-                       }
-               }
-
-               /*
-                * @safecontext is null on the first use, but it will become non-null for invocations 
-                * where the connection is being re-negotiated.
-                * 
-               */
-               internal static int AcceptSecurityContext (SSPIInterface secModule, ref SafeFreeCredentials credentials, ref SafeDeleteContext safeContext, ContextFlags inFlags, Endianness endianness, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, ref ContextFlags outFlags)
-               {
-                       if (endianness != Endianness.Native)
-                               throw new NotSupportedException ();
-
-                       if (safeContext == null) {
-                               if (credentials == null || credentials.IsInvalid)
-                                       return (int)SecurityStatus.CredentialsNeeded;
-
-                               secModule.Context.Initialize (secModule.EventSink);
-                               safeContext = new SafeDeleteContext (secModule.Context);
-                       }
-
-                       SetCredentials (secModule, credentials);
-
-                       var incoming = GetInputBuffer (inputBuffer);
-                       IBufferOffsetSize outgoing;
-
-                       var retval = (int)safeContext.Context.GenerateNextToken (incoming, out outgoing);
-                       UpdateOutput (outgoing, outputBuffer);
-                       return retval;
-               }
-
-               internal static int InitializeSecurityContext (SSPIInterface secModule, ref SafeFreeCredentials credentials, ref SafeDeleteContext safeContext, string targetName, ContextFlags inFlags, Endianness endianness, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, ref ContextFlags outFlags)
-               {
-                       if (inputBuffer != null)
-                               throw new InvalidOperationException ();
-
-                       if (safeContext == null) {
-                               secModule.Context.Initialize (secModule.EventSink);
-                               safeContext = new SafeDeleteContext (secModule.Context);
-                       }
-
-                       return InitializeSecurityContext (secModule, credentials, ref safeContext, targetName, inFlags, endianness, null, outputBuffer, ref outFlags);
-               }
-
-               internal static int InitializeSecurityContext (SSPIInterface secModule, SafeFreeCredentials credentials, ref SafeDeleteContext safeContext, string targetName, ContextFlags inFlags, Endianness endianness, SecurityBuffer[] inputBuffers, SecurityBuffer outputBuffer, ref ContextFlags outFlags)
-               {
-                       if (endianness != Endianness.Native)
-                               throw new NotSupportedException ();
-
-                       SetCredentials (secModule, credentials);
-
-                       SecurityBuffer inputBuffer = null;
-                       if (inputBuffers != null) {
-                               if (inputBuffers.Length != 2 || inputBuffers [1].type != BufferType.Empty)
-                                       throw new NotSupportedException ();
-                               inputBuffer = inputBuffers [0];
-                       }
-
-                       var incoming = GetInputBuffer (inputBuffer);
-                       IBufferOffsetSize outgoing = null;
-
-                       var retval = (int)safeContext.Context.GenerateNextToken (incoming, out outgoing);
-                       UpdateOutput (outgoing, outputBuffer);
-                       return retval;
-               }
-
-               internal static int EncryptMessage (SSPIInterface secModule, SafeDeleteContext safeContext, SecurityBuffer securityBuffer, uint sequenceNumber)
-               {
-                       var incoming = GetInputBuffer (securityBuffer);
-                       var retval = (int)safeContext.Context.EncryptMessage (ref incoming);
-                       UpdateOutput (incoming, securityBuffer);
-                       return retval;
-               }
-
-               internal static int DecryptMessage (SSPIInterface secModule, SafeDeleteContext safeContext, SecurityBuffer securityBuffer, uint sequenceNumber)
-               {
-                       var incoming = GetInputBuffer (securityBuffer);
-                       var retval = (int)safeContext.Context.DecryptMessage (ref incoming);
-                       UpdateOutput (incoming, securityBuffer);
-                       return retval;
-               }
-
-               internal static byte[] CreateShutdownMessage (SSPIInterface secModule, SafeDeleteContext safeContext)
-               {
-                       return safeContext.Context.CreateCloseNotify ();
-               }
-
-               internal static byte[] CreateHelloRequestMessage (SSPIInterface secModule, SafeDeleteContext safeContext)
-               {
-                       return safeContext.Context.CreateHelloRequest ();
-               }
-
-               internal static bool IsClosed (SSPIInterface secModule, SafeDeleteContext safeContext)
-               {
-                       return safeContext.Context.ReceivedCloseNotify;
-               }
-
-               internal static SafeFreeCredentials AcquireCredentialsHandle (SSPIInterface SecModule, string package, CredentialUse intent, SecureCredential scc)
-               {
-                       return new SafeFreeCredentials (scc);
-               }
-
-               public static ChannelBinding QueryContextChannelBinding (SSPIInterface SecModule, SafeDeleteContext securityContext, ContextAttribute contextAttribute)
-               {
-                       return null;
-               }
-
-               internal static X509Certificate2 GetRemoteCertificate (SafeDeleteContext safeContext, out X509Certificate2Collection remoteCertificateStore)
-               {
-                       X509CertificateCollection monoCollection;
-                       if (safeContext == null || safeContext.IsInvalid) {
-                               remoteCertificateStore = null;
-                               return null;
-                       }
-                       var monoCert = safeContext.Context.GetRemoteCertificate (out monoCollection);
-                       if (monoCert == null) {
-                               remoteCertificateStore = null;
-                               return null;
-                       }
-
-                       remoteCertificateStore = new X509Certificate2Collection ();
-                       foreach (var cert in monoCollection) {
-                               remoteCertificateStore.Add (cert);
-                       }
-                       return (X509Certificate2)monoCert;
-               }
-
-               internal static bool CheckRemoteCertificate (SafeDeleteContext safeContext)
-               {
-                       return safeContext.Context.VerifyRemoteCertificate ();
-               }
-
-               internal static MonoTlsConnectionInfo GetMonoConnectionInfo (SSPIInterface SecModule, SafeDeleteContext securityContext)
-               {
-                       return securityContext.Context.GetConnectionInfo ();
-               }
-
-               internal static SslConnectionInfo GetConnectionInfo (SSPIInterface SecModule, SafeDeleteContext securityContext)
-               {
-                       var info = securityContext.Context.GetConnectionInfo ();
-                       if (info == null)
-                               return null;
-
-                       return new SslConnectionInfo ((int)info.ProtocolVersion);
-               }
-
-               class InputBuffer : IBufferOffsetSize
-               {
-                       public byte[] Buffer {
-                               get;
-                               private set;
-                       }
-
-                       public int Offset {
-                               get;
-                               private set;
-                       }
-
-                       public int Size {
-                               get;
-                               private set;
-                       }
-
-                       public InputBuffer (byte[] buffer, int offset, int size)
-                       {
-                               Buffer = buffer;
-                               Offset = offset;
-                               Size = size;
-                       }
-               }
-
-               static IBufferOffsetSize GetInputBuffer (SecurityBuffer incoming)
-               {
-                       return incoming != null ? new InputBuffer (incoming.token, incoming.offset, incoming.size) : null;
-               }
-
-               static void UpdateOutput (IBufferOffsetSize buffer, SecurityBuffer outputBuffer)
-               {
-                       if (buffer != null) {
-                               outputBuffer.token = buffer.Buffer;
-                               outputBuffer.offset = buffer.Offset;
-                               outputBuffer.size = buffer.Size;
-                               outputBuffer.type = BufferType.Token;
-                       } else {
-                               outputBuffer.token = null;
-                               outputBuffer.size = outputBuffer.offset = 0;
-                               outputBuffer.type = BufferType.Empty;
-                       }
-               }
-       }
-}
-#endif
diff --git a/mcs/class/System/ReferenceSources/SslStream.cs b/mcs/class/System/ReferenceSources/SslStream.cs
deleted file mode 100644 (file)
index fea8922..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-//
-// Mono-specific additions to Microsoft's SslStream.cs
-//
-#if MONO_FEATURE_NEW_TLS && SECURITY_DEP
-#if MONO_SECURITY_ALIAS
-extern alias MonoSecurity;
-using MonoSecurity::Mono.Security.Interface;
-#else
-using Mono.Security.Interface;
-#endif
-using System.Threading;
-using System.Security.Cryptography.X509Certificates;
-using MNS = Mono.Net.Security;
-
-namespace System.Net.Security
-{
-       using System.Net.Sockets;
-       using System.IO;
-
-       partial class SslStream : IMonoTlsEventSink
-       {
-               #if SECURITY_DEP
-               SSPIConfiguration _Configuration;
-
-               internal SslStream (Stream innerStream, bool leaveInnerStreamOpen, EncryptionPolicy encryptionPolicy, MonoTlsProvider provider, MonoTlsSettings settings)
-                       : base (innerStream, leaveInnerStreamOpen)
-               {
-                       if (encryptionPolicy != EncryptionPolicy.RequireEncryption && encryptionPolicy != EncryptionPolicy.AllowNoEncryption && encryptionPolicy != EncryptionPolicy.NoEncryption)
-                               throw new ArgumentException (SR.GetString (SR.net_invalid_enum, "EncryptionPolicy"), "encryptionPolicy");
-
-                       var validationHelper = MNS.ChainValidationHelper.CloneWithCallbackWrapper (provider, ref settings, myUserCertValidationCallbackWrapper);
-
-                       LocalCertSelectionCallback selectionCallback = null;
-                       if (validationHelper.HasCertificateSelectionCallback)
-                               selectionCallback = validationHelper.SelectClientCertificate;
-
-                       var internalProvider = new MNS.Private.MonoTlsProviderWrapper (provider);
-                       _Configuration = new MyConfiguration (internalProvider, settings, this);
-                       _SslState = new SslState (innerStream, null, selectionCallback, encryptionPolicy, _Configuration);
-               }
-
-               /*
-                * Mono-specific version of 'userCertValidationCallbackWrapper'; we're called from ChainValidationHelper.ValidateChain() here.
-                *
-                * Since we're built without the PrebuiltSystem alias, we can't use 'SslPolicyErrors' here.  This prevents us from creating a subclass of 'ChainValidationHelper'
-                * as well as providing a custom 'ServerCertValidationCallback'.
-                */
-               bool myUserCertValidationCallbackWrapper (ServerCertValidationCallback callback, X509Certificate certificate, X509Chain chain, MonoSslPolicyErrors sslPolicyErrors)
-               {
-                       m_RemoteCertificateOrBytes = certificate == null ? null : certificate.GetRawCertData ();
-                       if (callback == null) {
-                               if (!_SslState.RemoteCertRequired)
-                                       sslPolicyErrors &= ~MonoSslPolicyErrors.RemoteCertificateNotAvailable;
-
-                               return (sslPolicyErrors == MonoSslPolicyErrors.None);
-                       }
-
-                       return MNS.ChainValidationHelper.InvokeCallback (callback, this, certificate, chain, sslPolicyErrors);
-               }
-
-               class MyConfiguration : SSPIConfiguration
-               {
-                       MNS.IMonoTlsProvider provider;
-                       MonoTlsSettings settings;
-                       IMonoTlsEventSink eventSink;
-
-                       public MyConfiguration (MNS.IMonoTlsProvider provider, MonoTlsSettings settings, IMonoTlsEventSink eventSink)
-                       {
-                               this.provider = provider;
-                               this.settings = settings;
-                               this.eventSink = eventSink;
-                       }
-
-                       public MNS.IMonoTlsProvider Provider {
-                               get { return provider; }
-                       }
-
-                       public MonoTlsSettings Settings {
-                               get { return settings; }
-                       }
-
-                       public IMonoTlsEventSink EventSink {
-                               get { return eventSink; }
-                       }
-               }
-               #endif
-
-               internal bool IsClosed {
-                       get { return _SslState.IsClosed; }
-               }
-
-               internal Exception LastError {
-                       get { return lastError; }
-               }
-
-               #region IMonoTlsEventSink
-
-               Exception lastError;
-
-               void IMonoTlsEventSink.Error (Exception exception)
-               {
-                       Interlocked.CompareExchange<Exception> (ref lastError, exception, null);
-               }
-
-               void IMonoTlsEventSink.ReceivedCloseNotify ()
-               {
-               }
-
-               #endregion
-
-               internal IAsyncResult BeginShutdown (AsyncCallback asyncCallback, object asyncState)
-               {
-                       return _SslState.BeginShutdown (asyncCallback, asyncState);
-               }
-
-               internal void EndShutdown (IAsyncResult asyncResult)
-               {
-                       _SslState.EndShutdown (asyncResult);
-               }
-
-               internal IAsyncResult BeginRenegotiate (AsyncCallback asyncCallback, object asyncState)
-               {
-                       return _SslState.BeginRenegotiate (asyncCallback, asyncState);
-               }
-
-               internal void EndRenegotiate (IAsyncResult asyncResult)
-               {
-                       _SslState.EndRenegotiate (asyncResult);
-               }
-
-               internal X509Certificate InternalLocalCertificate {
-                       get { return _SslState.InternalLocalCertificate; }
-               }
-
-               internal MonoTlsConnectionInfo GetMonoConnectionInfo ()
-               {
-                       return _SslState.GetMonoConnectionInfo ();
-               }
-       }
-}
-#endif
diff --git a/mcs/class/System/ReferenceSources/_SecureChannel.cs b/mcs/class/System/ReferenceSources/_SecureChannel.cs
deleted file mode 100644 (file)
index f920353..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-//
-// Mono-specific additions to Microsoft's _SecureChannel.cs
-//
-#if MONO_FEATURE_NEW_TLS && SECURITY_DEP
-#if MONO_SECURITY_ALIAS
-extern alias MonoSecurity;
-using MonoSecurity::Mono.Security.Interface;
-#else
-using Mono.Security.Interface;
-#endif
-namespace System.Net.Security
-{
-       partial class SecureChannel
-       {
-               internal MonoTlsConnectionInfo GetMonoConnectionInfo ()
-               {
-                       return SSPIWrapper.GetMonoConnectionInfo (m_SecModule, m_SecurityContext);
-               }
-
-               internal ProtocolToken CreateShutdownMessage ()
-               {
-                       var buffer = SSPIWrapper.CreateShutdownMessage (m_SecModule, m_SecurityContext);
-                       return new ProtocolToken (buffer, SecurityStatus.ContinueNeeded);
-               }
-
-               internal ProtocolToken CreateHelloRequestMessage ()
-               {
-                       var buffer = SSPIWrapper.CreateHelloRequestMessage (m_SecModule, m_SecurityContext);
-                       return new ProtocolToken (buffer, SecurityStatus.ContinueNeeded);
-               }
-
-               internal bool IsClosed {
-                       get {
-                               if (m_SecModule == null || m_SecurityContext == null || m_SecurityContext.IsClosed)
-                                       return true;
-                               return SSPIWrapper.IsClosed (m_SecModule, m_SecurityContext);
-                       }
-               }
-       }
-}
-#endif
diff --git a/mcs/class/System/ReferenceSources/_SslState.cs b/mcs/class/System/ReferenceSources/_SslState.cs
deleted file mode 100644 (file)
index 8d5ae3f..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-//
-// Mono-specific additions to Microsoft's _SslState.cs
-//
-#if MONO_FEATURE_NEW_TLS && SECURITY_DEP
-#if MONO_SECURITY_ALIAS
-extern alias MonoSecurity;
-using MonoSecurity::Mono.Security.Interface;
-#else
-using Mono.Security.Interface;
-#endif
-namespace System.Net.Security
-{
-       using System.IO;
-       using System.Threading;
-       using System.Net.Sockets;
-
-       partial class SslState
-       {
-               int _SentShutdown;
-
-               internal MonoTlsConnectionInfo GetMonoConnectionInfo ()
-               {
-                       return Context.GetMonoConnectionInfo ();
-               }
-
-               internal bool IsClosed {
-                       get { return Context.IsClosed; }
-               }
-
-               internal ProtocolToken CreateShutdownMessage ()
-               {
-                       return Context.CreateShutdownMessage ();
-               }
-
-               internal ProtocolToken CreateHelloRequestMessage ()
-               {
-                       return Context.CreateHelloRequestMessage ();
-               }
-
-               internal IAsyncResult BeginShutdown (AsyncCallback asyncCallback, object asyncState)
-               {
-                       var shutdownResult = new ShutdownAsyncResult (this, asyncState, asyncCallback);
-
-                       if (Interlocked.CompareExchange (ref _SentShutdown, 1, 0) == 1) {
-                               shutdownResult.InvokeCallback ();
-                               return shutdownResult;
-                       }
-
-                       try
-                       {
-                               CheckThrow (false);
-                               shutdownResult.SentShutdown = true;
-                               SecureStream.BeginShutdown (shutdownResult);
-                               return shutdownResult;
-                       } catch (Exception e) {
-                               if (e is IOException)
-                                       throw;
-                               throw new IOException (SR.GetString (SR.mono_net_io_shutdown), e);
-                       }
-               }
-
-               internal void EndShutdown (IAsyncResult asyncResult)
-               {
-                       if (asyncResult == null)
-                               throw new ArgumentNullException ("asyncResult");
-
-                       var shutdownResult = asyncResult as ShutdownAsyncResult;
-                       if (shutdownResult == null)
-                               throw new ArgumentException (SR.GetString (SR.net_io_async_result, asyncResult.GetType ().FullName), "asyncResult");
-
-                       if (shutdownResult.SentShutdown)
-                               SecureStream.EndShutdown (shutdownResult);
-               }
-
-               internal IAsyncResult BeginRenegotiate (AsyncCallback asyncCallback, object asyncState)
-               {
-                       var lazyResult = new LazyAsyncResult (this, asyncState, asyncCallback);
-
-                       if (Interlocked.Exchange (ref _NestedAuth, 1) == 1)
-                               throw new InvalidOperationException (SR.GetString (SR.net_io_invalidnestedcall, "BeginRenegotiate", "renegotiate"));
-                       if (Interlocked.CompareExchange (ref _PendingReHandshake, 1, 0) == 1)
-                               throw new InvalidOperationException (SR.GetString (SR.net_io_invalidnestedcall, "BeginRenegotiate", "renegotiate"));
-
-                       try {
-                               CheckThrow (false);
-                               SecureStream.BeginRenegotiate (lazyResult);
-                               return lazyResult;
-                       } catch (Exception e) {
-                               _NestedAuth = 0;
-                               if (e is IOException)
-                                       throw;
-                               throw new IOException (SR.GetString (SR.mono_net_io_renegotiate), e);
-                       }
-               }
-
-               internal void EndRenegotiate (IAsyncResult result)
-               {
-                       if (result == null)
-                               throw new ArgumentNullException ("asyncResult");
-
-                       LazyAsyncResult lazyResult = result as LazyAsyncResult;
-                       if (lazyResult == null)
-                               throw new ArgumentException (SR.GetString (SR.net_io_async_result, result.GetType ().FullName), "asyncResult");
-
-                       if (Interlocked.Exchange (ref _NestedAuth, 0) == 0)
-                               throw new InvalidOperationException (SR.GetString (SR.net_io_invalidendcall, "EndRenegotiate"));
-
-                       SecureStream.EndRenegotiate (lazyResult);
-               }
-
-               internal bool CheckEnqueueHandshakeWrite (byte[] buffer, AsyncProtocolRequest asyncRequest)
-               {
-                       return CheckEnqueueHandshake (buffer, asyncRequest);
-               }
-
-               internal void StartReHandshake (AsyncProtocolRequest asyncRequest)
-               {
-                       if (IsServer) {
-                               byte[] buffer = null;
-                               if (CheckEnqueueHandshakeRead (ref buffer, asyncRequest))
-                                       return;
-
-                               StartReceiveBlob (buffer, asyncRequest);
-                               return;
-                       }
-
-                       ForceAuthentication (false, null, asyncRequest);
-               }
-
-               class ShutdownAsyncResult : LazyAsyncResult
-               {
-                       public bool SentShutdown;
-
-                       internal ShutdownAsyncResult (SslState instance, object userState, AsyncCallback callback)
-                               : base (instance, userState, callback)
-                       {
-                       }
-               }
-       }
-}
-#endif
diff --git a/mcs/class/System/ReferenceSources/_SslStream.cs b/mcs/class/System/ReferenceSources/_SslStream.cs
deleted file mode 100644 (file)
index 591b74a..0000000
+++ /dev/null
@@ -1,230 +0,0 @@
-//
-// Mono-specific additions to Microsoft's _SslStream.cs
-//
-#if MONO_FEATURE_NEW_TLS && SECURITY_DEP
-namespace System.Net.Security
-{
-       using System.IO;
-       using System.Threading;
-       using System.Net.Sockets;
-
-       partial class _SslStream
-       {
-               static readonly AsyncCallback _HandshakeWriteCallback = new AsyncCallback (HandshakeWriteCallback);
-               static readonly HandshakeProtocolCallback _ResumeHandshakeWriteCallback = new HandshakeProtocolCallback (ResumeHandshakeWriteCallback);
-
-               internal void BeginShutdown (LazyAsyncResult lazyResult)
-               {
-                       HandshakeProtocolRequest asyncRequest = new HandshakeProtocolRequest (lazyResult);
-
-                       if (Interlocked.Exchange (ref _NestedWrite, 1) == 1)
-                               throw new NotSupportedException (SR.GetString (SR.net_io_invalidnestedcall, (asyncRequest != null ? "BeginShutdown" : "Shutdown"), "shutdown"));
-
-                       bool failed = false;
-                       try
-                       {
-                               ProtocolToken message = _SslState.CreateShutdownMessage ();
-                               asyncRequest.SetNextRequest (HandshakeProtocolState.Shutdown, message, _ResumeHandshakeWriteCallback);
-
-                               StartHandshakeWrite (asyncRequest);
-                       } catch (Exception e) {
-                               _SslState.FinishWrite ();
-                               failed = true;
-                               throw;
-                       } finally {
-                               if (failed)
-                                       _NestedWrite = 0;
-                       }
-               }
-
-               internal void EndShutdown (LazyAsyncResult lazyResult)
-               {
-                       if (Interlocked.Exchange (ref _NestedWrite, 0) == 0)
-                               throw new InvalidOperationException (SR.GetString (SR.net_io_invalidendcall, "EndShutdown"));
-
-                       // No "artificial" timeouts implemented so far, InnerStream controls timeout.
-                       lazyResult.InternalWaitForCompletion ();
-
-                       if (lazyResult.Result is Exception) {
-                               if (lazyResult.Result is IOException)
-                                       throw (Exception)lazyResult.Result;
-                               throw new IOException (SR.GetString (SR.mono_net_io_shutdown), (Exception)lazyResult.Result);
-                       }
-               }
-
-               internal void BeginRenegotiate (LazyAsyncResult lazyResult)
-               {
-                       HandshakeProtocolRequest asyncRequest = new HandshakeProtocolRequest (lazyResult);
-
-                       if (Interlocked.Exchange (ref _NestedWrite, 1) == 1)
-                               throw new NotSupportedException (SR.GetString (SR.net_io_invalidnestedcall, (asyncRequest != null ? "BeginRenegotiate" : "Renegotiate"), "renegotiate"));
-
-                       bool failed = false;
-                       try
-                       {
-                               if (_SslState.IsServer) {
-                                       ProtocolToken message = _SslState.CreateHelloRequestMessage ();
-                                       asyncRequest.SetNextRequest (HandshakeProtocolState.SendHelloRequest, message, _ResumeHandshakeWriteCallback);
-                               } else {
-                                       asyncRequest.SetNextRequest (HandshakeProtocolState.ClientRenegotiation, null, _ResumeHandshakeWriteCallback);
-                               }
-
-                               StartHandshakeWrite (asyncRequest);
-                       } catch (Exception e) {
-                               _SslState.FinishWrite ();
-                               failed = true;
-                               throw;
-                       } finally {
-                               if (failed)
-                                       _NestedWrite = 0;
-                       }
-               }
-
-               internal void EndRenegotiate (LazyAsyncResult lazyResult)
-               {
-                       if (Interlocked.Exchange (ref _NestedWrite, 0) == 0)
-                               throw new InvalidOperationException (SR.GetString (SR.net_io_invalidendcall, "EndRenegotiate"));
-
-                       // No "artificial" timeouts implemented so far, InnerStream controls timeout.
-                       lazyResult.InternalWaitForCompletion();
-
-                       if (lazyResult.Result is Exception) {
-                               if (lazyResult.Result is IOException)
-                                       throw (Exception)lazyResult.Result;
-                               throw new IOException (SR.GetString (SR.mono_net_io_renegotiate), (Exception)lazyResult.Result);
-                       }
-               }
-
-               void StartHandshakeWrite (HandshakeProtocolRequest asyncRequest)
-               {
-                       byte[] buffer = null;
-                       if (asyncRequest.Message != null) {
-                               buffer = asyncRequest.Message.Payload;
-                               if (buffer.Length != asyncRequest.Message.Size) {
-                                       buffer = new byte [asyncRequest.Message.Size];
-                                       Buffer.BlockCopy (asyncRequest.Message.Payload, 0, buffer, 0, buffer.Length);
-                               }
-                       }
-
-                       switch (asyncRequest.State) {
-                       case HandshakeProtocolState.ClientRenegotiation:
-                       case HandshakeProtocolState.ServerRenegotiation:
-                               _SslState.StartReHandshake (asyncRequest);
-                               return;
-
-                       case HandshakeProtocolState.SendHelloRequest:
-                               if (_SslState.CheckEnqueueHandshakeWrite (buffer, asyncRequest)) {
-                                       // operation is async and has been queued, return.
-                                       return;
-                               }
-                               break;
-
-                       case HandshakeProtocolState.Shutdown:
-                               if (_SslState.CheckEnqueueWrite (asyncRequest)) {
-                                       // operation is async and has been queued, return.
-                                       return;
-                               }
-                               break;
-
-                       default:
-                               throw new InvalidOperationException ();
-                       }
-
-                       if (_SslState.LastPayload != null)
-                               throw new InvalidOperationException ();
-
-                       // prepare for the next request
-                       IAsyncResult ar = ((NetworkStream)_SslState.InnerStream).BeginWrite (buffer, 0, buffer.Length, _HandshakeWriteCallback, asyncRequest);
-                       if (!ar.CompletedSynchronously)
-                               return;
-
-                       HandshakeWriteCallback (asyncRequest, ar);
-               }
-
-               static void HandshakeWriteCallback (IAsyncResult transportResult)
-               {
-                       if (transportResult.CompletedSynchronously)
-                               return;
-
-                       HandshakeProtocolRequest asyncRequest = (HandshakeProtocolRequest)transportResult.AsyncState;
-
-                       SslState sslState = (SslState)asyncRequest.AsyncObject;
-                       sslState.SecureStream.HandshakeWriteCallback (asyncRequest, transportResult);
-               }
-
-               void HandshakeWriteCallback (HandshakeProtocolRequest asyncRequest, IAsyncResult transportResult)
-               {
-                       try {
-                               _SslState.InnerStream.EndWrite (transportResult);
-                       } catch (Exception e) {
-                               _SslState.FinishWrite ();
-                               if (!asyncRequest.IsUserCompleted) {
-                                       asyncRequest.CompleteWithError (e);
-                                       return;
-                               }
-                               throw;
-                       }
-
-                       if (asyncRequest.State == HandshakeProtocolState.SendHelloRequest) {
-                               asyncRequest.SetNextRequest (HandshakeProtocolState.ServerRenegotiation, null, _ResumeHandshakeWriteCallback);
-                               StartHandshakeWrite (asyncRequest);
-                               return;
-                       }
-
-                       try {
-                               _SslState.FinishWrite ();
-                               asyncRequest.CompleteUser ();
-                       } catch (Exception e) {
-                               if (!asyncRequest.IsUserCompleted) {
-                                       asyncRequest.CompleteWithError (e);
-                                       return;
-                               }
-                               throw;
-                       }
-               }
-
-               static void ResumeHandshakeWriteCallback (HandshakeProtocolRequest asyncRequest)
-               {
-                       try {
-                               ((_SslStream)asyncRequest.AsyncObject).StartHandshakeWrite (asyncRequest);
-                       } catch (Exception e) {
-                               if (asyncRequest.IsUserCompleted) {
-                                       // This will throw on a worker thread.
-                                       throw;
-                               }
-                               ((_SslStream)asyncRequest.AsyncObject)._SslState.FinishWrite ();
-                               asyncRequest.CompleteWithError (e);
-                       }
-               }
-
-               delegate void HandshakeProtocolCallback (HandshakeProtocolRequest asyncRequest);
-
-               enum HandshakeProtocolState {
-                       None,
-                       Shutdown,
-                       SendHelloRequest,
-                       ServerRenegotiation,
-                       ClientRenegotiation
-               }
-
-               class HandshakeProtocolRequest : AsyncProtocolRequest
-               {
-                       public ProtocolToken Message;
-                       public HandshakeProtocolState State;
-
-                       public HandshakeProtocolRequest (LazyAsyncResult userAsyncResult)
-                               : base (userAsyncResult)
-                       {
-                               State = HandshakeProtocolState.None;
-                       }
-
-                       public void SetNextRequest (HandshakeProtocolState state, ProtocolToken message, HandshakeProtocolCallback callback)
-                       {
-                               State = state;
-                               Message = message;
-                               SetNextRequest (null, 0, 0, (r) => callback ((HandshakeProtocolRequest)r));
-                       }
-               }
-       }
-}
-#endif
index e748039ef2bb842653822fea1bbc110e9e04ed75..eae64de07b8d7281931d2d9f0adec20318741f6e 100644 (file)
     <Compile Include="Mono.Net.Security\MonoTlsStream.cs" />\r
     <Compile Include="Mono.Net.Security\NoReflectionHelper.cs" />\r
     <Compile Include="Mono.Net.Security\SystemCertificateValidator.cs" />\r
-    <Compile Include="ReferenceSources\_SecureChannel.cs" />\r
-    <Compile Include="ReferenceSources\_SslState.cs" />\r
-    <Compile Include="ReferenceSources\_SslStream.cs" />\r
     <Compile Include="ReferenceSources\AssertWrapper.cs" />\r
     <Compile Include="ReferenceSources\AutoWebProxyScriptEngine.cs" />\r
     <Compile Include="ReferenceSources\BinaryCompatibility.cs" />\r
     <Compile Include="ReferenceSources\EnvironmentHelpers.cs" />\r
     <Compile Include="ReferenceSources\HttpApi.cs" />\r
     <Compile Include="ReferenceSources\HttpSysSettings.cs" />\r
-    <Compile Include="ReferenceSources\Internal.cs" />\r
     <Compile Include="ReferenceSources\Logging.cs" />\r
     <Compile Include="ReferenceSources\NativeMethods.cs" />\r
     <Compile Include="ReferenceSources\RequestCacheProtocol.cs" />\r
     <Compile Include="ReferenceSources\SR.cs" />\r
     <Compile Include="ReferenceSources\SR2.cs" />\r
     <Compile Include="ReferenceSources\SRCategoryAttribute.cs" />\r
-    <Compile Include="ReferenceSources\SslStream.cs" />\r
-    <Compile Include="ReferenceSources\SSPIConfiguration.cs" />\r
-    <Compile Include="ReferenceSources\SSPISafeHandles.cs" />\r
-    <Compile Include="ReferenceSources\SSPIWrapper.cs" />\r
     <Compile Include="ReferenceSources\Win32Exception.cs" />\r
     <Compile Include="System.CodeDom.Compiler\CodeCompiler.cs" />\r
     <Compile Include="System.CodeDom.Compiler\CodeDomConfigurationHandler.cs" />\r
index fbd51bbfd99f4a6fd2f5a0ffd49d191a29b2e70d..07dfdfa6fb3f05df163c9b8c046e7cf6b197215a 100644 (file)
     <Compile Include="Mono.Net.Security\MonoTlsStream.cs" />\r
     <Compile Include="Mono.Net.Security\NoReflectionHelper.cs" />\r
     <Compile Include="Mono.Net.Security\SystemCertificateValidator.cs" />\r
-    <Compile Include="ReferenceSources\_SecureChannel.cs" />\r
-    <Compile Include="ReferenceSources\_SslState.cs" />\r
-    <Compile Include="ReferenceSources\_SslStream.cs" />\r
     <Compile Include="ReferenceSources\AssertWrapper.cs" />\r
     <Compile Include="ReferenceSources\AutoWebProxyScriptEngine.cs" />\r
     <Compile Include="ReferenceSources\BinaryCompatibility.cs" />\r
     <Compile Include="ReferenceSources\EnvironmentHelpers.cs" />\r
     <Compile Include="ReferenceSources\HttpApi.cs" />\r
     <Compile Include="ReferenceSources\HttpSysSettings.cs" />\r
-    <Compile Include="ReferenceSources\Internal.cs" />\r
     <Compile Include="ReferenceSources\Logging.cs" />\r
     <Compile Include="ReferenceSources\NativeMethods.cs" />\r
     <Compile Include="ReferenceSources\RequestCacheProtocol.cs" />\r
     <Compile Include="ReferenceSources\SR.cs" />\r
     <Compile Include="ReferenceSources\SR2.cs" />\r
     <Compile Include="ReferenceSources\SRCategoryAttribute.cs" />\r
-    <Compile Include="ReferenceSources\SslStream.cs" />\r
-    <Compile Include="ReferenceSources\SSPIConfiguration.cs" />\r
-    <Compile Include="ReferenceSources\SSPISafeHandles.cs" />\r
-    <Compile Include="ReferenceSources\SSPIWrapper.cs" />\r
     <Compile Include="ReferenceSources\Win32Exception.cs" />\r
     <Compile Include="System.CodeDom.Compiler\CodeCompiler.cs" />\r
     <Compile Include="System.CodeDom.Compiler\CodeDomConfigurationHandler.cs" />\r
index 2b39ff8311c427735dc99ddcab36b62839b8590b..e07ff90804ecae13d0afac89c5e9a2082d280110 100644 (file)
@@ -39,8 +39,6 @@ namespace System.Net.NetworkInformation {
        {
                public static readonly Win32IPAddressCollection Empty = new Win32IPAddressCollection (IntPtr.Zero);
 
-               bool is_readonly;
-
                // for static methods
                Win32IPAddressCollection ()
                {
@@ -50,7 +48,6 @@ namespace System.Net.NetworkInformation {
                {
                        foreach (IntPtr head in heads)
                                AddSubsequentlyString (head);
-                       is_readonly = true;
                }
 
                public Win32IPAddressCollection (params Win32_IP_ADDR_STRING [] al)
@@ -58,10 +55,9 @@ namespace System.Net.NetworkInformation {
                        foreach (Win32_IP_ADDR_STRING a in al) {
                                if (String.IsNullOrEmpty (a.IpAddress))
                                        continue;
-                               Add (IPAddress.Parse (a.IpAddress));
+                               InternalAdd (IPAddress.Parse (a.IpAddress));
                                AddSubsequentlyString (a.Next);
                        }
-                       is_readonly = true;
                }
 
                public static Win32IPAddressCollection FromAnycast (IntPtr ptr)
@@ -70,9 +66,8 @@ namespace System.Net.NetworkInformation {
                        Win32_IP_ADAPTER_ANYCAST_ADDRESS a;
                        for (IntPtr p = ptr; p != IntPtr.Zero; p = a.Next) {
                                a = (Win32_IP_ADAPTER_ANYCAST_ADDRESS) Marshal.PtrToStructure (p, typeof (Win32_IP_ADAPTER_ANYCAST_ADDRESS));
-                               c.Add (a.Address.GetIPAddress ());
+                               c.InternalAdd (a.Address.GetIPAddress ());
                        }
-                       c.is_readonly = true;
                        return c;
                }
 
@@ -84,9 +79,8 @@ namespace System.Net.NetworkInformation {
                                a = (Win32_IP_ADAPTER_DNS_SERVER_ADDRESS) Marshal.PtrToStructure (p, typeof (Win32_IP_ADAPTER_DNS_SERVER_ADDRESS));
 // FIXME: It somehow fails here. Looks like there is something wrong.
 //if (a.Address.Sockaddr == IntPtr.Zero) throw new Exception ("pointer " + p + " a.length " + a.Address.SockaddrLength);
-                               c.Add (a.Address.GetIPAddress ());
+                               c.InternalAdd (a.Address.GetIPAddress ());
                        }
-                       c.is_readonly = true;
                        return c;
                }
 
@@ -95,13 +89,9 @@ namespace System.Net.NetworkInformation {
                        Win32_IP_ADDR_STRING a;
                        for (IntPtr p = head; p != IntPtr.Zero; p = a.Next) {
                                a = (Win32_IP_ADDR_STRING) Marshal.PtrToStructure (p, typeof (Win32_IP_ADDR_STRING));
-                               Add (IPAddress.Parse (a.IpAddress));
+                               InternalAdd (IPAddress.Parse (a.IpAddress));
                        }
                }
-
-               public override bool IsReadOnly {
-                       get { return is_readonly; }
-               }
        }
 #endif
 }
index ece698af2b45ee2714a2c52e822ce4a09c90083d..d1bf2e763b08f02eb55c7bd576b58c423bbacf9d 100644 (file)
@@ -438,9 +438,14 @@ namespace System.Net.NetworkInformation {
 #if !MOBILE
                class Win32NetworkInterfaceAPI : NetworkInterfaceFactory
                {
-                       [DllImport ("iphlpapi.dll", SetLastError = true)]
+                       private const string IPHLPAPI = "iphlpapi.dll";
+
+                       [DllImport (IPHLPAPI, SetLastError = true)]
                        static extern int GetAdaptersAddresses (uint family, uint flags, IntPtr reserved, byte [] info, ref int size);
 
+                       [DllImport (IPHLPAPI)]
+                       static extern uint GetBestInterfaceEx (byte[] ipAddress, out int index);
+
                        unsafe static Win32_IP_ADAPTER_ADDRESSES [] GetAdaptersAddresses ()
                        {
                                byte [] bytes = null;
@@ -473,9 +478,20 @@ namespace System.Net.NetworkInformation {
                                return ret;
                        }
 
+                       private static int GetBestInterfaceForAddress (IPAddress addr) {
+                               int index;
+                               SocketAddress address = new SocketAddress (addr);
+                               int error = (int) GetBestInterfaceEx (address.m_Buffer, out index);
+                               if (error != 0) {
+                                       throw new NetworkInformationException (error);
+                               }
+
+                               return index;
+                       }
+
                        public override int GetLoopbackInterfaceIndex ()
                        {
-                               throw new NotImplementedException ();
+                               return GetBestInterfaceForAddress (IPAddress.Loopback);
                        }
 
                        public override IPAddress GetNetMask (IPAddress address)
index 3a204f1cfd70f7e15855dec50a6d73d875a128ea..92e3b3e84c0c38b65ed9cb2625ec93b911860d86 100644 (file)
@@ -563,7 +563,6 @@ ReferenceSources/BinaryCompatibility.cs
 ReferenceSources/ConfigurationManagerInternalFactory.cs
 ReferenceSources/CAPI.cs
 ReferenceSources/EnvironmentHelpers.cs
-ReferenceSources/Internal.cs
 ReferenceSources/HttpApi.cs
 ReferenceSources/HttpSysSettings.cs
 ReferenceSources/LocalAppContextSwitches.cs
@@ -577,14 +576,6 @@ ReferenceSources/SR2.cs
 ReferenceSources/SRCategoryAttribute.cs
 ReferenceSources/Win32Exception.cs
 
-ReferenceSources/SSPIConfiguration.cs
-ReferenceSources/SSPISafeHandles.cs
-ReferenceSources/SSPIWrapper.cs
-ReferenceSources/SslStream.cs
-ReferenceSources/_SecureChannel.cs
-ReferenceSources/_SslState.cs
-ReferenceSources/_SslStream.cs
-
 ../referencesource/System/misc/PrivilegedConfigurationManager.cs
 ../referencesource/System/regex/system/text/regularexpressions/Regex.cs
 ../referencesource/System/regex/system/text/regularexpressions/RegexBoyerMoore.cs
index 7fe74638571ee72021ae1421ccbd981111299a5d..51752302b206e18dfc35f35ec0c21011494c8bb0 100644 (file)
@@ -113,6 +113,9 @@ namespace MonoTests.System.Net.NetworkInformation
                [Test]
                public void DnsEnabled ()
                {
+                       if (Environment.OSVersion.Platform == PlatformID.Win32NT)
+                               Assert.Ignore ("IsDnsEnabled is not nessasarily enabled for all interfaces on windows.");
+
                        NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces ();
                        foreach (NetworkInterface adapter in adapters)
                        {
index dd86f5c10a384dc8486a1575ebbba7db48928669..d246173c20400c0b9202d7e5da51a3a7b685ad74 100644 (file)
@@ -308,7 +308,6 @@ ReferenceSources/AssertWrapper.cs
 ReferenceSources/CAPI.cs
 ReferenceSources/EnvironmentHelpers.cs
 ReferenceSources/HttpApi.cs
-ReferenceSources/Internal.cs
 ReferenceSources/LocalAppContextSwitches.cs
 ReferenceSources/HttpSysSettings.cs
 ReferenceSources/Logging.cs
index 75828e154eb12f2fc6f7c21db9258888f7cd3c33..d315128745d2cf9d351027e6d2ace24674ff0a7c 100644 (file)
@@ -94,5 +94,4 @@ using System.Runtime.InteropServices;
 [assembly: InternalsVisibleTo ("Xamarin.Mac, PublicKey=0024000004800000940000000602000000240000525341310004000011000000438ac2a5acfbf16cbd2b2b47a62762f273df9cb2795ceccdf77d10bf508e69e7a362ea7a45455bbf3ac955e1f2e2814f144e5d817efc4c6502cc012df310783348304e3ae38573c6d658c234025821fda87a0be8a0d504df564e2c93b2b878925f42503e9d54dfef9f9586d9e6f38a305769587b1de01f6c0410328b2c9733db")]
 #endif
 
-[assembly: InternalsVisibleTo ("Xamarin.BoringTls, PublicKey=002400000480000094000000060200000024000052534131000400001100000099dd12eda85767ae6f06023ee28e711c7e5a212462095c83868c29db75eddf6d8e296e03824c14fedd5f55553fed0b6173be3cc985a4b7f9fb7c83ccff8ba3938563b3d1f45a81122f12a1bcb73edcaad61a8456c7595a6da5184b4dd9d10f011b949ef1391fccfeab1ba62aa51c267ef8bd57ef1b6ba5a4c515d0badb81a78f")]
 [assembly: Guid ("BED7F4EA-1A96-11D2-8F08-00A0C9A6186D")]
diff --git a/mcs/class/corlib/Test/System/GCTest.cs b/mcs/class/corlib/Test/System/GCTest.cs
new file mode 100644 (file)
index 0000000..6ce65b4
--- /dev/null
@@ -0,0 +1,72 @@
+//
+// GCTest.cs - NUnit Test Cases for GC
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Threading.Tasks;
+
+using NUnit.Framework;
+
+namespace MonoTests.System {
+
+       [TestFixture]
+       public class GCTest {
+
+               class MyFinalizeObject
+               {
+                       public volatile static int finalized;
+
+                       ~MyFinalizeObject ()
+                       {
+                               if (finalized++ == 0) {
+                                       GC.ReRegisterForFinalize (this);
+                               }
+                       }
+               }
+
+               static void Run_ReRegisterForFinalizeTest ()
+               {
+                       var m = new WeakReference<MyFinalizeObject> (new MyFinalizeObject ());
+                       m.SetTarget (null);
+               }
+
+               [Test]
+               public void ReRegisterForFinalizeTest ()
+               {
+                       Run_ReRegisterForFinalizeTest ();
+                       var t = Task.Factory.StartNew (() => {
+                               do {
+                                       GC.Collect ();
+                                       GC.WaitForPendingFinalizers ();
+                                       Task.Yield ();
+                               } while (MyFinalizeObject.finalized != 2);
+                       });
+
+                       Assert.IsTrue (t.Wait (5000));
+               }
+       }
+}
\ No newline at end of file
index bfa344cf598ae671dca5b6e25920aebe05be733e..bc43d92b9202a4dd44bdfb2a61ad24b4f04e4e2a 100644 (file)
@@ -22,6 +22,7 @@ System/CharCategoryTest.cs
 System/CharEnumeratorTest.cs
 System/CharTest.cs
 System/DelegateTest.cs
+System/GCTest.cs
 System/ModuleHandleTest.cs
 System/NullableTest.cs
 System/ObsoleteAttributeTest.cs
index 7636c2b204f4e6ed8cfc300f30bbe2ccca2e6268..a755892f40980f7ea540c794292a897cac3770c2 100644 (file)
@@ -1155,11 +1155,14 @@ namespace CorCompare
                                string direction = first && HasExtensionParameter ? "this" : "in";
                                first = false;
 
-                               if (parameter.ParameterType is ByReferenceType)
+                               var pt = parameter.ParameterType;
+                               var brt = pt as ByReferenceType;
+                               if (brt != null) {
                                        direction = parameter.IsOut ? "out" : "ref";
+                                       pt = brt.ElementType;
+                               }
 
-                               TypeReference t = parameter.ParameterType;
-                               AddAttribute ("type", Utils.CleanupTypeName (t));
+                               AddAttribute ("type", Utils.CleanupTypeName (pt));
 
                                if (parameter.IsOptional) {
                                        AddAttribute ("optional", "true");
@@ -1538,13 +1541,15 @@ namespace CorCompare
 
                                ParameterDefinition info = infos [i];
 
-                               if (info.ParameterType.IsByReference) {
-                                       string modifier;
-                                       if ((info.Attributes & (ParameterAttributes.Out | ParameterAttributes.In)) == ParameterAttributes.Out)
-                                               modifier = "out";
-                                       else
-                                               modifier = "ref";
+                               string modifier;
+                               if ((info.Attributes & ParameterAttributes.In) != 0)
+                                       modifier = string.Empty;
+                               else if ((info.Attributes & ParameterAttributes.Out) != 0 && info.ParameterType.IsByReference)
+                                       modifier = "out";
+                               else
+                                       modifier = string.Empty;
 
+                               if (modifier.Length > 0) {
                                        signature.Append (modifier);
                                        signature.Append (" ");
                                }
index ef681913e28e9d6fb4edd83d9f970e2b5748803a..cc891536b8af26f751fb8fa1aebc08c5a5a42487 100755 (executable)
@@ -23,7 +23,6 @@ using System.Runtime.InteropServices;
 using System.Text;
 using IKVM.Reflection;
 using System.Linq;
-using System.Diagnostics;
 using System.Net;
 using System.Threading.Tasks;
 
@@ -31,6 +30,7 @@ class MakeBundle {
        static string output = "a.out";
        static string object_out = null;
        static List<string> link_paths = new List<string> ();
+       static Dictionary<string,string> libraries = new Dictionary<string,string> ();
        static bool autodeps = false;
        static bool keeptemp = false;
        static bool compile_only = false;
@@ -126,6 +126,33 @@ class MakeBundle {
                                cross_target = args [++i];
                                break;
 
+                       case "--library":
+                               if (i+1 == top){
+                                       Help (); 
+                                       return 1;
+                               }
+                               if (custom_mode){
+                                       Console.Error.WriteLine ("--library can only be used with --simple/--runtime/--cross mode");
+                                       Help ();
+                                       return 1;
+                               }
+                               var lspec = args [++i];
+                               var p = lspec.IndexOf (",");
+                               string alias, path;
+                               if (p == -1){
+                                       alias = Path.GetFileName (lspec);
+                                       path = lspec;
+                               } else {
+                                       alias = lspec.Substring (0, p);
+                                       path = lspec.Substring (p+1);
+                               }
+                               if (!File.Exists (path)){
+                                       Console.Error.WriteLine ($"The specified library file {path} does not exist");
+                                       return 1;
+                               }
+                               libraries [alias] = path;
+                               break;
+
                        case "--fetch-target":
                                if (i+1 == top){
                                        Help (); 
@@ -289,7 +316,7 @@ class MakeBundle {
                                        return 1;
                                }
                                var env = args [++i];
-                               var p = env.IndexOf ('=');
+                               p = env.IndexOf ('=');
                                if (p == -1)
                                        environment.Add (env, "");
                                else
@@ -602,6 +629,11 @@ class MakeBundle {
                        foreach (var key in environment.Keys)
                                maker.AddStringPair ("env:" + key, key, environment [key]);
                }
+               if (libraries.Count > 0){
+                       foreach (var alias_and_path in libraries){
+                               maker.Add ("library:" + alias_and_path.Key, alias_and_path.Value);
+                       }
+               }
                maker.Dump ();
                maker.Close ();
                return true;
@@ -854,7 +886,7 @@ void          mono_register_config_for_assembly (const char* assembly_name, cons
                                string monoPath = GetEnv("MONOPREFIX", @"C:\Program Files (x86)\Mono");
 
                                string[] includes = new string[] {winsdkPath + @"\Include\um", winsdkPath + @"\Include\shared", vsPath + @"\include", monoPath + @"\include\mono-2.0", "." };
-                               string[] libs = new string[] { winsdkPath + @"\Lib\winv6.3\um\x86" , vsPath + @"\lib" };
+                               // string[] libs = new string[] { winsdkPath + @"\Lib\winv6.3\um\x86" , vsPath + @"\lib" };
                                var linkLibraries = new string[] {  "kernel32.lib",
                                                                                                "version.lib",
                                                                                                "Ws2_32.lib",
@@ -1120,40 +1152,42 @@ void          mono_register_config_for_assembly (const char* assembly_name, cons
        {
                Console.WriteLine ("Usage is: mkbundle [options] assembly1 [assembly2...]\n\n" +
                                   "Options:\n" +
-                                  "    --config F          Bundle system config file `F'\n" +
-                                  "    --config-dir D      Set MONO_CFG_DIR to `D'\n" +
-                                  "    --deps              Turns on automatic dependency embedding (default on simple)\n" +
-                                  "    -L path             Adds `path' to the search path for assemblies\n" +
-                                  "    --machine-config F  Use the given file as the machine.config for the application.\n" +
-                                  "    -o out              Specifies output filename\n" +
-                                  "    --nodeps            Turns off automatic dependency embedding (default on custom)\n" +
-                                  "    --skip-scan         Skip scanning assemblies that could not be loaded (but still embed them).\n" +
-                                  "    --i18n ENCODING     none, all or comma separated list of CJK, MidWest, Other, Rare, West.\n" +
-                                  "    -v                  Verbose output\n" + 
+                                  "    --config F           Bundle system config file `F'\n" +
+                                  "    --config-dir D       Set MONO_CFG_DIR to `D'\n" +
+                                  "    --deps               Turns on automatic dependency embedding (default on simple)\n" +
+                                  "    -L path              Adds `path' to the search path for assemblies\n" +
+                                  "    --machine-config F   Use the given file as the machine.config for the application.\n" +
+                                  "    -o out               Specifies output filename\n" +
+                                  "    --nodeps             Turns off automatic dependency embedding (default on custom)\n" +
+                                  "    --skip-scan          Skip scanning assemblies that could not be loaded (but still embed them).\n" +
+                                  "    --i18n ENCODING      none, all or comma separated list of CJK, MidWest, Other, Rare, West.\n" +
+                                  "    -v                   Verbose output\n" + 
                                   "\n" + 
                                   "--simple   Simple mode does not require a C toolchain and can cross compile\n" + 
-                                  "    --cross TARGET      Generates a binary for the given TARGET\n"+
-                                  "    --local-targets     Lists locally available targets\n" +
-                                  "    --list-targets      Lists available targets on the remote server\n" +
-                                  "    --options OPTIONS   Embed the specified Mono command line options on target\n" +
-                                  "    --runtime RUNTIME   Manually specifies the Mono runtime to use\n" +
-                                  "    --target-server URL Specified a server to download targets from, default is " + target_server + "\n" +
-                                  "    --env KEY=VALUE     Hardcodes an environment variable for the target\n" +
+                                  "    --cross TARGET       Generates a binary for the given TARGET\n"+
+                                  "    --env KEY=VALUE      Hardcodes an environment variable for the target\n" +
+                                  "    --library [LIB,]PATH Bundles the specified dynamic library to be used at runtime\n" +
+                                  "                         LIB is optional shortname for file located at PATH\n" + 
+                                  "    --list-targets       Lists available targets on the remote server\n" +
+                                  "    --local-targets      Lists locally available targets\n" +
+                                  "    --options OPTIONS    Embed the specified Mono command line options on target\n" +
+                                  "    --runtime RUNTIME    Manually specifies the Mono runtime to use\n" +
+                                  "    --target-server URL  Specified a server to download targets from, default is " + target_server + "\n" +
                                   "\n" +
                                   "--custom   Builds a custom launcher, options for --custom\n" +
-                                  "    -c                  Produce stub only, do not compile\n" +
-                                  "    -oo obj             Specifies output filename for helper object file\n" +
+                                  "    -c                   Produce stub only, do not compile\n" +
+                                  "    -oo obj              Specifies output filename for helper object file\n" +
                                   "    --dos2unix[=true|false]\n" +
-                                  "                        When no value provided, or when `true` specified\n" +
-                                  "                        `dos2unix` will be invoked to convert paths on Windows.\n" +
-                                  "                        When `--dos2unix=false` used, dos2unix is NEVER used.\n" +
-                                  "    --keeptemp          Keeps the temporary files\n" +
-                                  "    --static            Statically link to mono libs\n" +
-                                  "    --nomain            Don't include a main() function, for libraries\n" +
-                                  "    --custom-main C     Link the specified compilation unit (.c or .obj) with entry point/init code\n" +
-                                  "    -z                  Compress the assemblies before embedding.\n" +
-                                  "    --static-ctor ctor  Add a constructor call to the supplied function.\n" +
-                                  "                        You need zlib development headers and libraries.\n");
+                                  "                         When no value provided, or when `true` specified\n" +
+                                  "                         `dos2unix` will be invoked to convert paths on Windows.\n" +
+                                  "                         When `--dos2unix=false` used, dos2unix is NEVER used.\n" +
+                                  "    --keeptemp           Keeps the temporary files\n" +
+                                  "    --static             Statically link to mono libs\n" +
+                                  "    --nomain             Don't include a main() function, for libraries\n" +
+                                  "    --custom-main C      Link the specified compilation unit (.c or .obj) with entry point/init code\n" +
+                                  "    -z                   Compress the assemblies before embedding.\n" +
+                                  "    --static-ctor ctor   Add a constructor call to the supplied function.\n" +
+                                  "                         You need zlib development headers and libraries.\n");
        }
 
        [DllImport ("libc")]
index 5e3516eb17dd36573356a6f895c9883e9386e45a..66e0d4ba8957498188f7aa19890bff97535238fb 100644 (file)
@@ -293,9 +293,9 @@ ICALL(GC_0b, "GetMaxGeneration", mono_gc_max_generation)
 ICALL(GC_1, "GetTotalMemory", ves_icall_System_GC_GetTotalMemory)
 ICALL(GC_2, "InternalCollect", ves_icall_System_GC_InternalCollect)
 ICALL(GC_3, "KeepAlive", ves_icall_System_GC_KeepAlive)
-ICALL(GC_4, "ReRegisterForFinalize", ves_icall_System_GC_ReRegisterForFinalize)
 ICALL(GC_4a, "RecordPressure", mono_gc_add_memory_pressure)
 ICALL(GC_6, "WaitForPendingFinalizers", ves_icall_System_GC_WaitForPendingFinalizers)
+ICALL(GC_6b, "_ReRegisterForFinalize", ves_icall_System_GC_ReRegisterForFinalize)
 ICALL(GC_7, "_SuppressFinalize", ves_icall_System_GC_SuppressFinalize)
 ICALL(GC_9, "get_ephemeron_tombstone", ves_icall_System_GC_get_ephemeron_tombstone)
 ICALL(GC_8, "register_ephemeron_array", ves_icall_System_GC_register_ephemeron_array)
index 64e7d06e56ffdded117edf0dc1ebf5233ba48bfa..70e371aa66eadc61ccab56a8fc0e7f17b847c786 100644 (file)
@@ -1123,6 +1123,14 @@ cached_module_load (const char *name, int flags, char **err)
        return res;
 }
 
+void
+mono_loader_register_module (const char *name, MonoDl *module)
+{
+       if (!global_module_map)
+               global_module_map = g_hash_table_new (g_str_hash, g_str_equal);
+       g_hash_table_insert (global_module_map, g_strdup (name), module);
+}
+
 static MonoDl *internal_module;
 
 static gboolean
index a2c6d349ddf15fcc186278750843b8289e4a6c96..6382c774ae3fd431d61f741df0456253a4847d44 100644 (file)
@@ -4,6 +4,7 @@
 #include <mono/metadata/metadata.h>
 #include <mono/metadata/image.h>
 #include <mono/utils/mono-error.h>
+#include <mono/utils/mono-dl.h>
 
 MONO_BEGIN_DECLS
 
@@ -63,6 +64,8 @@ mono_lookup_internal_call (MonoMethod *method);
 void*
 mono_lookup_internal_call_full (MonoMethod *method, mono_bool *uses_handles);
 
+void
+mono_loader_register_module (const char *name, MonoDl *module);
 
 MONO_API const char*
 mono_lookup_icall_symbol (MonoMethod *m);
index 8b78616129a9da8ed7a593fab28349e1143bd791..d78be35069def5fb17d4524afe7d82987cf4e250 100644 (file)
@@ -21,7 +21,7 @@ sgen_resume_thread (SgenThreadInfo *info)
 
        CloseHandle (handle);
 
-       return result != (DWORD)-1;
+       return result != (DWORD)-1 && result > 0;
 }
 
 gboolean
index 7aa562c591db78c8118002b5f80503112154414c..9bfbb44647b784d6b4181dab24f7666c35d4a123 100644 (file)
@@ -271,7 +271,7 @@ typedef struct {
 #define HEADER_LENGTH 11
 
 #define MAJOR_VERSION 2
-#define MINOR_VERSION 43
+#define MINOR_VERSION 44
 
 typedef enum {
        CMD_SET_VM = 1,
@@ -499,6 +499,7 @@ typedef enum {
        CMD_STACK_FRAME_GET_THIS = 2,
        CMD_STACK_FRAME_SET_VALUES = 3,
        CMD_STACK_FRAME_GET_DOMAIN = 4,
+       CMD_STACK_FRAME_SET_THIS = 5,
 } CmdStackFrame;
 
 typedef enum {
@@ -9269,6 +9270,25 @@ frame_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
                        buffer_add_domainid (buf, frame->domain);
                break;
        }
+       case CMD_STACK_FRAME_SET_THIS: {
+               guint8 *val_buf;
+               MonoType *t;
+               MonoDebugVarInfo *var;
+
+               t = &frame->actual_method->klass->byval_arg;
+               /* Checked by the sender */
+               g_assert (MONO_TYPE_ISSTRUCT (t));
+               var = jit->this_var;
+               g_assert (var);
+
+               val_buf = (guint8 *)g_alloca (mono_class_instance_size (mono_class_from_mono_type (t)));
+               err = decode_value (t, frame->domain, val_buf, p, &p, end);
+               if (err != ERR_NONE)
+                       return err;
+
+               set_var (&frame->actual_method->klass->this_arg, var, &frame->ctx, frame->domain, val_buf, frame->reg_locations, &tls->restore_state.ctx);
+               break;
+       }
        default:
                return ERR_NOT_IMPLEMENTED;
        }
@@ -9688,6 +9708,7 @@ static const char* stack_frame_cmds_str[] = {
        "GET_THIS",
        "SET_VALUES",
        "GET_DOMAIN",
+       "SET_THIS"
 };
 
 static const char* array_cmds_str[] = {
index 8d2f5bd17121d78ef98c4fba3c8e1f427d4b86da..6149ca75fa0996be2da5c08a5ed076fd8685a539 100644 (file)
@@ -1,8 +1,24 @@
+/*
+ * main.c: The main entry point for the mono executable
+ *
+ * The main entry point does a few things:
+ * 
+ *   * It probes whether the executable has a bundle appended
+ *     at the end, and if so, registers the various bundled
+ *     resources with Mono and executes the contained bundle
+ *
+ *   * Parses the MONO_ENV_OPTIONS variable to treat the
+ *     contents of the variable as command line arguments for
+ *     the mono runtime
+ *
+ *   * Launches Mono, by calling mono_main.
+ */
 #include <config.h>
 #include <fcntl.h>
 #include <mono/metadata/assembly.h>
 #include <mono/metadata/mono-config.h>
 #include <mono/utils/mono-mmap.h>
+#include <mono/utils/mono-dl.h>
 #include "mini.h"
 
 #ifdef HAVE_UNISTD_H
@@ -29,6 +45,51 @@ mono_main_with_options (int argc, char *argv [])
        return mono_main (argc, argv);
 }
 
+/*
+ * The Mono executable can initialize itself from a payload attached
+ * at the end of the main program.   The payload contains the
+ * main assembly, one or more managed assemblies, configuration
+ * files and other assets that are used instead of launching a
+ * program from the command line.
+ *
+ * The startup sequence probes for a magical signature at the end of
+ * the executable, if the 16 characters "xmonkeysloveplay" are found,
+ * the code expects the 64-bits just before it to contain an offset
+ * within the executable with a directory of assets.
+ *
+ * All pointers in the file format are encoded as little-endian values
+ *
+ * The format of the file is thus:
+ *
+ * Location        Content
+ * --------        -------
+ * lenght-16       Optional "xmonkeysloveplay", indicating that a
+ *                 bundled payload is contained in the executable.
+ * length-24       pointer to the directory in the file, address DIR
+ *
+ * DIR             32-bit value with the number of entries in the directory
+ * DIR+4           First directory entry.
+ *
+ * Each directory entry is made up of:
+ * 4-bytes         uint32_t containing the size of a string (STR)
+ * STRING          UTF8 encoded and \0 terminated string
+ * 8-bytes         uint64_t offset in the file with the payload associated with STRING
+ * 4-bytes         uint32_t size of the asset
+ *
+ * The following are the known directory entries, without the quotes:
+ * "assembly:NAME"  An assembly with the name NAME, assembly is in the payload
+ * "config:NAME"    A configuration file (usually file.dll.config) in the payload that is
+ *                  loaded as the config file for an assembly
+ * "systemconfig:"  Treats as a Mono system configuration, payload contains the config file.
+ * "options:"       The payload contains command line options to initialize Mono, as if you 
+                    had set them on MONO_ENV_OPTIONS
+ * "config_dir:DIR" Configures the MONO_PATH to point to point to DIR
+ * "machineconfig:" The payload contains the machine.config file to use at runtime
+ * "env:"           Sets the environment variable to the value encoded in the payload
+ *                  payload contains: 1-byte lenght for the \0 terminated variable,
+ *                  followed by the value.
+ * "library:NAME"   Bundled dynamic library NAME, payload contains the dynamic library
+ */
 #define STREAM_INT(x) GUINT32_TO_LE((*(uint32_t*)x))
 #define STREAM_LONG(x) GUINT64_TO_LE((*(uint64_t*)x))
 
@@ -64,6 +125,60 @@ load_from_region (int fd, uint64_t offset, uint64_t size)
        return buffer;
 }
 
+/* Did we initialize the temporary directory for dynamic libraries */
+static int bundle_save_library_initialized;
+
+/* List of bundled libraries we unpacked */
+static GSList *bundle_library_paths;
+
+/* Directory where we unpacked dynamic libraries */
+static char *bundled_dylibrary_directory;
+
+static void
+delete_bundled_libraries ()
+{
+       GSList *list;
+
+       for (list = bundle_library_paths; list != NULL; list = list->next){
+               unlink (list->data);
+       }
+       rmdir (bundled_dylibrary_directory);
+}
+
+static void
+bundle_save_library_initialize ()
+{
+       bundle_save_library_initialized = 1;
+       char *path = g_build_filename (g_get_tmp_dir (), "mono-bundle-XXXXXX");
+       bundled_dylibrary_directory = g_mkdtemp (path);
+       g_free (path);
+       if (bundled_dylibrary_directory == NULL)
+               return;
+       atexit (delete_bundled_libraries);
+}
+
+static void
+save_library (int fd, uint64_t offset, uint64_t size, const char *destfname)
+{
+       MonoDl *lib;
+       char *file, *buffer, *err;
+       if (!bundle_save_library_initialized)
+               bundle_save_library_initialize ();
+       
+       file = g_build_filename (bundled_dylibrary_directory, destfname);
+       buffer = load_from_region (fd, offset, size);
+       g_file_set_contents (file, buffer, size, NULL);
+       lib = mono_dl_open (file, MONO_DL_LAZY, &err);
+       if (err != NULL){
+               fprintf (stderr, "Error loading shared library: %s\n", file);
+               exit (1);
+       }
+       mono_loader_register_module (destfname, lib);
+       bundle_library_paths = g_slist_append (bundle_library_paths, file);
+       
+       g_free (buffer);
+}
+
 static gboolean
 probe_embedded (const char *program, int *ref_argc, char **ref_argv [])
 {
@@ -150,13 +265,15 @@ probe_embedded (const char *program, int *ref_argc, char **ref_argv [])
                        uint8_t count = *data++;
                        char *value = data + count + 1;
                        g_setenv (data, value, FALSE);
+               } else if (strncmp (kind, "library:", strlen ("library:")) == 0){
+                       save_library (fd, offset, item_size, kind + strlen ("library:"));
                } else {
                        fprintf (stderr, "Unknown stream on embedded package: %s\n", kind);
                        exit (1);
                }
        }
        g_array_append_val (assemblies, last);
-       
+
        mono_register_bundled_assemblies ((const MonoBundledAssembly **) assemblies->data);
        new_argv = g_new (char *, (*ref_argc)+1);
        for (j = 0; j < *ref_argc; j++)
index ae33b4a9f39336cb31f1c31f31d43ee7e4d497ed..f867960803ba46f7c81f828b8a4e56fc614fd382 100644 (file)
@@ -347,6 +347,13 @@ page_faults (void)
        return mono_process_get_data (GINT_TO_POINTER (mono_process_current_pid ()), MONO_PROCESS_FAULTS);
 }
 
+
+// If cpu_load gets inlined on Windows then cpu_load_1min, cpu_load_5min and cpu_load_15min can be folded into a single function and that will
+// cause a failure when registering counters since the same function address will be used by all three functions. Preventing this method from being inlined
+// will make sure the registered callback functions remains unique.
+#ifdef _MSC_VER
+__declspec(noinline)
+#endif
 static double
 cpu_load (int kind)
 {
index ccb9121d0b6245a5558c099246ae535bbafe3eea..3eb88171257a0f68687870c9655144791ae779d9 100644 (file)
@@ -260,8 +260,6 @@ mono_threads_wait_pending_operations (void)
 
 //Thread initialization code
 
-static void mono_threads_unregister_current_thread (MonoThreadInfo *info);
-
 static inline void
 mono_hazard_pointer_clear_all (MonoThreadHazardPointers *hp, int retain)
 {
@@ -400,6 +398,7 @@ unregister_thread (void *arg)
        gpointer gc_unsafe_stackdata;
        MonoThreadInfo *info;
        int small_id;
+       gboolean result;
 
        info = (MonoThreadInfo *) arg;
        g_assert (info);
@@ -416,8 +415,6 @@ unregister_thread (void *arg)
 
        mono_native_tls_set_value (thread_exited_key, GUINT_TO_POINTER (1));
 
-       mono_threads_platform_unregister (info);
-
        /*
         * TLS destruction order is not reliable so small_id might be cleaned up
         * before us.
@@ -444,7 +441,10 @@ unregister_thread (void *arg)
        */
        if (threads_callbacks.thread_unregister)
                threads_callbacks.thread_unregister (info);
-       mono_threads_unregister_current_thread (info);
+
+       mono_threads_platform_unregister (info);
+       result = mono_thread_info_remove (info);
+       g_assert (result);
        mono_threads_transition_detach (info);
 
        mono_thread_info_suspend_unlock ();
@@ -480,20 +480,6 @@ thread_exited_dtor (void *arg)
 #endif
 }
 
-/**
- * Removes the current thread from the thread list.
- * This must be called from the thread unregister callback and nowhere else.
- * The current thread must be passed as TLS might have already been cleaned up.
-*/
-static void
-mono_threads_unregister_current_thread (MonoThreadInfo *info)
-{
-       gboolean result;
-       g_assert (mono_thread_info_get_tid (info) == mono_native_thread_id_get ());
-       result = mono_thread_info_remove (info);
-       g_assert (result);
-}
-
 MonoThreadInfo*
 mono_thread_info_current_unchecked (void)
 {
index 2251543e666491a794934617bde33931d99d5dfd..f5a0e9ab98ae02180157b09927d2fccd54f239a3 100644 (file)
@@ -241,6 +241,7 @@ mono_disasm_code
 mono_disasm_code_one
 mono_dl_fallback_register
 mono_dl_fallback_unregister
+mono_dl_open
 mono_dllmap_insert
 mono_domain_add_class_static_data
 mono_domain_assembly_open
@@ -495,6 +496,7 @@ mono_ldstr
 mono_ldtoken
 mono_load_remote_field
 mono_load_remote_field_new
+mono_loader_register_module
 mono_lock_free_alloc
 mono_lock_free_allocator_check_consistency
 mono_lock_free_allocator_init_allocator
index 1f82284e7c29e944108087ebb05d2fa117fdac27..1722591c2f397fcd574413a75dd699b8602dcec5 100644 (file)
@@ -241,6 +241,7 @@ mono_disasm_code
 mono_disasm_code_one
 mono_dl_fallback_register
 mono_dl_fallback_unregister
+mono_dl_open
 mono_dllmap_insert
 mono_domain_add_class_static_data
 mono_domain_assembly_open
@@ -497,6 +498,7 @@ mono_ldstr
 mono_ldtoken
 mono_load_remote_field
 mono_load_remote_field_new
+mono_loader_register_module
 mono_lock_free_alloc
 mono_lock_free_allocator_check_consistency
 mono_lock_free_allocator_init_allocator
index d2424feca659f855fe33bd575d5348dc83ffd53b..e958929f8e2f12ed3059b7ed98adbd07be2ab915 100644 (file)
       <resources>System.Web.Http.WebHost.Properties.CommonWebApiResources,../../../external/aspnetwebstack/src/Common/CommonWebApiResources.resx System.Web.Http.WebHost.Properties.SRResources,../../../external/aspnetwebstack/src/System.Web.Http.WebHost/Properties/SRResources.resx</resources>
       <response>System.Web.Http.WebHost.dll.sources</response>
     </project>
-    <project dir="class/Mono.Security.Providers.NewSystemSource" library="Mono.Security.Providers.NewSystemSource-net_4_x">
-      <boot>false</boot>
-      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -d:SECURITY_DEP -unsafe -nowarn:1030 -keyfile:../mono.pub -delaysign -d:MONO -d:FEATURE_PAL -d:MONO_FEATURE_NEW_TLS -d:MONO_FEATURE_NEW_SYSTEM_SOURCE -d:DISABLE_CAS_USE -d:MONO_SECURITY_ALIAS -r:./../../class/lib/net_4_x/System.dll -r:MonoSecurity=./../../class/lib/net_4_x/Mono.Security.dll</flags>
-      <output>Mono.Security.Providers.NewSystemSource.dll</output>
-      <built_sources></built_sources>
-      <library_output>./../../class/lib/net_4_x/Mono.Security.Providers.NewSystemSource.dll</library_output>
-      <fx_version>4.5</fx_version>
-      <profile>net_4_x</profile>
-      <resources></resources>
-      <response>Mono.Security.Providers.NewSystemSource.dll.sources</response>
-    </project>
-    <project dir="class/Mono.Security.Providers.NewTls" library="Mono.Security.Providers.NewTls-net_4_x">
-      <boot>false</boot>
-      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -unsafe -nowarn:1030 -keyfile:../mono.pub -delaysign -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/Mono.Security.dll -r:NewSystemSource=./../../class/lib/net_4_x/Mono.Security.Providers.NewSystemSource.dll</flags>
-      <output>Mono.Security.Providers.NewTls.dll</output>
-      <built_sources></built_sources>
-      <library_output>./../../class/lib/net_4_x/Mono.Security.Providers.NewTls.dll</library_output>
-      <fx_version>4.5</fx_version>
-      <profile>net_4_x</profile>
-      <resources></resources>
-      <response>Mono.Security.Providers.NewTls.dll.sources</response>
-    </project>
     <project dir="class/System.Runtime.InteropServices.RuntimeInformation" library="System.Runtime.InteropServices.RuntimeInformation-net_4_x">
       <boot>false</boot>
       <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -r:./../../class/lib/net_4_x/System.dll</flags>
       <resources></resources>
       <response>System.Xml.Serialization.dll.sources</response>
     </project>
-    <project dir="class/Mono.Security.Providers.DotNet" library="Mono.Security.Providers.DotNet-net_4_x">
-      <boot>false</boot>
-      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -unsafe -nowarn:1030 -keyfile:../mono.pub -delaysign -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/Mono.Security.dll</flags>
-      <output>Mono.Security.Providers.DotNet.dll</output>
-      <built_sources></built_sources>
-      <library_output>./../../class/lib/net_4_x/Mono.Security.Providers.DotNet.dll</library_output>
-      <fx_version>4.5</fx_version>
-      <profile>net_4_x</profile>
-      <resources></resources>
-      <response>Mono.Security.Providers.DotNet.dll.sources</response>
-    </project>
-    <project dir="class/Mono.Security.Providers.OldTls" library="Mono.Security.Providers.OldTls-net_4_x">
-      <boot>false</boot>
-      <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -unsafe -nowarn:1030 -keyfile:../mono.pub -delaysign -d:SECURITY_DEP -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/Mono.Security.dll</flags>
-      <output>Mono.Security.Providers.OldTls.dll</output>
-      <built_sources></built_sources>
-      <library_output>./../../class/lib/net_4_x/Mono.Security.Providers.OldTls.dll</library_output>
-      <fx_version>4.5</fx_version>
-      <profile>net_4_x</profile>
-      <resources></resources>
-      <response>Mono.Security.Providers.OldTls.dll.sources</response>
-    </project>
     <project dir="class/System.DirectoryServices.Protocols" library="System.DirectoryServices.Protocols-net_4_x">
       <boot>false</boot>
       <flags>/codepage:65001 -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll -debug -optimize /noconfig -r:./../../class/lib/net_4_x/System.dll -r:./../../class/lib/net_4_x/System.DirectoryServices.dll -r:./../../class/lib/net_4_x/System.Xml.dll</flags>
index ba17c5e4e215857005ff74c9b74f17746742998a..97642ca158a70e2e16d7b747fe3516f163d25cb0 100644 (file)
@@ -181,10 +181,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Web.Http.SelfHost-ne
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Web.Http.WebHost-net_4_x", "mcs/class/System.Web.Http.WebHost/System.Web.Http.WebHost-net_4_x.csproj", "{2AF7E697-07BA-439E-89BF-076AEE4AE04C}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Security.Providers.NewSystemSource-net_4_x", "mcs/class/Mono.Security.Providers.NewSystemSource/Mono.Security.Providers.NewSystemSource-net_4_x.csproj", "{0BB4541F-9B1A-4CBC-BEB1-00B31B37F74E}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Security.Providers.NewTls-net_4_x", "mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls-net_4_x.csproj", "{C8B8E524-BB3A-44E2-8C22-E3313E9F477C}"
-EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build.Framework-net_4_x", "mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework-net_4_x.csproj", "{5E39A911-F4E6-4B4B-B8AC-111BB1DD80C6}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build.Utilities-net_4_x", "mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities-net_4_x.csproj", "{8E5728E0-CEAF-431F-963E-EB1DEE15C506}"
@@ -287,10 +283,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Windows-net_4_x", "m
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Xml.Serialization-net_4_x", "mcs/class/System.Xml.Serialization/System.Xml.Serialization-net_4_x.csproj", "{2210873E-99FC-48A2-A261-D650BAE33A1C}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Security.Providers.DotNet-net_4_x", "mcs/class/Mono.Security.Providers.DotNet/Mono.Security.Providers.DotNet-net_4_x.csproj", "{391EDD2B-85AC-4FCA-B607-AAD6C51E6799}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Security.Providers.OldTls-net_4_x", "mcs/class/Mono.Security.Providers.OldTls/Mono.Security.Providers.OldTls-net_4_x.csproj", "{E485E885-59B1-4081-BC66-56AAAFD8771A}"
-EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.DirectoryServices.Protocols-net_4_x", "mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols-net_4_x.csproj", "{EF08F249-31A1-4E62-8391-ECBA5227B686}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.VisualC-net_4_x", "mcs/class/Microsoft.VisualC/Microsoft.VisualC-net_4_x.csproj", "{ACA2694D-9F07-4AE2-9171-9AB5DD1A8C18}"
@@ -1041,14 +1033,6 @@ Global
                {2AF7E697-07BA-439E-89BF-076AEE4AE04C}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {2AF7E697-07BA-439E-89BF-076AEE4AE04C}.Release|Any CPU.ActiveCfg = Release|Any CPU
                {2AF7E697-07BA-439E-89BF-076AEE4AE04C}.Release|Any CPU.Build.0 = Release|Any CPU
-               {0BB4541F-9B1A-4CBC-BEB1-00B31B37F74E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {0BB4541F-9B1A-4CBC-BEB1-00B31B37F74E}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {0BB4541F-9B1A-4CBC-BEB1-00B31B37F74E}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {0BB4541F-9B1A-4CBC-BEB1-00B31B37F74E}.Release|Any CPU.Build.0 = Release|Any CPU
-               {C8B8E524-BB3A-44E2-8C22-E3313E9F477C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {C8B8E524-BB3A-44E2-8C22-E3313E9F477C}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {C8B8E524-BB3A-44E2-8C22-E3313E9F477C}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {C8B8E524-BB3A-44E2-8C22-E3313E9F477C}.Release|Any CPU.Build.0 = Release|Any CPU
                {5E39A911-F4E6-4B4B-B8AC-111BB1DD80C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
                {5E39A911-F4E6-4B4B-B8AC-111BB1DD80C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {5E39A911-F4E6-4B4B-B8AC-111BB1DD80C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -1253,14 +1237,6 @@ Global
                {2210873E-99FC-48A2-A261-D650BAE33A1C}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {2210873E-99FC-48A2-A261-D650BAE33A1C}.Release|Any CPU.ActiveCfg = Release|Any CPU
                {2210873E-99FC-48A2-A261-D650BAE33A1C}.Release|Any CPU.Build.0 = Release|Any CPU
-               {391EDD2B-85AC-4FCA-B607-AAD6C51E6799}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {391EDD2B-85AC-4FCA-B607-AAD6C51E6799}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {391EDD2B-85AC-4FCA-B607-AAD6C51E6799}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {391EDD2B-85AC-4FCA-B607-AAD6C51E6799}.Release|Any CPU.Build.0 = Release|Any CPU
-               {E485E885-59B1-4081-BC66-56AAAFD8771A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {E485E885-59B1-4081-BC66-56AAAFD8771A}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {E485E885-59B1-4081-BC66-56AAAFD8771A}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {E485E885-59B1-4081-BC66-56AAAFD8771A}.Release|Any CPU.Build.0 = Release|Any CPU
                {EF08F249-31A1-4E62-8391-ECBA5227B686}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
                {EF08F249-31A1-4E62-8391-ECBA5227B686}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {EF08F249-31A1-4E62-8391-ECBA5227B686}.Release|Any CPU.ActiveCfg = Release|Any CPU