Merge pull request #3585 from lateralusX/jlorenss/win-counter-warning
authorJohan Lorensson <lateralusx.github@gmail.com>
Thu, 22 Sep 2016 06:54:23 +0000 (08:54 +0200)
committerGitHub <noreply@github.com>
Thu, 22 Sep 2016 06:54:23 +0000 (08:54 +0200)
Resolve "you are registering twice the same counter address" warning on Windows Release builds.

126 files changed:
mcs/class/Makefile
mcs/class/Microsoft.CSharp/Microsoft.CSharp.RuntimeBinder/DynamicContext.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.Configuration/net_4_x_System.Configuration_test.dll.config [changed from symlink to file mode: 0644]
mcs/class/System.Core/System.IO.Pipes/AnonymousPipeServerStream.cs
mcs/class/System.Core/System.IO.Pipes/NamedPipeClientStream.cs
mcs/class/System.Core/System.IO.Pipes/NamedPipeServerStream.cs
mcs/class/System.Core/System.IO.Pipes/PipeStream.cs
mcs/class/System.Data/Test/System.Data/DataTableReadWriteXmlTest.cs [changed mode: 0644->0755]
mcs/class/System.Data/Test/System.Data/DataTableTest.cs [changed mode: 0644->0755]
mcs/class/System.Data/Test/System.Xml/XmlDataDocumentTest.cs [changed mode: 0644->0755]
mcs/class/System.Web/System.Web.Compilation/AppResourcesAssemblyBuilder.cs
mcs/class/System.Windows.Forms/System.Windows.Forms/Application.cs
mcs/class/System.XML/Test/System.Xml.Serialization/XmlReflectionImporterTests.cs [changed mode: 0644->0755]
mcs/class/System/Assembly/AssemblyInfo.cs
mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
mcs/class/System/Microsoft.VisualBasic/VBCodeCompiler.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.Diagnostics.CodeAnalysis/ExcludeFromCodeCoverageAttribute.cs [deleted file]
mcs/class/System/System.Net.Sockets/Socket.cs
mcs/class/System/System.dll.sources
mcs/class/System/System/MonoExeLocator.cs
mcs/class/System/Test/System.Diagnostics/ProcessTest.cs
mcs/class/System/Test/System/UriTest.cs
mcs/class/System/mobile_System.dll.sources
mcs/class/corlib/Assembly/AssemblyInfo.cs
mcs/class/corlib/System.Reflection/Assembly.cs
mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs
mcs/class/corlib/System.Security.AccessControl/NativeObjectSecurity.cs
mcs/class/corlib/System.Threading/Thread.cs
mcs/class/corlib/System/Environment.cs
mcs/class/corlib/System/GC.cs [deleted file]
mcs/class/corlib/System/GCCollectionMode.cs [deleted file]
mcs/class/corlib/System/GCNotificationStatus.cs [deleted file]
mcs/class/corlib/System/TermInfoDriver.cs
mcs/class/corlib/corlib.dll.sources
mcs/class/referencesource/System/sys/system/windows/markup/ValueSerializerAttribute.cs
mcs/class/referencesource/mscorlib/system/gc.cs
mcs/errors/cs0219-7.cs [new file with mode: 0644]
mcs/mcs/import.cs
mcs/mcs/property.cs
mcs/mcs/statement.cs
mcs/tests/test-254.cs
mcs/tests/ver-il-net_4_x.xml
mcs/tools/gacutil/Makefile
mcs/tools/gacutil/driver.cs
mcs/tools/gacutil/gacutil.exe.sources
mcs/tools/mono-symbolicate/Makefile
mcs/tools/mono-symbolicate/mono-symbolicate.exe.sources
mono/dis/main.c
mono/metadata/appdomain.c
mono/metadata/assembly-internals.h [new file with mode: 0644]
mono/metadata/assembly.c
mono/metadata/assembly.h
mono/metadata/boehm-gc.c
mono/metadata/class.c
mono/metadata/icall-def.h
mono/metadata/icall.c
mono/metadata/image-internals.h
mono/metadata/image.c
mono/metadata/image.h
mono/metadata/metadata-internals.h
mono/metadata/object-internals.h
mono/metadata/sgen-mono.c
mono/metadata/sgen-os-win32.c
mono/metadata/threadpool-ms.c
mono/metadata/threads-types.h
mono/metadata/threads.c
mono/metadata/w32mutex-unix.c
mono/metadata/w32mutex-utils.h [deleted file]
mono/metadata/w32mutex.h
mono/mini/mini-exceptions.c
mono/tests/Makefile.am
mono/tests/test-multi-netmodule-1-netmodule.cs [new file with mode: 0644]
mono/tests/test-multi-netmodule-2-dll1.cs [new file with mode: 0644]
mono/tests/test-multi-netmodule-3-dll2.cs [new file with mode: 0644]
mono/tests/test-multi-netmodule-4-exe.cs [new file with mode: 0644]
mono/utils/checked-build.c
mono/utils/mono-threads-posix.c
mono/utils/mono-threads-windows.c
mono/utils/mono-threads.c
mono/utils/mono-threads.h
mono/utils/w32handle.c
msvc/scripts/order.xml
net_4_x.sln

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 9c466c5ed9c9875b31f69f0f0ec9654075f3ac37..d03145e0df346c783650a15ff080a963e4ddcbda 100644 (file)
@@ -93,7 +93,8 @@ namespace Microsoft.CSharp.RuntimeBinder
                                module.SetDeclaringAssembly (temp);
 
                                var importer = new Compiler.ReflectionImporter (module, cc.BuiltinTypes) {
-                                       IgnorePrivateMembers = false
+                                       IgnorePrivateMembers = false,
+                                       IgnoreCompilerGeneratedField = false
                                };
 
                                // Import all currently loaded assemblies
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);
deleted file mode 120000 (symlink)
index 6f31b34dcaa52c7157fab9560cc6a6b5e6f14c7c..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1 +0,0 @@
-Test/App.config
\ No newline at end of file
new file mode 100644 (file)
index 0000000000000000000000000000000000000000..d07b4f882f8fea25edf772d4619e88847ae2cb95
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<configuration>
+       <connectionStrings>
+               <add name="test-connstring"
+                       connectionString="Server=(local);Initial Catalog=someDb;User Id=someUser;Password=somePassword;Application Name=someAppName;Min Pool Size=5;Max Pool Size=500;Connect Timeout=10;Connection Lifetime=29;" />
+       </connectionStrings>
+  <appSettings file="Test/appSettings.config" />
+</configuration>
index 97455f30cdab55d78766508ad566684a21674a3b..18c82aeac3123a789d24b4f03217d087ec1429bf 100644 (file)
@@ -70,13 +70,15 @@ namespace System.IO.Pipes
                }
 #endif
 
-#if !MOBILE
                public AnonymousPipeServerStream (PipeDirection direction, HandleInheritability inheritability, int bufferSize, PipeSecurity pipeSecurity)
                        : base (direction, bufferSize)
                {
                        if (direction == PipeDirection.InOut)
                                throw new NotSupportedException ("Anonymous pipe direction can only be either in or out.");
 
+#if MOBILE
+                       throw new NotImplementedException ();
+#else
                        if (IsWindows)
                                impl = new Win32AnonymousPipeServer (this, direction, inheritability, bufferSize, pipeSecurity);
                        else
@@ -84,8 +86,8 @@ namespace System.IO.Pipes
 
                        InitializeHandle (impl.Handle, false, false);
                        IsConnected = true;
-               }
 #endif
+               }
 
                [MonoTODO]
                public AnonymousPipeServerStream (PipeDirection direction, SafePipeHandle serverSafePipeHandle, SafePipeHandle clientSafePipeHandle)
index a5a9ebd3fbc698acd1801824f8ac2d37fc21ab3b..a823217957dcd384dd2f14db6d07cdbc1b06fa3d 100644 (file)
@@ -100,21 +100,23 @@ namespace System.IO.Pipes
 #endif
                }
 
-#if !MOBILE
                public NamedPipeClientStream (string serverName, string pipeName, PipeAccessRights desiredAccessRights, PipeOptions options, TokenImpersonationLevel impersonationLevel, HandleInheritability inheritability)
                        : base (ToDirection (desiredAccessRights), DefaultBufferSize)
                {
                        if (impersonationLevel != TokenImpersonationLevel.None ||
                            inheritability != HandleInheritability.None)
                                throw ThrowACLException ();
-
+#if MOBILE
+                       throw new NotImplementedException ();
+#else
                        if (IsWindows)
                                impl = new Win32NamedPipeClient (this, serverName, pipeName, desiredAccessRights, options, inheritability);
                        else
                                impl = new UnixNamedPipeClient (this, serverName, pipeName, desiredAccessRights, options, inheritability);
-               }
 #endif
 
+               }
+
                ~NamedPipeClientStream () {
                        Dispose (false);
                }
@@ -163,6 +165,10 @@ namespace System.IO.Pipes
                        throw new NotImplementedException ();
                }
 
+               protected override internal void CheckPipePropertyOperations () {
+                       base.CheckPipePropertyOperations();
+               }
+
                public int NumberOfServerInstances {
                        get {
                                CheckPipePropertyOperations ();
index 3ffe89436727acf71c4a3be5afbd61aed7d9712f..e402a8a2620193f7b966b300ddb7cb2f219a431f 100644 (file)
@@ -83,7 +83,6 @@ namespace System.IO.Pipes
                }
 #endif
 
-#if !MOBILE
                public NamedPipeServerStream (string pipeName, PipeDirection direction, int maxNumberOfServerInstances, PipeTransmissionMode transmissionMode, PipeOptions options, int inBufferSize, int outBufferSize, PipeSecurity pipeSecurity)
                        : this (pipeName, direction, maxNumberOfServerInstances, transmissionMode, options, inBufferSize, outBufferSize, pipeSecurity, HandleInheritability.None)
                {
@@ -100,7 +99,9 @@ namespace System.IO.Pipes
                {
                        var rights = ToAccessRights (direction) | additionalAccessRights;
                        // FIXME: reject some rights declarations (for ACL).
-
+#if MOBILE
+                       throw new NotImplementedException ();
+#else
                        if (IsWindows)
                                impl = new Win32NamedPipeServer (this, pipeName, maxNumberOfServerInstances, transmissionMode,
                                                                 rights, options, inBufferSize, outBufferSize,
@@ -110,8 +111,8 @@ namespace System.IO.Pipes
                                                                rights, options, inBufferSize, outBufferSize, inheritability);
 
                        InitializeHandle (impl.Handle, false, (options & PipeOptions.Asynchronous) != PipeOptions.None);
-               }
 #endif
+               }
 
                public NamedPipeServerStream (PipeDirection direction, bool isAsync, bool isConnected, SafePipeHandle safePipeHandle)
                        : base (direction, DefaultBufferSize)
@@ -140,14 +141,12 @@ namespace System.IO.Pipes
                        impl.Disconnect ();
                }
 
-#if !MOBILE
                [MonoTODO]
                [SecurityPermission (SecurityAction.Demand, Flags = SecurityPermissionFlag.ControlPrincipal)]
                public void RunAsClient (PipeStreamImpersonationWorker impersonationWorker)
                {
                        throw new NotImplementedException ();
                }
-#endif
 
                public void WaitForConnection ()
                {
@@ -173,7 +172,6 @@ namespace System.IO.Pipes
                        throw new NotImplementedException ();
                }
 
-#if !MOBILE
                // async operations
 
                Action wait_connect_delegate;
@@ -190,7 +188,6 @@ namespace System.IO.Pipes
                {
                        wait_connect_delegate.EndInvoke (asyncResult);
                }
-#endif
        }
 }
 
index 20b7e7ec09cb8fa3a7f17df609d7f240237f2434..8dea76a2cacf96b9ff3010364d82008dbf7e31dd 100644 (file)
@@ -57,7 +57,6 @@ namespace System.IO.Pipes
                        return new NotImplementedException ("ACL is not supported in Mono");
                }
 
-#if !MOBILE
                internal static PipeAccessRights ToAccessRights (PipeDirection direction)
                {
                        switch (direction) {
@@ -88,7 +87,6 @@ namespace System.IO.Pipes
                                        throw new ArgumentOutOfRangeException ();
                        }
                }
-#endif
 
                protected PipeStream (PipeDirection direction, int bufferSize)
                        : this (direction, PipeTransmissionMode.Byte, bufferSize)
@@ -144,9 +142,7 @@ namespace System.IO.Pipes
                        set { stream = value; }
                }
 
-#if !MOBILE
                protected bool IsHandleExposed { get; private set; }
-#endif
 
                [MonoTODO]
                public bool IsMessageComplete { get; private set; }
@@ -182,19 +178,7 @@ namespace System.IO.Pipes
                }
 
                // initialize/dispose/state check
-#if MOBILE
-               internal static void CheckPipePropertyOperations ()
-               {
-               }
-
-               static void CheckReadOperations ()
-               {
-               }
 
-               static void CheckWriteOperations ()
-               {
-               }
-#else
                [MonoTODO]
                protected internal virtual void CheckPipePropertyOperations ()
                {
@@ -224,7 +208,6 @@ namespace System.IO.Pipes
                        this.IsHandleExposed = isExposed;
                        this.IsAsync = isAsync;
                }
-#endif
 
                protected override void Dispose (bool disposing)
                {
@@ -253,23 +236,29 @@ namespace System.IO.Pipes
                        throw new NotSupportedException ();
                }
 
-#if !MOBILE
                public PipeSecurity GetAccessControl ()
                {
+#if MOBILE
+                       throw new PlatformNotSupportedException ();
+#else
                        return new PipeSecurity (SafePipeHandle,
                                                 AccessControlSections.Owner |
                                                 AccessControlSections.Group |
                                                 AccessControlSections.Access);
+#endif
                }
 
                public void SetAccessControl (PipeSecurity pipeSecurity)
                {
+#if MOBILE
+                       throw new PlatformNotSupportedException ();
+#else
                        if (pipeSecurity == null)
                                throw new ArgumentNullException ("pipeSecurity");
                                
                        pipeSecurity.Persist (SafePipeHandle);
-               }
 #endif
+               }
 
                // pipe I/O
 
@@ -319,7 +308,6 @@ namespace System.IO.Pipes
 
                // async
 
-#if !MOBILE
                Func<byte [],int,int,int> read_delegate;
 
                [HostProtection (SecurityAction.LinkDemand, ExternalThreading = true)]
@@ -349,7 +337,6 @@ namespace System.IO.Pipes
                {
                        write_delegate.EndInvoke (asyncResult);
                }
-#endif
        }
 }
 
old mode 100644 (file)
new mode 100755 (executable)
index 1993e7f..4412990
@@ -35,7 +35,6 @@ namespace MonoTests.System.Data
     [TestFixture]
     public class DataTableReadWriteXmlTest
     {
-        public static readonly string EOL = Environment.NewLine;
 
         void StandardizeXmlFormat(ref string xml)
         {
@@ -126,11 +125,11 @@ namespace MonoTests.System.Data
             // Get XML for DataSet writes.
             sw.GetStringBuilder().Length = 0;
             ds.WriteXml(sw);
-            string xmlDSNone = sw.ToString().Replace ("\n", EOL);
+            string xmlDSNone = sw.ToString();
             
             sw.GetStringBuilder().Length = 0;
             ds.WriteXml(sw, XmlWriteMode.DiffGram);
-            string xmlDSDiffGram = sw.ToString().Replace ("\n", EOL);
+            string xmlDSDiffGram = sw.ToString();
 
             sw.GetStringBuilder().Length = 0;
             ds.WriteXml(sw, XmlWriteMode.WriteSchema);
@@ -188,11 +187,11 @@ namespace MonoTests.System.Data
             
             sw.GetStringBuilder().Length = 0;
             ds.WriteXml(sw);
-            xmlDSNone = sw.ToString().Replace ("\n", EOL);
+            xmlDSNone = sw.ToString();
             
             sw.GetStringBuilder().Length = 0;
             ds.WriteXml(sw, XmlWriteMode.DiffGram);
-            xmlDSDiffGram = sw.ToString().Replace ("\n", EOL);
+            xmlDSDiffGram = sw.ToString();
 
             sw.GetStringBuilder().Length = 0;
             ds.WriteXml(sw, XmlWriteMode.WriteSchema);
old mode 100644 (file)
new mode 100755 (executable)
index 388f547..9d54c82
@@ -3236,7 +3236,6 @@ namespace MonoTests.System.Data
                        string TextString = GetNormalizedSchema (writer.ToString ());
                        //string TextString = writer.ToString ();
 
-                       EOL = "\n";
                        string substring = TextString.Substring (0, TextString.IndexOf (EOL));
                        TextString = TextString.Substring (TextString.IndexOf (EOL) + EOL.Length);
                        Assert.AreEqual ("<?xml version=\"1.0\" encoding=\"utf-16\"?>", substring, "test#01");
old mode 100644 (file)
new mode 100755 (executable)
index 053ecdb..93b0cc6
@@ -174,9 +174,9 @@ namespace MonoTests.System.Data.Xml
                        StringWriter sw = new StringWriter ();
                        XmlTextWriter xw = new XmlTextWriter (sw);
                        Doc.DataSet.WriteXml (xw);
-                       string s = sw.ToString ();
+                       string s = sw.ToString ().Replace ("\r", "").Replace ("\n", Environment.NewLine);
                        Assert.AreEqual (xml, s, "#1");
-                       Assert.AreEqual (xml, Doc.InnerXml, "#2");
+                       Assert.AreEqual (xml, Doc.InnerXml.Replace ("\r", "").Replace ("\n", Environment.NewLine), "#2");
                        Assert.AreEqual ("EndOfFile", Reader.ReadState.ToString (), "test#01");
 
                        DataSet Set = Doc.DataSet;
index 064fbde4322c713601865c6381a2ca9feda872e4..15c0393412b8635cf4f59d61b10e3bd32799544e 100644 (file)
@@ -231,10 +231,10 @@ namespace System.Web.Compilation
                string SetAlPath (ProcessStartInfo info)
                {                       
                        if (RuntimeHelpers.RunningOnWindows) {
-                               info.FileName = MonoExeLocator.MonoPath;
-                               return MonoExeLocator.AlPath + " ";
+                               info.FileName = MonoToolsLocator.Mono;
+                               return MonoToolsLocator.AssemblyLinker + " ";
                        } else {
-                               info.FileName = MonoExeLocator.AlPath;
+                               info.FileName = MonoToolsLocator.AssemblyLinker;
                                return String.Empty;
                        }
                }
index c3e384227ba610a5e83111f42cc3c10d58b5ca58..07353efcb7a4dca16fa76fec7e5c817fc8828c4a 100644 (file)
@@ -560,7 +560,7 @@ namespace System.Windows.Forms
                        if (Assembly.GetEntryAssembly () == null)
                                throw new NotSupportedException ("The method 'Restart' is not supported by this application type.");
 
-                       string mono_path = MonoExeLocator.MonoPath;
+                       string mono_path = MonoToolsLocator.Mono;
 
                        //Get command line arguments
                        StringBuilder argsBuilder = new StringBuilder ();
old mode 100644 (file)
new mode 100755 (executable)
index 98942e5..bec6232
@@ -2052,8 +2052,8 @@ namespace MonoTests.System.XmlSerialization
                                serializer.Serialize (writer, obj);
                                writer.Close ();
 
-                               Assert.AreEqual (@"<?xml version=""1.0"" encoding=""utf-16""?>
-<Bug594490Class xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xml:lang=""hello world"" />",
+                               Assert.AreEqual (@"<?xml version=""1.0"" encoding=""utf-16""?>" + Environment.NewLine +
+                                                @"<Bug594490Class xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xml:lang=""hello world"" />",
                                        writer.ToString (),
                                        "Novell bug #594490 (https://bugzilla.novell.com/show_bug.cgi?id=594490) not fixed.");
                        }
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 2b987b11482fe13041749a3a448b333a1e57d2bd..c41240fab9e280d5ace8c1e9527f4a5ab080254b 100644 (file)
@@ -132,10 +132,10 @@ namespace Mono.CSharp
 
                        // FIXME: these lines had better be platform independent.
                        if (Path.DirectorySeparatorChar == '\\') {
-                               mcs.StartInfo.FileName = MonoExeLocator.MonoPath;
-                               mcs.StartInfo.Arguments = "\"" + MonoExeLocator.McsPath + "\" ";
+                               mcs.StartInfo.FileName = MonoToolsLocator.Mono;
+                               mcs.StartInfo.Arguments = "\"" + MonoToolsLocator.CSharpCompiler + "\" ";
                        } else {
-                               mcs.StartInfo.FileName = MonoExeLocator.McsPath;
+                               mcs.StartInfo.FileName = MonoToolsLocator.CSharpCompiler;
                        }
 
                        mcs.StartInfo.Arguments += BuildArgs (options, fileNames, ProviderOptions);
index b7ff19b348a6ecb791eab533f7bf87eabd71998d..907acebaa66f7ece769bbe4a359af68ba0a328dd 100644 (file)
@@ -216,10 +216,10 @@ namespace Microsoft.VisualBasic
                        string[] vbnc_output_lines;
                        // FIXME: these lines had better be platform independent.
                        if (Path.DirectorySeparatorChar == '\\') {
-                               vbnc.StartInfo.FileName = MonoExeLocator.MonoPath;
-                               vbnc.StartInfo.Arguments = MonoExeLocator.VbncPath + ' ' + BuildArgs (options, fileNames);
+                               vbnc.StartInfo.FileName = MonoToolsLocator.Mono;
+                               vbnc.StartInfo.Arguments = MonoToolsLocator.VBCompiler + ' ' + BuildArgs (options, fileNames);
                        } else {
-                               vbnc.StartInfo.FileName = MonoExeLocator.VbncPath;
+                               vbnc.StartInfo.FileName = MonoToolsLocator.VBCompiler;
                                vbnc.StartInfo.Arguments = BuildArgs (options, fileNames);
                        }
                        //Console.WriteLine (vbnc.StartInfo.Arguments);
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
diff --git a/mcs/class/System/System.Diagnostics.CodeAnalysis/ExcludeFromCodeCoverageAttribute.cs b/mcs/class/System/System.Diagnostics.CodeAnalysis/ExcludeFromCodeCoverageAttribute.cs
deleted file mode 100644 (file)
index 38371ca..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-//
-// ExcludeFromCodeCoverageAttribute.cs
-//
-// Authors:
-//  Jb Evain  <jbevain@novell.com>
-//
-// Copyright (C) 2010 Novell, Inc (http://www.novell.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;
-
-
-namespace System.Diagnostics.CodeAnalysis {
-
-       [AttributeUsage (AttributeTargets.Class
-               | AttributeTargets.Struct
-               | AttributeTargets.Constructor
-               | AttributeTargets.Method
-               | AttributeTargets.Property
-               | AttributeTargets.Event,
-               AllowMultiple = false,
-               Inherited = false)]
-       public sealed class ExcludeFromCodeCoverageAttribute : Attribute
-       {
-               public ExcludeFromCodeCoverageAttribute ()
-               {
-               }
-       }
-}
-
index 396b16f4c5416c06b77b6666e47c6404ea198e26..58d0899bf13325c69fe70745178f944d0750e54f 100644 (file)
@@ -230,7 +230,8 @@ namespace System.Net.Sockets
                                         * effects on Linux, as the socket option is kludged by
                                         * turning on or off PMTU discovery... */
                                        this.DontFragment = false;
-                                       this.NoDelay = false;
+                                       if (protocol_type == ProtocolType.Tcp)
+                                               this.NoDelay = false;
                                } else if (address_family == AddressFamily.InterNetworkV6) {
                                        this.DualMode = true;
                                }
@@ -622,7 +623,6 @@ namespace System.Net.Sockets
                        set {
                                ThrowIfDisposedAndClosed ();
                                ThrowIfUdp ();
-
                                SetSocketOption (SocketOptionLevel.Tcp, SocketOptionName.NoDelay, value ? 1 : 0);
                        }
                }
index f98ed393bd3ee50eb31f10bb488d3c460e776835..92e3b3e84c0c38b65ed9cb2625ec93b911860d86 100644 (file)
@@ -162,7 +162,6 @@ System.Diagnostics/ThreadWaitReason.cs
 System.Diagnostics/TraceImpl.cs
 System.Diagnostics/TraceSourceInfo.cs
 System.Diagnostics/Win32EventLog.cs
-System.Diagnostics.CodeAnalysis/ExcludeFromCodeCoverageAttribute.cs
 System/Platform.cs
 System/MonoExeLocator.cs
 System.IO.Compression/CompressionLevel.cs
@@ -564,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
@@ -578,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
@@ -1093,6 +1083,8 @@ ReferenceSources/_SslStream.cs
 
 ../referencesource/System/sys/system/IO/ports/InternalResources.cs
 
+../referencesource/System/sys/system/Diagnostics/CodeAnalysis/ExcludeFromCodeCoverageAttribute.cs
+
 ../referencesource/System/sys/system/runtime/interopservices/DefaultParameterValueAttribute.cs
 ../referencesource/System/sys/system/runtime/interopservices/handlecollector.cs
 
index 7e75ce7bef66da923990ced2dc4aa2bf42e7331b..4ab1b3385a121e3c4ef8a41e9a24a4cfd79748b4 100755 (executable)
@@ -1,4 +1,5 @@
-using System;
+#if !MOBILE
+
 using System.Diagnostics;
 using System.IO;
 using System.Reflection;
@@ -6,88 +7,79 @@ using System.Runtime.InteropServices;
 
 namespace System {
 
-       internal static class MonoExeLocator {
-
-               public static string GacPath { get; private set; }
-               public static string MonoPath { get; private set; }
-               public static string McsPath { get; private set; }
-               public static string VbncPath { get; private set; }
-               public static string AlPath { get; private set; }
-
-               static MonoExeLocator () {
-
-                       PropertyInfo gac = typeof (Environment).GetProperty ("GacPath", BindingFlags.Static | BindingFlags.NonPublic);
-                       MethodInfo getGacMethod = gac.GetGetMethod (true);
-                       GacPath = Path.GetDirectoryName ((string) getGacMethod.Invoke (null, null));
+       static class MonoToolsLocator
+       {
+               public static readonly string Mono;
+               public static readonly string CSharpCompiler;
+               public static readonly string VBCompiler;
+               public static readonly string AssemblyLinker;
 
-                       string monoPath = null;
-                       string mcsPath = null;
-                       string vbncPath = null;
-                       string alPath = null;
+               // TODO: Should be lazy
+               static MonoToolsLocator ()
+               {
+                       var gac = typeof (Environment).GetProperty ("GacPath", BindingFlags.Static | BindingFlags.NonPublic);
+                       var getGacMethod = gac.GetGetMethod (true);
+                       var GacPath = Path.GetDirectoryName ((string) getGacMethod.Invoke (null, null));
 
                        if (Path.DirectorySeparatorChar == '\\') {
                                string processExe = Process.GetCurrentProcess ().MainModule.FileName;
                                if (processExe != null) {
                                        string fileName = Path.GetFileName (processExe);
                                        if (fileName.StartsWith ("mono") && fileName.EndsWith (".exe"))
-                                               monoPath = processExe;
+                                               Mono = processExe;
                                }
 
-                               if (!File.Exists (monoPath))
-                                       monoPath = Path.Combine (
+                               if (!File.Exists (Mono))
+                                       Mono = Path.Combine (
                                                Path.GetDirectoryName (
                                                        Path.GetDirectoryName (GacPath)),
                                                "bin\\mono.exe");
 
-                               if (!File.Exists (monoPath))
-                                       monoPath = Path.Combine (
+                               if (!File.Exists (Mono))
+                                       Mono = Path.Combine (
                                                Path.GetDirectoryName (
                                                        Path.GetDirectoryName (
                                                                Path.GetDirectoryName (GacPath))),
                                                "mono\\mini\\mono.exe");
 
-                               if (!File.Exists (monoPath))
-                                       throw new FileNotFoundException ("Windows mono path not found: " + monoPath);
+                               //if (!File.Exists (Mono))
+                               //      throw new FileNotFoundException ("Windows mono path not found: " + Mono);
 
-                               mcsPath = Path.Combine (GacPath, "4.5\\mcs.exe");
-                               if (!File.Exists (mcsPath))
-                                       mcsPath = Path.Combine (Path.GetDirectoryName (GacPath), "lib\\build\\mcs.exe");
+                               CSharpCompiler = Path.Combine (GacPath, "4.5\\mcs.exe");
+                               if (!File.Exists (CSharpCompiler))
+                                       CSharpCompiler = Path.Combine (Path.GetDirectoryName (GacPath), "lib\\build\\mcs.exe");
 
-                               if (!File.Exists (mcsPath))
-                                       throw new FileNotFoundException ("Windows mcs path not found: " + mcsPath);
+                               //if (!File.Exists (CSharpCompiler))
+                               //      throw new FileNotFoundException ("C# compiler not found at " + CSharpCompiler);
 
-                               vbncPath = Path.Combine (GacPath,  "4.5\\vbnc.exe");
-                               vbncPath = Path.Combine (GacPath,  "4.5\\vbnc.exe");
-                               alPath = Path.Combine (GacPath, "4.5\\al.exe");
+                               VBCompiler = Path.Combine (GacPath,  "4.5\\vbnc.exe");
+                               AssemblyLinker = Path.Combine (GacPath, "4.5\\al.exe");
 
-                               if (!File.Exists (alPath)) {
-                                       alPath = Path.Combine (Path.GetDirectoryName (GacPath), "lib\\net_4_x\\al.exe");
-                                       if (!File.Exists (alPath))
-                                               throw new FileNotFoundException ("Windows al path not found: " + alPath);
+                               if (!File.Exists (AssemblyLinker)) {
+                                       AssemblyLinker = Path.Combine (Path.GetDirectoryName (GacPath), "lib\\net_4_x\\al.exe");
+                               //      if (!File.Exists (AssemblyLinker))
+                               //              throw new FileNotFoundException ("Windows al path not found: " + AssemblyLinker);
                                }
                        } else {
-                               monoPath = Path.Combine (GacPath, "bin/mono");
-                               if (!File.Exists (MonoPath))
-                                       monoPath = "mono";
+                               Mono = Path.Combine (GacPath, "bin", "mono");
+                               if (!File.Exists (Mono))
+                                       Mono = "mono";
 
                                var mscorlibPath = new Uri (typeof (object).Assembly.CodeBase).LocalPath;
-                               mcsPath = Path.GetFullPath( Path.Combine (mscorlibPath, "..", "..", "..", "..", "bin", "mcs"));
-                               if (!File.Exists (mcsPath))
-                                       mcsPath = "mcs";
+                               CSharpCompiler = Path.GetFullPath (Path.Combine (mscorlibPath, "..", "..", "..", "..", "bin", "mcs"));
+                               if (!File.Exists (CSharpCompiler))
+                                       CSharpCompiler = "mcs";
 
-                               vbncPath = Path.Combine (Path.GetDirectoryName (mcsPath), "vbnc");
-                               if (!File.Exists (vbncPath))
-                                       vbncPath = "vbnc";
+                               VBCompiler = Path.GetFullPath (Path.Combine (mscorlibPath, "..", "..", "..", "..", "bin", "vbnc"));
+                               if (!File.Exists (VBCompiler))
+                                       VBCompiler = "vbnc";
 
-                               alPath = "al";
+                               AssemblyLinker = Path.GetFullPath (Path.Combine (mscorlibPath, "..", "..", "..", "..", "bin", "al"));
+                               if (!File.Exists (AssemblyLinker))
+                                       AssemblyLinker = "al";
                        }
-
-                       McsPath = mcsPath;
-                       MonoPath = monoPath;
-                       VbncPath = vbncPath;
-                       AlPath = alPath;
                }
-
-               
        }
 }
+
+#endif
index 277604287550fde13168d44d19ec29833961db90..20a93a732b6f1d1c3dc00368a5e0e0bc846db7c9 100644 (file)
@@ -284,7 +284,9 @@ namespace MonoTests.System.Diagnostics
                                Assert.AreEqual (-2147467259, ex.ErrorCode, "#3");
                                Assert.IsNull (ex.InnerException, "#4");
                                Assert.IsNotNull (ex.Message, "#5");
-                               Assert.AreEqual (2, ex.NativeErrorCode, "#6");
+                               // TODO: On windows we get ACCESS_DENIED (5) instead of FILE_NOT_FOUND (2) and .NET
+                               // gives ERROR_INVALID_PARAMETER (87). See https://bugzilla.xamarin.com/show_bug.cgi?id=44514
+                               Assert.IsTrue (ex.NativeErrorCode == 2 || ex.NativeErrorCode == 5 || ex.NativeErrorCode == 87, "#6");
                        }
                }
 
@@ -440,7 +442,9 @@ namespace MonoTests.System.Diagnostics
                                Assert.AreEqual (-2147467259, ex.ErrorCode, "#3");
                                Assert.IsNull (ex.InnerException, "#4");
                                Assert.IsNotNull (ex.Message, "#5");
-                               Assert.AreEqual (2, ex.NativeErrorCode, "#6");
+                               // TODO: On windows we get ACCESS_DENIED (5) instead of FILE_NOT_FOUND (2) and .NET
+                               // gives ERROR_INVALID_PARAMETER (87). See https://bugzilla.xamarin.com/show_bug.cgi?id=44514
+                               Assert.IsTrue (ex.NativeErrorCode == 2 || ex.NativeErrorCode == 5 || ex.NativeErrorCode == 87, "#6");
                        }
                }
 
@@ -892,8 +896,11 @@ namespace MonoTests.System.Diagnostics
                                path = "/bin/cat";
 #endif
                                return new ProcessStartInfo (path);
-                       } else
-                               return new ProcessStartInfo ("type");
+                       } else {
+                               var psi = new ProcessStartInfo ("findstr");
+                               psi.Arguments = "\"^\"";
+                               return psi;
+                       }
                }
 #endif // MONO_FEATURE_PROCESS_START
 
@@ -1018,7 +1025,7 @@ namespace MonoTests.System.Diagnostics
 
                                StringBuilder sb = new StringBuilder ();
                                sb.AppendFormat ("Could not found: {0} {1}\n", name.Name, name.Version);
-                               sb.AppendLine ("Looked in assemblies:");
+                               sb.AppendLine ("Looked in modules:");
 
                                foreach (var o in modules) {
                                        var m = (ProcessModule) o;
index 6ebd708ee02c0ea845f317e30f6d1f58230f7a20..52815f273a5d484798999909ad82cdd3e5e7e0dd 100644 (file)
@@ -1678,6 +1678,9 @@ namespace MonoTests.System
                [Category ("NotDotNet")]
                public void UnixAbsoluteFilePath_WithSpecialChars1 ()
                {
+                       if (isWin32)
+                               Assert.Ignore ();
+
                        Uri unixuri = new Uri ("/home/user/a@b");
                        Assert.AreEqual ("file", unixuri.Scheme, "UnixAbsoluteFilePath_WithSpecialChars #1");
                }
@@ -1686,6 +1689,9 @@ namespace MonoTests.System
                [Category ("NotDotNet")]
                public void UnixAbsoluteFilePath_WithSpecialChars2 ()
                {
+                       if (isWin32)
+                               Assert.Ignore ();
+
                        Uri unixuri = new Uri ("/home/user/a:b");
                        Assert.AreEqual ("file", unixuri.Scheme, "UnixAbsoluteFilePath_WithSpecialChars #2");
                }
@@ -1694,6 +1700,9 @@ namespace MonoTests.System
                [Category ("NotDotNet")]
                public void UnixAbsolutePath_ReplaceRelative ()
                {
+                       if (isWin32)
+                               Assert.Ignore ();
+
                        var u1 = new Uri ("/Users/demo/Projects/file.xml");
                        var u2 = new Uri (u1, "b.jpg");
 
@@ -1884,6 +1893,11 @@ namespace MonoTests.System
                [Test]
                public void DotNetRelativeOrAbsoluteTest ()
                {
+                       // On windows the path /foo is parsed as BadFormat and checking
+                       // if this is relative or absolute doesn't make sense.
+                       if (isWin32)
+                               Assert.Ignore();
+
                        FieldInfo useDotNetRelativeOrAbsoluteField = null;
                        bool useDotNetRelativeOrAbsoluteOld = false;
 
@@ -2043,6 +2057,9 @@ namespace MonoTests.System
                [Test]
                public void ImplicitUnixFileWithUnicode ()
                {
+                       if (isWin32)
+                               Assert.Ignore ();
+
                        string value = "/Library/Frameworks/System.Runtim…ee";
                        Uri uri;
                        Assert.IsTrue (Uri.TryCreate (value, UriKind.Absolute, out uri));
index 1b4c33d5db27c04d48f883f9bcd5f22366b42b37..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
@@ -814,6 +813,8 @@ ReferenceSources/Win32Exception.cs
 ../referencesource/System/net/System/Net/NetworkInformation/nodetype.cs
 ../referencesource/System/net/System/Net/NetworkInformation/pingexception.cs
 
+../referencesource/System/sys/system/Diagnostics/CodeAnalysis/ExcludeFromCodeCoverageAttribute.cs
+
 ../referencesource/System/sys/system/IO/ports/InternalResources.cs
 
 ../referencesource/System/sys/system/runtime/interopservices/DefaultParameterValueAttribute.cs
@@ -824,6 +825,8 @@ ReferenceSources/Win32Exception.cs
 ../referencesource/System/sys/system/threading/Barrier.cs
 ../referencesource/System/sys/system/threading/semaphore.cs
 
+../referencesource/System/sys/system/windows/markup/ValueSerializerAttribute.cs
+
 ../referencesource/System/security/system/security/Authentication/ExtendedProtection/TokenBinding.cs
 
 ../referencesource/System/security/system/security/cryptography/oid.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")]
index c5cecb3858e7d17ef3db6c34fb55db48b3ea6ba2..bce2832992eea36e25b13b86a689a62fa512fdb5 100644 (file)
@@ -58,7 +58,9 @@ namespace System.Reflection {
        public abstract class Assembly : ICustomAttributeProvider, _Assembly, IEvidenceFactory, ISerializable {
 #endif
                internal class ResolveEventHolder {
+#pragma warning disable 67
                        public event ModuleResolveEventHandler ModuleResolve;
+#pragma warning restore
                }
 
                internal class UnmanagedMemoryStreamForModule : UnmanagedMemoryStream
index d7128abc33553234622f969754c0ffe932741ded..2def9ddba50828744ab6ae26d6e37d1870df033b 100644 (file)
@@ -1426,10 +1426,10 @@ namespace System.Runtime.InteropServices
                        const int COR_E_TARGET = unchecked ((int)0x80131603L);
                        const int COR_E_TARGETINVOCATION = unchecked ((int)0x80131604L);
                        const int COR_E_TARGETPARAMCOUNT = unchecked ((int)0x8002000EL);
-                       const int COR_E_THREADABORTED = unchecked ((int)0x80131530L);
+                       //const int COR_E_THREADABORTED = unchecked ((int)0x80131530L);
                        const int COR_E_THREADINTERRUPTED = unchecked ((int)0x80131519L);
                        const int COR_E_THREADSTATE = unchecked ((int)0x80131520L);
-                       const int COR_E_THREADSTOP = unchecked ((int)0x80131521L);
+                       //const int COR_E_THREADSTOP = unchecked ((int)0x80131521L);
                        const int COR_E_TYPEINITIALIZATION = unchecked ((int)0x80131534L);
                        const int COR_E_VERIFICATION = unchecked ((int)0x8013150DL);
                        //const int COR_E_WEAKREFERENCE = unchecked ((int)?);
index d97859f49db9d0164c155ad5d2e3e012338831ab..ab14ac5a5eb4cd9cb0e1230e8feecc7f48f159f8 100644 (file)
@@ -422,12 +422,14 @@ namespace System.Security.AccessControl
                [return: MarshalAs (UnmanagedType.Bool)]
                static extern bool IsValidSecurityDescriptor (IntPtr descriptor);
                
+               /*
                struct SecurityDescriptor
                {
                        public byte Revision, Size;
                        public ushort ControlFlags;
                        public IntPtr Owner, Group, Sacl, Dacl;
                }
+               */
                #endregion
 #endif
        }
index 94d6aac785a15beba965aae8f8dff67574385331..b8c91df3940489eac573c9c2801590be6298de8d 100644 (file)
@@ -91,6 +91,7 @@ namespace System.Threading {
                private IntPtr thread_pinning_ref;
                private IntPtr abort_protected_block_count;
                private int priority = (int) ThreadPriority.Normal;
+               private IntPtr owned_mutex;
                /* 
                 * These fields are used to avoid having to increment corlib versions
                 * when a new field is added to the unmanaged MonoThread structure.
index d6b0ec038e4e7ad4878b4fd0e29645994c3e7b26..7b10091733fc45bc3ca209b9176aa842b5569925 100644 (file)
@@ -57,7 +57,7 @@ namespace System {
                 * of icalls, do not require an increment.
                 */
 #pragma warning disable 169
-               private const int mono_corlib_version = 155;
+               private const int mono_corlib_version = 156;
 #pragma warning restore 169
 
                [ComVisible (true)]
diff --git a/mcs/class/corlib/System/GC.cs b/mcs/class/corlib/System/GC.cs
deleted file mode 100644 (file)
index a673419..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-//
-// System.GC.cs
-//
-// Author:
-//   Paolo Molaro (lupus@ximian.com)
-//
-// (C) 2001 Ximian, Inc.  http://www.ximian.com
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.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.CompilerServices;
-using System.Runtime.ConstrainedExecution;
-using System.Security.Permissions;
-
-namespace System
-{
-       public static class GC
-       {
-
-               public extern static int MaxGeneration {
-                       [MethodImplAttribute(MethodImplOptions.InternalCall)]
-                       get;
-               }
-
-               [MethodImplAttribute (MethodImplOptions.InternalCall)]
-               extern static void InternalCollect (int generation);
-               
-               public static void Collect () {
-                       InternalCollect (MaxGeneration);
-               }
-
-               public static void Collect (int generation) {
-                       if (generation < 0)
-                               throw new ArgumentOutOfRangeException ("generation");
-                       InternalCollect (generation);
-               }
-
-               [MonoDocumentationNote ("mode parameter ignored")]
-               public static void Collect (int generation, GCCollectionMode mode) {
-                       Collect (generation);
-               }
-
-               [MonoDocumentationNote ("mode and blocking parameters ignored")]
-               public static void Collect (int generation, GCCollectionMode mode, bool blocking) {
-                       Collect (generation);
-               }
-
-               [MethodImplAttribute (MethodImplOptions.InternalCall)]
-               public extern static int GetGeneration (object obj);
-
-               public static int GetGeneration (WeakReference wo) {
-                       object obj = wo.Target;
-                       if (obj == null)
-                               throw new ArgumentException ();
-                       return GetGeneration (obj);
-               }
-
-               [MethodImplAttribute (MethodImplOptions.InternalCall)]
-               public extern static long GetTotalMemory (bool forceFullCollection);
-
-               /* this icall has weird semantics check the docs... */
-               [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
-               [MethodImplAttribute (MethodImplOptions.InternalCall)]
-               public extern static void KeepAlive (object obj);
-               
-               [MethodImplAttribute (MethodImplOptions.InternalCall)]
-               public extern static void ReRegisterForFinalize (object obj);
-
-               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.Success)]
-               [MethodImplAttribute (MethodImplOptions.InternalCall)]
-               public extern static void SuppressFinalize (object obj);
-
-               [MethodImplAttribute (MethodImplOptions.InternalCall)]
-               public extern static void WaitForPendingFinalizers ();
-
-               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.Success)]
-               [MethodImplAttribute (MethodImplOptions.InternalCall)]
-               public extern static int CollectionCount (int generation);
-
-               [MethodImplAttribute (MethodImplOptions.InternalCall)]
-               private extern static void RecordPressure (long bytesAllocated);
-
-               public static void AddMemoryPressure (long bytesAllocated) {
-                       RecordPressure (bytesAllocated);
-               }
-
-               public static void RemoveMemoryPressure (long bytesAllocated) {
-                       RecordPressure (-bytesAllocated);
-               }
-
-               [PermissionSetAttribute (SecurityAction.LinkDemand, Name = "FullTrust")]
-               [MonoTODO]
-               public static GCNotificationStatus WaitForFullGCApproach () {
-                       throw new NotImplementedException ();
-               }
-
-               [PermissionSetAttribute (SecurityAction.LinkDemand, Name = "FullTrust")]
-               [MonoTODO]
-               public static GCNotificationStatus WaitForFullGCApproach (int millisecondsTimeout) {
-                       throw new NotImplementedException ();
-               }
-
-               [PermissionSetAttribute (SecurityAction.LinkDemand, Name = "FullTrust")]
-               [MonoTODO]
-               public static GCNotificationStatus WaitForFullGCComplete () {
-                       throw new NotImplementedException ();
-               }
-
-               [PermissionSetAttribute (SecurityAction.LinkDemand, Name = "FullTrust")]
-               [MonoTODO]
-               public static GCNotificationStatus WaitForFullGCComplete (int millisecondsTimeout) {
-                       throw new NotImplementedException ();
-               }
-
-               [PermissionSetAttribute (SecurityAction.LinkDemand, Name = "FullTrust")]
-               public static void RegisterForFullGCNotification (int maxGenerationThreshold, int largeObjectHeapThreshold) {
-                       if (maxGenerationThreshold < 1 || maxGenerationThreshold > 99)
-                               throw new ArgumentOutOfRangeException ("maxGenerationThreshold", maxGenerationThreshold, "maxGenerationThreshold must be between 1 and 99 inclusive");
-                       if (largeObjectHeapThreshold < 1 || largeObjectHeapThreshold > 99)
-                               throw new ArgumentOutOfRangeException ("largeObjectHeapThreshold", largeObjectHeapThreshold, "largeObjectHeapThreshold must be between 1 and 99 inclusive");
-                       throw new NotImplementedException ();
-               }
-
-               [PermissionSetAttribute (SecurityAction.LinkDemand, Name = "FullTrust")]
-               public static void CancelFullGCNotification () {
-                       throw new NotImplementedException ();
-               }
-
-               [MethodImplAttribute (MethodImplOptions.InternalCall)]
-               internal extern static void register_ephemeron_array (Ephemeron[] array);
-
-               [MethodImplAttribute (MethodImplOptions.InternalCall)]
-               extern static object get_ephemeron_tombstone ();
-
-               internal static readonly object EPHEMERON_TOMBSTONE = get_ephemeron_tombstone ();
-       }
-}
diff --git a/mcs/class/corlib/System/GCCollectionMode.cs b/mcs/class/corlib/System/GCCollectionMode.cs
deleted file mode 100644 (file)
index 0134db6..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// System.GCCollectionMode.cs
-//
-
-//
-// Copyright (C) 2007 Novell, Inc (http://www.novell.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.
-//
-
-// Net 3.5 type
-
-namespace System
-{
-       [Serializable]
-       public enum GCCollectionMode {
-               Default = 0,
-               Forced = 1,
-               Optimized = 2
-       }
-}
diff --git a/mcs/class/corlib/System/GCNotificationStatus.cs b/mcs/class/corlib/System/GCNotificationStatus.cs
deleted file mode 100644 (file)
index d48dab5..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-// System.GCNotificationStatus.cs
-//
-// Authors:
-//   Gonzalo Paniagua (gonzalo@ximian.com)
-//
-// Copyright (C) 2009 Novell, Inc (http://www.novell.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.Collections.Generic;
-using System.Runtime.ConstrainedExecution;
-
-namespace System {
-       public enum GCNotificationStatus {
-               Succeeded,
-               Failed,
-               Canceled,
-               Timeout,
-               NotApplicable
-       }
-}
index ff6cc88a8096815dc51967017dd6bd835d5a894e..d849b03f8d66dbb4a2106a95baaa950e044ef286 100644 (file)
@@ -1556,22 +1556,52 @@ namespace System {
                                case 'O':                                         // logical
                                        int second = stack.Pop().Int32; // it's a stack... the second value was pushed last
                                        int first = stack.Pop().Int32;
-                                       char c = format[pos];
-                                       stack.Push(
-                                               c == '+' ? (first + second) :
-                                               c == '-' ? (first - second) :
-                                               c == '*' ? (first * second) :
-                                               c == '/' ? (first / second) :
-                                               c == 'm' ? (first % second) :
-                                               c == '^' ? (first ^ second) :
-                                               c == '&' ? (first & second) :
-                                               c == '|' ? (first | second) :
-                                               c == '=' ? AsInt(first == second) :
-                                               c == '>' ? AsInt(first > second) :
-                                               c == '<' ? AsInt(first < second) :
-                                               c == 'A' ? AsInt(AsBool(first) && AsBool(second)) :
-                                               c == 'O' ? AsInt(AsBool(first) || AsBool(second)) :
-                                               0); // not possible; we just validated above
+                                       int res;
+                                       switch (format[pos]) {
+                                       case '+':
+                                               res = first + second;
+                                               break;
+                                       case '-':
+                                               res = first - second;
+                                               break;
+                                       case '*':
+                                               res = first * second;
+                                               break;
+                                       case '/':
+                                               res = first / second;
+                                               break;
+                                       case 'm':
+                                               res = first % second;
+                                               break;
+                                       case '^':
+                                               res = first ^ second;
+                                               break;
+                                       case '&':
+                                               res = first & second;
+                                               break;
+                                       case '|':
+                                               res = first | second;
+                                               break;
+                                       case '=':
+                                               res = AsInt(first == second);
+                                               break;
+                                       case '>':
+                                               res = AsInt(first > second);
+                                               break;
+                                       case '<':
+                                               res = AsInt(first < second);
+                                               break;
+                                       case 'A':
+                                               res = AsInt(AsBool(first) && AsBool(second));
+                                               break;
+                                       case 'O':
+                                               res = AsInt(AsBool(first) || AsBool(second));
+                                               break;
+                                       default:
+                                               res = 0;
+                                               break;
+                                       }
+                                       stack.Push(res);
                                        break;
 
                                        // Unary operations
index 9dbb35f5773c119b527b16c2cd6532f8cc1e866c..3808a5985572150b5f06eabd3f67149a42bc9401 100644 (file)
@@ -105,9 +105,6 @@ System/DomainManagerInitializationFlags.cs
 System/EmptyArray.cs
 System/Environment.cs
 System/EnvironmentVariableTarget.cs
-System/GC.cs
-System/GCCollectionMode.cs
-System/GCNotificationStatus.cs
 System/Guid.cs
 System/IConsoleDriver.cs
 System/IntPtr.cs
@@ -270,7 +267,6 @@ System.Reflection.Emit/AssemblyBuilderAccess.cs
 System.Reflection.Emit/ConstructorBuilder.cs
 System.Reflection.Emit/ConstructorOnTypeBuilderInst.cs
 System.Reflection.Emit/CustomAttributeBuilder.cs
-System.Reflection.Emit/CustomAttributeBuilder.pns.cs
 System.Reflection.Emit/DerivedTypes.cs
 System.Reflection.Emit/DynamicILInfo.cs
 System.Reflection.Emit/DynamicMethod.cs
@@ -284,7 +280,6 @@ System.Reflection.Emit/FieldToken.cs
 System.Reflection.Emit/FlowControl.cs
 System.Reflection.Emit/GenericTypeParameterBuilder.cs
 System.Reflection.Emit/ILGenerator.cs
-System.Reflection.Emit/ILGenerator.pns.cs
 System.Reflection.Emit/Label.cs
 System.Reflection.Emit/LocalBuilder.cs
 System.Reflection.Emit/MethodBuilder.cs
@@ -300,14 +295,12 @@ System.Reflection.Emit/OpCodeType.cs
 System.Reflection.Emit/OperandType.cs
 System.Reflection.Emit/PackingSize.cs
 System.Reflection.Emit/ParameterBuilder.cs
-System.Reflection.Emit/ParameterBuilder.pns.cs
 System.Reflection.Emit/ParameterToken.cs
 System.Reflection.Emit/PEFileKinds.cs
 System.Reflection.Emit/PropertyBuilder.cs
 System.Reflection.Emit/PropertyOnTypeBuilderInst.cs
 System.Reflection.Emit/PropertyToken.cs
 System.Reflection.Emit/SignatureHelper.cs
-System.Reflection.Emit/SignatureHelper.pns.cs
 System.Reflection.Emit/SignatureToken.cs
 System.Reflection.Emit/StackBehaviour.cs
 System.Reflection.Emit/StringToken.cs
@@ -984,6 +977,7 @@ ReferenceSources/BinaryCompatibility.cs
 ../referencesource/mscorlib/system/flagsattribute.cs
 ../referencesource/mscorlib/system/formatexception.cs
 ../referencesource/mscorlib/system/FormattableString.cs
+../referencesource/mscorlib/system/gc.cs
 ../referencesource/mscorlib/system/guid.cs
 ../referencesource/mscorlib/system/iappdomain.cs
 ../referencesource/mscorlib/system/iappdomainsetup.cs
index 2a0102e8c57e11c654e1996120fd29cb04c76fdb..37f19b3aa8e1d599f442232477d4cc73f86437be 100644 (file)
@@ -26,7 +26,9 @@ namespace System.Windows.Markup
     /// attached property.
     /// </summary>
     [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Property | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
+#if !MOBILE
     [TypeForwardedFrom("WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")]
+#endif
     public sealed class ValueSerializerAttribute : Attribute
     {
         /// <summary>
index a4d5858e9ecddca1d47d729104352d351ceff953..dcc15f55ededabd0d03d75d548d3c77511076a8f 100644 (file)
@@ -65,6 +65,28 @@ namespace System {
 
     public static class GC 
     {
+#if MONO
+        [MethodImplAttribute (MethodImplOptions.InternalCall)]
+        extern static int GetCollectionCount (int generation);
+
+        [MethodImplAttribute (MethodImplOptions.InternalCall)]
+        extern static int GetMaxGeneration ();
+
+        [MethodImplAttribute (MethodImplOptions.InternalCall)]
+        extern static void InternalCollect (int generation);
+
+        [MethodImplAttribute (MethodImplOptions.InternalCall)]
+        extern static void RecordPressure (long bytesAllocated);
+
+        // TODO: Move following to ConditionalWeakTable
+        [MethodImplAttribute (MethodImplOptions.InternalCall)]
+        internal extern static void register_ephemeron_array (Ephemeron[] array);
+
+        [MethodImplAttribute (MethodImplOptions.InternalCall)]
+        extern static object get_ephemeron_tombstone ();
+
+        internal static readonly object EPHEMERON_TOMBSTONE = get_ephemeron_tombstone ();
+#else
         [System.Security.SecurityCritical]  // auto-generated
         [ResourceExposure(ResourceScope.None)]
         [MethodImplAttribute(MethodImplOptions.InternalCall)]
@@ -139,6 +161,7 @@ namespace System {
         [ResourceExposure(ResourceScope.None)]
         [DllImport(JitHelpers.QCall, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]
         private static extern void _RemoveMemoryPressure(UInt64 bytesAllocated);
+#endif
         
         [System.Security.SecurityCritical]  // auto-generated_required
         public static void AddMemoryPressure (long bytesAllocated) {
@@ -153,7 +176,11 @@ namespace System {
             }
             Contract.EndContractBlock();
 
+#if MONO
+            RecordPressure (bytesAllocated);
+#else
             _AddMemoryPressure((ulong)bytesAllocated);
+#endif
         }
 
         [System.Security.SecurityCritical]  // auto-generated_required
@@ -169,7 +196,11 @@ namespace System {
             }
             Contract.EndContractBlock();
 
+#if MONO
+            RecordPressure (-bytesAllocated);
+#else
             _RemoveMemoryPressure((ulong) bytesAllocated);
+#endif
         }
 
 
@@ -198,8 +229,12 @@ namespace System {
         //
         [System.Security.SecuritySafeCritical]  // auto-generated
         public static void Collect() {
+#if MONO
+            InternalCollect (MaxGeneration);
+#else
             //-1 says to GC all generations.
             _Collect(-1, (int)InternalGCCollectionMode.Blocking);
+#endif
         }
 
         [System.Security.SecuritySafeCritical]  // auto-generated
@@ -248,7 +283,11 @@ namespace System {
                 iInternalModes |= (int)InternalGCCollectionMode.NonBlocking;
             }
 
+#if MONO
+            InternalCollect (generation);
+#else
             _Collect(generation, iInternalModes);
+#endif
         }
 
         [System.Security.SecuritySafeCritical]  // auto-generated
@@ -260,9 +299,15 @@ namespace System {
                 throw new ArgumentOutOfRangeException("generation", Environment.GetResourceString("ArgumentOutOfRange_GenericPositive"));
             }
             Contract.EndContractBlock();
+
+#if MONO
+            return GetCollectionCount(generation);
+#else
             return _CollectionCount(generation, 0);
+#endif
         }
 
+#if !MONO
         // pass in true to get the BGC or FGC count.
         [System.Security.SecuritySafeCritical]  // auto-generated
         [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
@@ -275,6 +320,7 @@ namespace System {
             Contract.EndContractBlock();
             return _CollectionCount(generation, (getSpecialGCCount ? 1 : 0));
         }
+#endif
         
         // This method DOES NOT DO ANYTHING in and of itself.  It's used to 
         // prevent a finalizable object from losing any outstanding references 
@@ -318,9 +364,16 @@ namespace System {
         //
         [System.Security.SecuritySafeCritical]  // auto-generated
         public static int GetGeneration(WeakReference wo) {
+#if MONO
+            object obj = wo.Target;
+            if (obj == null)
+                throw new ArgumentException ();
+            return GetGeneration (obj);
+#else
             int result = GetGenerationWR(wo.m_handle);
             KeepAlive(wo);
             return result;
+#endif
         }
     
         // Returns the maximum GC generation.  Currently assumes only 1 heap.
@@ -330,17 +383,23 @@ namespace System {
             get { return GetMaxGeneration(); }
         }
 
+#if MONO
+        [MethodImplAttribute (MethodImplOptions.InternalCall)]
+        public extern static void WaitForPendingFinalizers ();
+#else
         [System.Security.SecurityCritical]  // auto-generated
         [ResourceExposure(ResourceScope.None)]
         [DllImport(JitHelpers.QCall, CharSet = CharSet.Unicode)]
         [SuppressUnmanagedCodeSecurity]
         private static extern void _WaitForPendingFinalizers();
 
+
         [System.Security.SecuritySafeCritical]  // auto-generated
         public static void WaitForPendingFinalizers() {
             // QCalls can not be exposed from mscorlib directly, need to wrap it.
             _WaitForPendingFinalizers();
         }
+#endif
     
         // Indicates that the system should not call the Finalize() method on
         // an object that would normally require this call.
@@ -380,6 +439,31 @@ namespace System {
         // the GC heap.  This does not return the total size of the GC heap, but
         // only the live objects in the GC heap.
         //
+#if MONO
+        [MethodImplAttribute (MethodImplOptions.InternalCall)]
+        public extern static long GetTotalMemory (bool forceFullCollection);
+
+        static bool _RegisterForFullGCNotification(int maxGenerationPercentage, int largeObjectHeapPercentage)
+        {
+            throw new NotImplementedException ();
+        }
+
+        static bool _CancelFullGCNotification ()
+        {
+            throw new NotImplementedException ();
+        }
+
+        static int _WaitForFullGCApproach (int millisecondsTimeout)
+        {
+            throw new NotImplementedException ();
+        }
+
+        static int _WaitForFullGCComplete (int millisecondsTimeout)
+        {
+            throw new NotImplementedException ();
+        }
+
+#else 
         [System.Security.SecuritySafeCritical]  // auto-generated
         public static long GetTotalMemory(bool forceFullCollection) {
             long size = GetTotalMemory();
@@ -416,6 +500,7 @@ namespace System {
 
         [MethodImplAttribute(MethodImplOptions.InternalCall)]
         private static extern int _WaitForFullGCComplete(int millisecondsTimeout);
+#endif
 
         [SecurityCritical]
         public static void RegisterForFullGCNotification(int maxGenerationThreshold, int largeObjectHeapThreshold)
@@ -503,6 +588,9 @@ namespace System {
         [SecurityCritical]
         static bool StartNoGCRegionWorker(long totalSize, bool hasLohSize, long lohSize, bool disallowFullBlockingGC)
         {
+#if MONO
+            throw new NotImplementedException ();
+#else
             StartNoGCRegionStatus status = (StartNoGCRegionStatus)_StartNoGCRegion(totalSize, hasLohSize, lohSize, disallowFullBlockingGC);
             if (status == StartNoGCRegionStatus.AmountTooLarge)
                 throw new ArgumentOutOfRangeException("totalSize", 
@@ -512,6 +600,7 @@ namespace System {
             else if (status == StartNoGCRegionStatus.NotEnoughMemory)
                 return false;
             return true;
+#endif
         }
 
         [SecurityCritical]
@@ -541,6 +630,9 @@ namespace System {
         [SecurityCritical]
         static EndNoGCRegionStatus EndNoGCRegionWorker()
         {
+#if MONO
+            throw new NotImplementedException ();
+#else
             EndNoGCRegionStatus status = (EndNoGCRegionStatus)_EndNoGCRegion();
             if (status == EndNoGCRegionStatus.NotInProgress)
                 throw new InvalidOperationException("NoGCRegion mode must be set");
@@ -550,6 +642,7 @@ namespace System {
                 throw new InvalidOperationException("Allocated memory exceeds specified memory for NoGCRegion mode");
 
             return EndNoGCRegionStatus.Succeeded;
+#endif
         }
 
         [SecurityCritical]
diff --git a/mcs/errors/cs0219-7.cs b/mcs/errors/cs0219-7.cs
new file mode 100644 (file)
index 0000000..ca40a59
--- /dev/null
@@ -0,0 +1,11 @@
+// CS0219: The constant `C' is never used
+// Line: 9
+// Compiler options: -warn:3 -warnaserror
+
+class C
+{
+       public static void Main ()
+       {
+               const int C = 1;
+       }
+}
\ No newline at end of file
index 60073b9f4c1338929c6098c9a28f861d36534132..9518427e1a17c1fe1499516410ea4c9fde28a893 100644 (file)
@@ -142,6 +142,7 @@ namespace Mono.CSharp
                        compiled_types = new Dictionary<MetaType, TypeSpec> (40, ReferenceEquality<MetaType>.Default);
                        assembly_2_definition = new Dictionary<Assembly, IAssemblyDefinition> (ReferenceEquality<Assembly>.Default);
                        IgnorePrivateMembers = true;
+                       IgnoreCompilerGeneratedField = true;
                }
 
                #region Properties
@@ -154,6 +155,8 @@ namespace Mono.CSharp
 
                public bool IgnorePrivateMembers { get; set; }
 
+               public bool IgnoreCompilerGeneratedField { get; set; }
+
                #endregion
 
                public abstract void AddCompiledType (TypeBuilder builder, TypeSpec spec);
@@ -179,8 +182,10 @@ namespace Mono.CSharp
                                        break;
                                default:
                                        // Ignore private fields (even for error reporting) to not require extra dependencies
-                                       if ((IgnorePrivateMembers && !declaringType.IsStruct) ||
-                                               HasAttribute (CustomAttributeData.GetCustomAttributes (fi), "CompilerGeneratedAttribute", CompilerServicesNamespace))
+                                       if (IgnorePrivateMembers && !declaringType.IsStruct)
+                                               return null;
+
+                                       if (IgnoreCompilerGeneratedField && HasAttribute (CustomAttributeData.GetCustomAttributes (fi), "CompilerGeneratedAttribute", CompilerServicesNamespace))
                                                return null;
 
                                        mod = Modifiers.PRIVATE;
index 8036f2c1126a56319198464e021386325110ca10..6b1990e1f0983d87bd8b91d0f60dee7efe51129c 100644 (file)
@@ -1210,12 +1210,11 @@ namespace Mono.CSharp
 
                        backing_field = new Field (Parent,
                                new TypeExpression (MemberType, Location),
-                               Modifiers.BACKING_FIELD | Modifiers.COMPILER_GENERATED | Modifiers.PRIVATE | (ModFlags & (Modifiers.STATIC | Modifiers.UNSAFE)),
+                               Modifiers.BACKING_FIELD | Modifiers.COMPILER_GENERATED | Modifiers.DEBUGGER_HIDDEN | Modifiers.PRIVATE | (ModFlags & (Modifiers.STATIC | Modifiers.UNSAFE)),
                                MemberName, null);
 
                        Parent.PartialContainer.Members.Add (backing_field);
                        backing_field.Initializer = Initializer;
-                       backing_field.ModFlags &= ~Modifiers.COMPILER_GENERATED;
 
                        // Call define because we passed fields definition
                        backing_field.Define ();
index 6b658945ff30c30261efeadb5015965883c92a6a..b644e126dc1cecfab235cb03d5bac052d7c0b74e 100644 (file)
@@ -2280,6 +2280,9 @@ namespace Mono.CSharp {
 
                public override void Emit (EmitContext ec)
                {
+                       if (!Variable.IsUsed)
+                               ec.Report.Warning (219, 3, loc, "The constant `{0}' is never used", Variable.Name);
+                       
                        // Nothing to emit, not even sequence point
                }
 
@@ -2438,6 +2441,12 @@ namespace Mono.CSharp {
                        }
                }
 
+               public bool IsUsed {
+                       get {
+                               return (flags & Flags.Used) != 0;
+                       }
+               }
+
                public bool IsFixed {
                        get {
                                return (flags & Flags.FixedVariable) != 0;
@@ -2527,8 +2536,10 @@ namespace Mono.CSharp {
 
                public Expression CreateReferenceExpression (ResolveContext rc, Location loc)
                {
-                       if (IsConstant && const_value != null)
+                       if (IsConstant && const_value != null) {
+                               SetIsUsed ();
                                return Constant.CreateConstantFromValue (Type, const_value.GetValue (), loc);
+                       }
 
                        return new LocalVariableReference (this, loc);
                }
index 1971d2f4e4812fa82feb8fbed1c666537ce0a723..36453ea86b397061250c48d9d7b086bc1dca1d8d 100644 (file)
@@ -1,5 +1,6 @@
 using System;
 using System.Reflection;
+using System.Runtime.CompilerServices;
 
 [assembly: Test]
 
@@ -130,7 +131,8 @@ public class ClassMain
                Assert (ei.GetRemoveMethod ().GetCustomAttributes (true), false, 44);
                Assert (ei.GetRemoveMethod ().ReturnTypeCustomAttributes.GetCustomAttributes (true), false, 45);
                FieldInfo fi = typeof(Test_3).GetField ("e_1", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance);
-               Assert (fi.GetCustomAttributes (true), true, 46);
+               Assert (fi.GetCustomAttributes (typeof (CompilerGeneratedAttribute), true), true, 46);
+               Assert (fi.GetCustomAttributes (typeof (TestAttribute), true), true, 47);
 
                ei = typeof(Test_3).GetEvent ("e_2");
                Assert (ei.GetCustomAttributes (true), false, 51);
@@ -139,7 +141,8 @@ public class ClassMain
                Assert (ei.GetRemoveMethod ().GetCustomAttributes (true), true, 54);
                Assert (ei.GetRemoveMethod ().ReturnTypeCustomAttributes.GetCustomAttributes (true), false, 55);
                fi = typeof(Test_3).GetField ("e_2", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance);
-               Assert (fi.GetCustomAttributes (true), false, 56);
+               Assert (fi.GetCustomAttributes (typeof (CompilerGeneratedAttribute), true), true, 56);
+               Assert (fi.GetCustomAttributes (typeof (TestAttribute), true), false, 57);
 
                ei = typeof(Test_4).GetEvent ("e_2");
                Assert (ei.GetCustomAttributes (true), false, 71);
@@ -148,7 +151,8 @@ public class ClassMain
                Assert (ei.GetRemoveMethod ().GetCustomAttributes (true), false, 74);
                Assert (ei.GetRemoveMethod ().ReturnTypeCustomAttributes.GetCustomAttributes (true), true, 75);
                fi = typeof(Test_3).GetField ("e_2", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance);
-               Assert (fi.GetCustomAttributes (true), false, 76);
+               Assert (fi.GetCustomAttributes (typeof (CompilerGeneratedAttribute), true), true, 76);
+               Assert (fi.GetCustomAttributes (typeof (TestAttribute), true), false, 77);
 
                ei = typeof(Test_4).GetEvent ("e_3");
                Assert (ei.GetCustomAttributes (true), false, 81);
@@ -159,7 +163,8 @@ public class ClassMain
                Assert (ei.GetRemoveMethod ().ReturnTypeCustomAttributes.GetCustomAttributes (true), false, 86);
                Assert (ei.GetRemoveMethod ().GetParameters ()[0].GetCustomAttributes (true), true, 87);
                fi = typeof(Test_3).GetField ("e_2", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance);
-               Assert (fi.GetCustomAttributes (true), false, 88);
+               Assert (fi.GetCustomAttributes (typeof (CompilerGeneratedAttribute), true), true, 86);
+               Assert (fi.GetCustomAttributes (typeof (TestAttribute), true), false, 87);
 
                return failed ? 1 : 0;
        }
index 0cbfab7639446a263dbd2ddf710b6179d65babaa..df5884f7fe914d2177021945f3f5aebe91ca4cc1 100644 (file)
         <size>80</size>
       </method>
       <method name="Int32 Main()" attrs="150">
-        <size>1169</size>
+        <size>1309</size>
       </method>
       <method name="Void .ctor()" attrs="6278">
         <size>7</size>
index f98314ecec7afb9db0957bb70edde80431c647b9..ff66d61364ca057147d7539772b5b7286c5628ea 100644 (file)
@@ -2,8 +2,8 @@ thisdir = tools/gacutil
 SUBDIRS = 
 include ../../build/rules.make
 
-LIB_REFS = Mono.Security
-LOCAL_MCS_FLAGS = -unsafe
+LIB_REFS = System Mono.Security System.Security
+LOCAL_MCS_FLAGS = -unsafe -define:NO_SYMBOL_WRITER
 
 PROGRAM = gacutil.exe
 
index 13f686e22c64ec5dadc09c136838db3ed7c74a43..47c4ac8df96bd44da12af6c98d5309da235cbc89 100644 (file)
@@ -14,7 +14,6 @@ using System;
 using System.IO;
 using System.Diagnostics;
 using System.Text;
-using System.Reflection;
 using System.Collections;
 using System.Globalization;
 using System.Runtime.InteropServices;
@@ -23,6 +22,8 @@ using System.Security.Cryptography;
 using Mono.Security;
 using Mono.Security.Cryptography;
 
+using IKVM.Reflection;
+
 namespace Mono.Tools {
 
        public class Driver {
@@ -48,6 +49,7 @@ namespace Mono.Tools {
 
                private static bool silent;
                static bool in_bootstrap;
+               private static Universe _universe;
 
                public static int Main (string [] args)
                {
@@ -244,7 +246,7 @@ namespace Mono.Tools {
                        AssemblyName an = null;
 
                        try {
-                               assembly = Assembly.LoadFrom (name);
+                               assembly = ReflectionOnlyLoadFrom (name);
                        } catch {
                                WriteLine (string.Format (failure_msg, name) + "The file specified is not a valid assembly.");
                                return false;
@@ -744,12 +746,27 @@ namespace Mono.Tools {
                        }
                }
 
+               private static Universe GetUniverse () {
+                       if (_universe == null) {
+                               _universe = new Universe (UniverseOptions.MetadataOnly);
+                       }
+                       return _universe;
+               }
+
+               private static Assembly ReflectionOnlyLoadFrom (string fileName)
+               {
+                       return GetUniverse ().LoadFile (fileName);
+               }
+               private static AssemblyName GetCorlibName ()
+               {
+                       return GetUniverse ().Mscorlib.GetName ();
+               }
+
                private static bool CheckReferencedAssemblies (AssemblyName an)
                {
-                       AppDomain d = null;
                        try {
-                               Assembly a = Assembly.LoadFrom (an.CodeBase);
-                               AssemblyName corlib = typeof (object).Assembly.GetName ();
+                               Assembly a = ReflectionOnlyLoadFrom (an.CodeBase);
+                               AssemblyName corlib = GetCorlibName ();
 
                                foreach (AssemblyName ref_an in a.GetReferencedAssemblies ()) {
                                        if (ref_an.Name == corlib.Name) // Just do a string compare so we can install on diff versions
@@ -763,12 +780,6 @@ namespace Mono.Tools {
                        } catch (Exception e) {
                                WriteLine (e.ToString ()); // This should be removed pre beta3
                                return false;
-                       } finally {
-                               if (d != null) {
-                                       try {
-                                               AppDomain.Unload (d);
-                                       } catch { }
-                               }
                        }
 
                        return true;
@@ -800,8 +811,8 @@ namespace Mono.Tools {
 
                static bool LoadConfig (bool quiet)
                {
-                       MethodInfo config = typeof (System.Environment).GetMethod ("GetMachineConfigPath",
-                               BindingFlags.Static | BindingFlags.NonPublic);
+                       System.Reflection.MethodInfo config = typeof (System.Environment).GetMethod ("GetMachineConfigPath",
+                               System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic);
 
                        if (config != null) {
                                string path = (string) config.Invoke (null, null);
@@ -832,7 +843,7 @@ namespace Mono.Tools {
 
                        // Note: MustVerify is based on the original token (by design). Public key
                        // remapping won't affect if the assembly is verified or not.
-                       if (StrongNameManager.MustVerify (an)) {
+                       if (StrongNameManager.MustVerify (new System.Reflection.AssemblyName (an.FullName))) {
                                RSA rsa = CryptoConvert.FromCapiPublicKeyBlob (publicKey, 12);
                                StrongName sn = new StrongName (rsa);
                                if (sn.Verify (assemblyFile)) {
@@ -899,20 +910,20 @@ namespace Mono.Tools {
                public static extern int symlink (string oldpath, string newpath);
 
                private static string GetGacDir () {
-                       PropertyInfo gac = typeof (System.Environment).GetProperty ("GacPath",
-                                       BindingFlags.Static|BindingFlags.NonPublic);
+                       System.Reflection.PropertyInfo gac = typeof (System.Environment).GetProperty ("GacPath",
+                                       System.Reflection.BindingFlags.Static|System.Reflection.BindingFlags.NonPublic);
                        if (gac == null) {
                                WriteLine ("ERROR: Mono runtime not detected, please use " +
                                                "the mono runtime for gacutil.exe");
                                Environment.Exit (1);
                        }
-                       MethodInfo get_gac = gac.GetGetMethod (true);
+                       System.Reflection.MethodInfo get_gac = gac.GetGetMethod (true);
                        return (string) get_gac.Invoke (null, null);
                }
 
                private static string GetLibDir () {
-                       MethodInfo libdir = typeof (System.Environment).GetMethod ("internalGetGacPath",
-                                       BindingFlags.Static|BindingFlags.NonPublic);
+                       System.Reflection.MethodInfo libdir = typeof (System.Environment).GetMethod ("internalGetGacPath",
+                                       System.Reflection.BindingFlags.Static|System.Reflection.BindingFlags.NonPublic);
                        if (libdir == null) {
                                WriteLine ("ERROR: Mono runtime not detected, please use " +
                                                "the mono runtime for gacutil.exe");
index 911afaf9d8219cd369a76a6269e559c1429cd238..4772378b43cb3ad9898901b636de031cacd48cbc 100644 (file)
@@ -1,2 +1,9 @@
 driver.cs
 ../security/StrongNameManager.cs
+../../../external/ikvm/reflect/*.cs
+../../../external/ikvm/reflect/Metadata/*.cs
+../../../external/ikvm/reflect/Emit/*.cs
+../../../external/ikvm/reflect/Reader/*.cs
+../../../external/ikvm/reflect/Writer/*.cs
+../../../external/ikvm/reflect/Impl/ITypeOwner.cs
+../../../external/ikvm/reflect/Impl/SymbolSupport.cs
index 884bea5a114ff7b5c0f82e9ff1f912cd0d0bce52..2913fe806d04da0f3a9591c61c0389d0aaf040b9 100644 (file)
@@ -5,9 +5,9 @@ include ../../build/rules.make
 PROGRAM = mono-symbolicate.exe
 
 LOCAL_MCS_FLAGS = \
-       /D:NO_AUTHENTICODE
+       /D:NO_AUTHENTICODE /D:CECIL
 
-LIB_REFS = Mono.Cecil Mono.Cecil.Mdb System.Xml System.Core System
+LIB_REFS = System.Xml System.Core System
 
 include ../../build/executable.make
 
index 6cb8042e9c528e3bbcb3dd6b6710452a9dce37df..57e354026a2d88afdc2b205dbd7e284da9575ba5 100644 (file)
@@ -5,3 +5,97 @@ StackFrameData.cs
 SymbolManager.cs
 Logger.cs
 ../../class/Mono.Options/Mono.Options/Options.cs
+
+../../../external/cecil/Mono/*.cs
+../../../external/cecil/Mono.Cecil/ArrayType.cs
+../../../external/cecil/Mono.Cecil/AssemblyDefinition.cs
+../../../external/cecil/Mono.Cecil/AssemblyFlags.cs
+../../../external/cecil/Mono.Cecil/AssemblyHashAlgorithm.cs
+../../../external/cecil/Mono.Cecil/AssemblyLinkedResource.cs
+../../../external/cecil/Mono.Cecil/AssemblyNameDefinition.cs
+../../../external/cecil/Mono.Cecil/AssemblyNameReference.cs
+../../../external/cecil/Mono.Cecil/AssemblyReader.cs
+../../../external/cecil/Mono.Cecil/AssemblyWriter.cs
+../../../external/cecil/Mono.Cecil/BaseAssemblyResolver.cs
+../../../external/cecil/Mono.Cecil/CallSite.cs
+../../../external/cecil/Mono.Cecil/CustomAttribute.cs
+../../../external/cecil/Mono.Cecil/DefaultAssemblyResolver.cs
+../../../external/cecil/Mono.Cecil/EmbeddedResource.cs
+../../../external/cecil/Mono.Cecil/EventAttributes.cs
+../../../external/cecil/Mono.Cecil/EventDefinition.cs
+../../../external/cecil/Mono.Cecil/EventReference.cs
+../../../external/cecil/Mono.Cecil/ExportedType.cs
+../../../external/cecil/Mono.Cecil/FieldAttributes.cs
+../../../external/cecil/Mono.Cecil/FieldDefinition.cs
+../../../external/cecil/Mono.Cecil/FieldReference.cs
+../../../external/cecil/Mono.Cecil/FileAttributes.cs
+../../../external/cecil/Mono.Cecil/FunctionPointerType.cs
+../../../external/cecil/Mono.Cecil/GenericInstanceMethod.cs
+../../../external/cecil/Mono.Cecil/GenericInstanceType.cs
+../../../external/cecil/Mono.Cecil/GenericParameter.cs
+../../../external/cecil/Mono.Cecil/GenericParameterAttributes.cs
+../../../external/cecil/Mono.Cecil/IConstantProvider.cs
+../../../external/cecil/Mono.Cecil/ICustomAttributeProvider.cs
+../../../external/cecil/Mono.Cecil/IGenericInstance.cs
+../../../external/cecil/Mono.Cecil/IGenericParameterProvider.cs
+../../../external/cecil/Mono.Cecil/IMarshalInfoProvider.cs
+../../../external/cecil/Mono.Cecil/IMemberDefinition.cs
+../../../external/cecil/Mono.Cecil/IMetadataScope.cs
+../../../external/cecil/Mono.Cecil/IMetadataTokenProvider.cs
+../../../external/cecil/Mono.Cecil/IMethodSignature.cs
+../../../external/cecil/Mono.Cecil/Import.cs
+../../../external/cecil/Mono.Cecil/LinkedResource.cs
+../../../external/cecil/Mono.Cecil/ManifestResourceAttributes.cs
+../../../external/cecil/Mono.Cecil/MarshalInfo.cs
+../../../external/cecil/Mono.Cecil/MemberDefinitionCollection.cs
+../../../external/cecil/Mono.Cecil/MemberReference.cs
+../../../external/cecil/Mono.Cecil/MetadataResolver.cs
+../../../external/cecil/Mono.Cecil/MetadataSystem.cs
+../../../external/cecil/Mono.Cecil/MethodAttributes.cs
+../../../external/cecil/Mono.Cecil/MethodCallingConvention.cs
+../../../external/cecil/Mono.Cecil/MethodDefinition.cs
+../../../external/cecil/Mono.Cecil/MethodImplAttributes.cs
+../../../external/cecil/Mono.Cecil/MethodReference.cs
+../../../external/cecil/Mono.Cecil/MethodReturnType.cs
+../../../external/cecil/Mono.Cecil/MethodSemanticsAttributes.cs
+../../../external/cecil/Mono.Cecil/MethodSpecification.cs
+../../../external/cecil/Mono.Cecil/Modifiers.cs
+../../../external/cecil/Mono.Cecil/ModuleDefinition.cs
+../../../external/cecil/Mono.Cecil/ModuleKind.cs
+../../../external/cecil/Mono.Cecil/ModuleReference.cs
+../../../external/cecil/Mono.Cecil/NativeType.cs
+../../../external/cecil/Mono.Cecil/ParameterAttributes.cs
+../../../external/cecil/Mono.Cecil/ParameterDefinition.cs
+../../../external/cecil/Mono.Cecil/ParameterDefinitionCollection.cs
+../../../external/cecil/Mono.Cecil/ParameterReference.cs
+../../../external/cecil/Mono.Cecil/PinnedType.cs
+../../../external/cecil/Mono.Cecil/PInvokeAttributes.cs
+../../../external/cecil/Mono.Cecil/PInvokeInfo.cs
+../../../external/cecil/Mono.Cecil/PointerType.cs
+../../../external/cecil/Mono.Cecil/PropertyAttributes.cs
+../../../external/cecil/Mono.Cecil/PropertyDefinition.cs
+../../../external/cecil/Mono.Cecil/PropertyReference.cs
+../../../external/cecil/Mono.Cecil/ReferenceType.cs
+../../../external/cecil/Mono.Cecil/Resource.cs
+../../../external/cecil/Mono.Cecil/SecurityDeclaration.cs
+../../../external/cecil/Mono.Cecil/SentinelType.cs
+../../../external/cecil/Mono.Cecil/TargetRuntime.cs
+../../../external/cecil/Mono.Cecil/Treatments.cs
+../../../external/cecil/Mono.Cecil/TypeAttributes.cs
+../../../external/cecil/Mono.Cecil/TypeDefinition.cs
+../../../external/cecil/Mono.Cecil/TypeDefinitionCollection.cs
+../../../external/cecil/Mono.Cecil/TypeParser.cs
+../../../external/cecil/Mono.Cecil/TypeReference.cs
+../../../external/cecil/Mono.Cecil/TypeSpecification.cs
+../../../external/cecil/Mono.Cecil/TypeSystem.cs
+../../../external/cecil/Mono.Cecil/VariantType.cs
+../../../external/cecil/Mono.Cecil/WindowsRuntimeProjections.cs
+../../../external/cecil/Mono.Cecil.Cil/*.cs
+../../../external/cecil/Mono.Cecil.Metadata/*.cs
+../../../external/cecil/Mono.Cecil.PE/*.cs
+../../../external/cecil/Mono.Collections.Generic/*.cs
+../../../external/cecil/Mono.Security.Cryptography/*.cs
+../../../external/cecil/System.Security.Cryptography/*.cs
+../../../external/cecil/symbols/mdb/Mono.Cecil.Mdb/MdbReader.cs
+../../../external/cecil/symbols/mdb/Mono.Cecil.Mdb/MdbWriter.cs
+../../../external/cecil/symbols/mdb/Mono.CompilerServices.SymbolWriter/*.cs
index 1af061c383ad8b58abc1d42a636c8b4de55d26b1..53de00ae71577c4a902472c6a2448a648608bf62 100644 (file)
@@ -32,6 +32,7 @@
 #include <mono/metadata/assembly.h>
 #include <mono/metadata/appdomain.h>
 #include <mono/utils/bsearch.h>
+#include <mono/utils/mono-counters.h>
 
 static void     setup_filter          (MonoImage *image);
 static gboolean should_include_type   (int idx);
@@ -1963,9 +1964,16 @@ usage (void)
        exit (1);
 }
 
+static void
+thread_state_init (MonoThreadUnwindState *ctx)
+{
+}
+
 int
 main (int argc, char *argv [])
 {
+       MonoThreadInfoRuntimeCallbacks ticallbacks;
+
        GList *input_files = NULL, *l;
        int i, j;
 
@@ -2016,6 +2024,15 @@ main (int argc, char *argv [])
        if (input_files == NULL)
                usage ();
 
+       CHECKED_MONO_INIT ();
+       mono_counters_init ();
+       memset (&ticallbacks, 0, sizeof (ticallbacks));
+       ticallbacks.thread_state_init = thread_state_init;
+#ifndef HOST_WIN32
+       mono_w32handle_init ();
+#endif
+       mono_threads_runtime_init (&ticallbacks);
+
        mono_install_assembly_load_hook (monodis_assembly_load_hook, NULL);
        mono_install_assembly_search_hook (monodis_assembly_search_hook, NULL);
 
index 789eb27977ddd0eb1456a3d00a6a1bdacf7fa5d0..13a545a67bb6b3f49605702a3fa52f135c822ee0 100644 (file)
@@ -84,7 +84,7 @@
  * Changes which are already detected at runtime, like the addition
  * of icalls, do not require an increment.
  */
-#define MONO_CORLIB_VERSION 155
+#define MONO_CORLIB_VERSION 156
 
 typedef struct
 {
diff --git a/mono/metadata/assembly-internals.h b/mono/metadata/assembly-internals.h
new file mode 100644 (file)
index 0000000..5af7bd6
--- /dev/null
@@ -0,0 +1,12 @@
+/*
+ * Copyright 2015 Xamarin Inc
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
+ */
+#ifndef __MONO_METADATA_ASSEMBLY_INTERNALS_H__
+#define __MONO_METADATA_ASSEMBLY_INTERNALS_H__
+
+#include <mono/metadata/assembly.h>
+
+MONO_API MonoImage*    mono_assembly_load_module_checked (MonoAssembly *assembly, uint32_t idx, MonoError *error);
+
+#endif /* __MONO_METADATA_ASSEMBLY_INTERNALS_H__ */
index af7cd6dfaa165462cfe81477fd198930b0464e9e..64d1000bbb63b8f896164af207e176969b6ece3c 100644 (file)
@@ -16,7 +16,9 @@
 #include <string.h>
 #include <stdlib.h>
 #include "assembly.h"
+#include "assembly-internals.h"
 #include "image.h"
+#include "image-internals.h"
 #include "object-internals.h"
 #include <mono/metadata/loader.h>
 #include <mono/metadata/tabledefs.h>
@@ -3433,9 +3435,19 @@ mono_assembly_close (MonoAssembly *assembly)
 MonoImage*
 mono_assembly_load_module (MonoAssembly *assembly, guint32 idx)
 {
-       return mono_image_load_file_for_image (assembly->image, idx);
+       MonoError error;
+       MonoImage *result = mono_assembly_load_module_checked (assembly, idx, &error);
+       mono_error_assert_ok (&error);
+       return result;
 }
 
+MONO_API MonoImage*
+mono_assembly_load_module_checked (MonoAssembly *assembly, uint32_t idx, MonoError *error)
+{
+       return mono_image_load_file_for_image_checked (assembly->image, idx, error);
+}
+
+
 /**
  * mono_assembly_foreach:
  * @func: function to invoke for each assembly loaded
index bdf3d75f62cad49400ac2545f601d00fbfdef79f..b414971e171dd40e479f0a4e7198fdf1691fbf0b 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef _MONONET_METADATA_ASSEMBLY_H_ 
 #define _MONONET_METADATA_ASSEMBLY_H_
 
+#include <mono/utils/mono-error.h>
 #include <mono/metadata/image.h>
 
 MONO_BEGIN_DECLS
@@ -32,7 +33,7 @@ MONO_API MonoAssembly* mono_assembly_loaded_full (MonoAssemblyName *aname, mono_
 MONO_API void          mono_assembly_get_assemblyref (MonoImage *image, int index, MonoAssemblyName *aname);
 MONO_API void          mono_assembly_load_reference (MonoImage *image, int index);
 MONO_API void          mono_assembly_load_references (MonoImage *image, MonoImageOpenStatus *status);
-MONO_API MonoImage*    mono_assembly_load_module (MonoAssembly *assembly, uint32_t idx);
+MONO_RT_EXTERNAL_ONLY MONO_API MonoImage*    mono_assembly_load_module (MonoAssembly *assembly, uint32_t idx);
 MONO_API void          mono_assembly_close      (MonoAssembly *assembly);
 MONO_API void          mono_assembly_setrootdir (const char *root_dir);
 MONO_API MONO_CONST_RETURN char *mono_assembly_getrootdir (void);
index d3153d29967deb995f5d80da007197e6f7575475..d22f162085b376b1a0d7a64412e82acd8454b588 100644 (file)
@@ -58,6 +58,8 @@ boehm_thread_register (MonoThreadInfo* info, void *baseptr);
 static void
 boehm_thread_unregister (MonoThreadInfo *p);
 static void
+boehm_thread_detach (MonoThreadInfo *p);
+static void
 register_test_toggleref_callback (void);
 
 #define BOEHM_GC_BIT_FINALIZER_AWARE 1
@@ -236,6 +238,7 @@ mono_gc_base_init (void)
        memset (&cb, 0, sizeof (cb));
        cb.thread_register = boehm_thread_register;
        cb.thread_unregister = boehm_thread_unregister;
+       cb.thread_detach = boehm_thread_detach;
        cb.mono_method_is_critical = (gboolean (*)(void *))mono_runtime_is_critical_method;
 
        mono_threads_init (&cb, sizeof (MonoThreadInfo));
@@ -406,6 +409,13 @@ boehm_thread_unregister (MonoThreadInfo *p)
                mono_threads_add_joinable_thread ((gpointer)tid);
 }
 
+static void
+boehm_thread_detach (MonoThreadInfo *p)
+{
+       if (mono_thread_internal_current_is_attached ())
+               mono_thread_detach_internal (mono_thread_internal_current ());
+}
+
 gboolean
 mono_object_is_alive (MonoObject* o)
 {
index a419af381492313e250c7887c0217c26ea071269..6218589a88e3c47b96ecacfff2701e05e5035e7a 100644 (file)
@@ -18,7 +18,9 @@
 #include <string.h>
 #include <stdlib.h>
 #include <mono/metadata/image.h>
+#include <mono/metadata/image-internals.h>
 #include <mono/metadata/assembly.h>
+#include <mono/metadata/assembly-internals.h>
 #include <mono/metadata/metadata.h>
 #include <mono/metadata/metadata-internals.h>
 #include <mono/metadata/profiler-private.h>
@@ -216,7 +218,7 @@ mono_class_from_typeref_checked (MonoImage *image, guint32 type_token, MonoError
                goto done;
 
        case MONO_RESOLUTION_SCOPE_MODULEREF:
-               module = mono_image_load_module (image, idx);
+               module = mono_image_load_module_checked (image, idx, error);
                if (module)
                        res = mono_class_from_name_checked (module, nspace, name, error);
                goto done;
@@ -7813,7 +7815,7 @@ search_modules (MonoImage *image, const char *name_space, const char *name, Mono
                if (cols [MONO_FILE_FLAGS] == FILE_CONTAINS_NO_METADATA)
                        continue;
 
-               file_image = mono_image_load_file_for_image (image, i + 1);
+               file_image = mono_image_load_file_for_image_checked (image, i + 1, error);
                if (file_image) {
                        klass = mono_class_from_name_checked (file_image, name_space, name, error);
                        if (klass || !is_ok (error))
@@ -7909,7 +7911,7 @@ mono_class_from_name_checked_aux (MonoImage *image, const char* name_space, cons
 
                impl = cols [MONO_EXP_TYPE_IMPLEMENTATION];
                if ((impl & MONO_IMPLEMENTATION_MASK) == MONO_IMPLEMENTATION_FILE) {
-                       loaded_image = mono_assembly_load_module (image->assembly, impl >> MONO_IMPLEMENTATION_BITS);
+                       loaded_image = mono_assembly_load_module_checked (image->assembly, impl >> MONO_IMPLEMENTATION_BITS, error);
                        if (!loaded_image)
                                return NULL;
                        klass = mono_class_from_name_checked_aux (loaded_image, name_space, name, visited_images, error);
index 7c71dc55064e6cb13c8cfc7a79dd08640f67d0bd..0db3753440cda4e6774feaef1947c85a4338ebf8 100644 (file)
@@ -287,16 +287,16 @@ HANDLES(ICALL(ENV_19, "internalGetHome", ves_icall_System_Environment_InternalGe
 ICALL(ENV_20, "set_ExitCode", mono_environment_exitcode_set)
 
 ICALL_TYPE(GC, "System.GC", GC_0)
-ICALL(GC_0, "CollectionCount", mono_gc_collection_count)
+ICALL(GC_0, "GetCollectionCount", mono_gc_collection_count)
 ICALL(GC_0a, "GetGeneration", mono_gc_get_generation)
+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_4, "_ReRegisterForFinalize", ves_icall_System_GC_ReRegisterForFinalize)
 ICALL(GC_4a, "RecordPressure", mono_gc_add_memory_pressure)
-ICALL(GC_5, "SuppressFinalize", ves_icall_System_GC_SuppressFinalize)
 ICALL(GC_6, "WaitForPendingFinalizers", ves_icall_System_GC_WaitForPendingFinalizers)
-ICALL(GC_7, "get_MaxGeneration", mono_gc_max_generation)
+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 6403f1975e91d48c89fe2a8b4a70a8d04940e351..526ff5e075eb9d89ef3e46b5012820ca671fb064 100644 (file)
@@ -43,7 +43,9 @@
 #include <mono/metadata/threadpool-ms-io.h>
 #include <mono/metadata/monitor.h>
 #include <mono/metadata/reflection.h>
+#include <mono/metadata/image-internals.h>
 #include <mono/metadata/assembly.h>
+#include <mono/metadata/assembly-internals.h>
 #include <mono/metadata/tabledefs.h>
 #include <mono/metadata/exception.h>
 #include <mono/metadata/exception-internals.h>
@@ -984,11 +986,6 @@ ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_SufficientExecutionStac
        /* if we have no info we are optimistic and assume there is enough room */
        if (!stack_addr)
                return TRUE;
-#ifdef HOST_WIN32
-       // FIXME: Windows dynamically extends the stack, so stack_addr might be close
-       // to the current sp
-       return TRUE;
-#endif
        current = (guint8 *)&stack_addr;
        if (current > stack_addr) {
                if ((current - stack_addr) < min_size)
@@ -4830,8 +4827,8 @@ ves_icall_System_Reflection_Assembly_GetManifestResourceInternal (MonoReflection
                g_assert ((impl & MONO_IMPLEMENTATION_MASK) == MONO_IMPLEMENTATION_FILE);
                file_idx = impl >> MONO_IMPLEMENTATION_BITS;
 
-               module = mono_image_load_file_for_image (assembly->assembly->image, file_idx);
-               if (!module)
+               module = mono_image_load_file_for_image_checked (assembly->assembly->image, file_idx, &error);
+               if (mono_error_set_pending_exception (&error) || !module)
                        return NULL;
        }
        else
@@ -5031,7 +5028,9 @@ ves_icall_System_Reflection_Assembly_GetModulesInternal (MonoReflectionAssembly
                        mono_array_setref (res, j, rm);
                }
                else {
-                       MonoImage *m = mono_image_load_file_for_image (image, i + 1);
+                       MonoImage *m = mono_image_load_file_for_image_checked (image, i + 1, &error);
+                       if (mono_error_set_pending_exception (&error))
+                               return NULL;
                        if (!m) {
                                MonoString *fname = mono_string_new (mono_domain_get (), mono_metadata_string_heap (image, cols [MONO_FILE_NAME]));
                                mono_set_pending_exception (mono_get_exception_file_not_found2 (NULL, fname));
@@ -5555,7 +5554,9 @@ ves_icall_System_Reflection_Assembly_GetTypes (MonoReflectionAssembly *assembly,
        /* Append data from all modules in the assembly */
        for (i = 0; i < table->rows; ++i) {
                if (!(mono_metadata_decode_row_col (table, i, MONO_FILE_FLAGS) & FILE_CONTAINS_NO_METADATA)) {
-                       MonoImage *loaded_image = mono_assembly_load_module (image->assembly, i + 1);
+                       MonoImage *loaded_image = mono_assembly_load_module_checked (image->assembly, i + 1, &error);
+                       if (mono_error_set_pending_exception (&error))
+                               return NULL;
                        if (loaded_image) {
                                MonoArray *ex2;
                                MonoArray *res2;
index 959575f6a0a4a8c8996720693fd4a39d412b0c4a..6281e3b241c35eb37cbb5d1ead242c7ab41ccb16 100644 (file)
 MonoImage *
 mono_find_image_owner (void *ptr);
 
+MonoImage*
+mono_image_load_file_for_image_checked (MonoImage *image, int fileidx, MonoError *error);
+
+MonoImage*
+mono_image_load_module_checked (MonoImage *image, int idx, MonoError *error);
+
 #endif /* __MONO_METADATA_IMAGE_INTERNALS_H__ */
index 50eaded2e37279442560273998901d1e3cbb82ea..ae1b204ca26f65b5573719d0dd3604664f4f5f7c 100644 (file)
@@ -66,18 +66,43 @@ enum {
 };
 static GHashTable *loaded_images_hashes [4] = {NULL, NULL, NULL, NULL};
 
-static GHashTable *get_loaded_images_hash (gboolean refonly)
+static GHashTable *
+get_loaded_images_hash (gboolean refonly)
 {
        int idx = refonly ? IMAGES_HASH_PATH_REFONLY : IMAGES_HASH_PATH;
        return loaded_images_hashes [idx];
 }
 
-static GHashTable *get_loaded_images_by_name_hash (gboolean refonly)
+static GHashTable *
+get_loaded_images_by_name_hash (gboolean refonly)
 {
        int idx = refonly ? IMAGES_HASH_NAME_REFONLY : IMAGES_HASH_NAME;
        return loaded_images_hashes [idx];
 }
 
+// Change the assembly set in `image` to the assembly set in `assemblyImage`. Halt if overwriting is attempted.
+// Can be used on modules loaded through either the "file" or "module" mechanism
+static gboolean
+assign_assembly_parent_for_netmodule (MonoImage *image, MonoImage *assemblyImage, MonoError *error)
+{
+       // Assembly to assign
+       MonoAssembly *assembly = assemblyImage->assembly;
+
+       while (1) {
+               // Assembly currently assigned
+               MonoAssembly *assemblyOld = image->assembly;
+               if (assemblyOld) {
+                       if (assemblyOld == assembly)
+                               return TRUE;
+                       mono_error_set_bad_image (error, assemblyImage, "Attempted to load module %s which has already been loaded by assembly %s. This is not supported in Mono.", image->name, assemblyOld->image->name);
+                       return FALSE;
+               }
+               gpointer result = InterlockedExchangePointer((gpointer *)&image->assembly, assembly);
+               if (result == assembly)
+                       return TRUE;
+       }
+}
+
 static gboolean debug_assembly_unload = FALSE;
 
 #define mono_images_lock() if (mutex_inited) mono_os_mutex_lock (&images_mutex)
@@ -632,13 +657,13 @@ load_modules (MonoImage *image)
 }
 
 /**
- * mono_image_load_module:
+ * mono_image_load_module_checked:
  *
  *   Load the module with the one-based index IDX from IMAGE and return it. Return NULL if
- * it cannot be loaded.
+ * it cannot be loaded. NULL without MonoError being set will be interpreted as "not found".
  */
 MonoImage*
-mono_image_load_module (MonoImage *image, int idx)
+mono_image_load_module_checked (MonoImage *image, int idx, MonoError *error)
 {
        MonoTableInfo *t;
        MonoTableInfo *file_table;
@@ -648,6 +673,8 @@ mono_image_load_module (MonoImage *image, int idx)
        GList *list_iter, *valid_modules = NULL;
        MonoImageOpenStatus status;
 
+       mono_error_init (error);
+
        if ((image->module_count == 0) || (idx > image->module_count || idx <= 0))
                return NULL;
        if (image->modules_loaded [idx - 1])
@@ -683,10 +710,18 @@ mono_image_load_module (MonoImage *image, int idx)
                }
                if (valid) {
                        module_ref = g_build_filename (base_dir, name, NULL);
-                       image->modules [idx - 1] = mono_image_open_full (module_ref, &status, refonly);
-                       if (image->modules [idx - 1]) {
-                               mono_image_addref (image->modules [idx - 1]);
-                               image->modules [idx - 1]->assembly = image->assembly;
+                       MonoImage *moduleImage = mono_image_open_full (module_ref, &status, refonly);
+                       if (moduleImage) {
+                               if (!assign_assembly_parent_for_netmodule (moduleImage, image, error)) {
+                                       mono_image_close (moduleImage);
+                                       g_free (module_ref);
+                                       g_free (base_dir);
+                                       g_list_free (valid_modules);
+                                       return NULL;
+                               }
+
+                               image->modules [idx - 1] = image;
+
 #ifdef HOST_WIN32
                                if (image->modules [idx - 1]->is_module_handle)
                                        mono_image_fixup_vtable (image->modules [idx - 1]);
@@ -705,6 +740,15 @@ mono_image_load_module (MonoImage *image, int idx)
        return image->modules [idx - 1];
 }
 
+MonoImage*
+mono_image_load_module (MonoImage *image, int idx)
+{
+       MonoError error;
+       MonoImage *result = mono_image_load_module_checked (image, idx, &error);
+       mono_error_assert_ok (&error);
+       return result;
+}
+
 static gpointer
 class_key_extract (gpointer value)
 {
@@ -1653,6 +1697,17 @@ mono_wrapper_caches_free (MonoWrapperCaches *cache)
        free_hash (cache->thunk_invoke_cache);
 }
 
+static void
+mono_image_close_except_pools_all (MonoImage**images, int image_count)
+{
+       for (int i = 0; i < image_count; ++i) {
+               if (images [i]) {
+                       if (!mono_image_close_except_pools (images [i]))
+                               images [i] = NULL;
+               }
+       }
+}
+
 /*
  * Returns whether mono_image_close_finish() must be called as well.
  * We must unload images in two steps because clearing the domain in
@@ -1773,7 +1828,6 @@ mono_image_close_except_pools (MonoImage *image)
                g_free (image->name);
                g_free (image->guid);
                g_free (image->version);
-               g_free (image->files);
        }
 
        if (image->method_cache)
@@ -1852,12 +1906,8 @@ mono_image_close_except_pools (MonoImage *image)
                g_free (image->image_info);
        }
 
-       for (i = 0; i < image->module_count; ++i) {
-               if (image->modules [i]) {
-                       if (!mono_image_close_except_pools (image->modules [i]))
-                               image->modules [i] = NULL;
-               }
-       }
+       mono_image_close_except_pools_all (image->files, image->file_count);
+       mono_image_close_except_pools_all (image->modules, image->module_count);
        if (image->modules_loaded)
                g_free (image->modules_loaded);
 
@@ -1876,6 +1926,17 @@ mono_image_close_except_pools (MonoImage *image)
        return TRUE;
 }
 
+static void
+mono_image_close_all (MonoImage**images, int image_count)
+{
+       for (int i = 0; i < image_count; ++i) {
+               if (images [i])
+                       mono_image_close_finish (images [i]);
+       }
+       if (images)
+               g_free (images);
+}
+
 void
 mono_image_close_finish (MonoImage *image)
 {
@@ -1891,12 +1952,8 @@ mono_image_close_finish (MonoImage *image)
                image->references = NULL;
        }
 
-       for (i = 0; i < image->module_count; ++i) {
-               if (image->modules [i])
-                       mono_image_close_finish (image->modules [i]);
-       }
-       if (image->modules)
-               g_free (image->modules);
+       mono_image_close_all (image->files, image->file_count);
+       mono_image_close_all (image->modules, image->module_count);
 
 #ifndef DISABLE_PERFCOUNTERS
        mono_perfcounters->loader_bytes -= mono_mempool_get_allocated (image->mempool);
@@ -2153,8 +2210,9 @@ mono_image_get_resource (MonoImage *image, guint32 offset, guint32 *size)
        return data;
 }
 
+// Returning NULL with no error set will be interpeted as "not found"
 MonoImage*
-mono_image_load_file_for_image (MonoImage *image, int fileidx)
+mono_image_load_file_for_image_checked (MonoImage *image, int fileidx, MonoError *error)
 {
        char *base_dir, *name;
        MonoImage *res;
@@ -2162,6 +2220,8 @@ mono_image_load_file_for_image (MonoImage *image, int fileidx)
        const char *fname;
        guint32 fname_id;
 
+       mono_error_init (error);
+
        if (fileidx < 1 || fileidx > t->rows)
                return NULL;
 
@@ -2189,14 +2249,21 @@ mono_image_load_file_for_image (MonoImage *image, int fileidx)
        } else {
                int i;
                /* g_print ("loaded file %s from %s (%p)\n", name, image->name, image->assembly); */
-               res->assembly = image->assembly;
+               if (!assign_assembly_parent_for_netmodule (res, image, error)) {
+                       mono_image_unlock (image);
+                       mono_image_close (res);
+                       return NULL;
+               }
+
                for (i = 0; i < res->module_count; ++i) {
                        if (res->modules [i] && !res->modules [i]->assembly)
                                res->modules [i]->assembly = image->assembly;
                }
 
-               if (!image->files)
+               if (!image->files) {
                        image->files = g_new0 (MonoImage*, t->rows);
+                       image->file_count = t->rows;
+               }
                image->files [fileidx - 1] = res;
                mono_image_unlock (image);
                /* vtable fixup can't happen with the image lock held */
@@ -2212,6 +2279,15 @@ done:
        return res;
 }
 
+MonoImage*
+mono_image_load_file_for_image (MonoImage *image, int fileidx)
+{
+       MonoError error;
+       MonoImage *result = mono_image_load_file_for_image_checked (image, fileidx, &error);
+       mono_error_assert_ok (&error);
+       return result;
+}
+
 /**
  * mono_image_get_strong_name:
  * @image: a MonoImage
index c3ad58b3431c00e04a95676339e5f07ea2e3291f..b158ec26834acc9962eb16361ee9cb94ba8dd243 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <stdio.h>
 #include <mono/utils/mono-publib.h>
+#include <mono/utils/mono-error.h>
 
 MONO_BEGIN_DECLS
 
@@ -50,9 +51,9 @@ MONO_API int           mono_image_ensure_section_idx (MonoImage *image,
 
 MONO_API uint32_t       mono_image_get_entry_point    (MonoImage *image);
 MONO_API const char   *mono_image_get_resource       (MonoImage *image, uint32_t offset, uint32_t *size);
-MONO_API MonoImage*    mono_image_load_file_for_image (MonoImage *image, int fileidx);
+MONO_RT_EXTERNAL_ONLY MONO_API MonoImage*    mono_image_load_file_for_image (MonoImage *image, int fileidx);
 
-MONO_API MonoImage*    mono_image_load_module (MonoImage *image, int idx);
+MONO_RT_EXTERNAL_ONLY MONO_API MonoImage*    mono_image_load_module (MonoImage *image, int idx);
 
 MONO_API const char*   mono_image_get_name       (MonoImage *image);
 MONO_API const char*   mono_image_get_filename   (MonoImage *image);
index a1b9eb841781775dcf0fdc3cc5d768ddcfde08e8..a529a3f3642e559dd4a16463e6ce6e930018c871 100644 (file)
@@ -175,10 +175,12 @@ typedef struct {
 
 struct _MonoImage {
        /*
-        * The number of assemblies which reference this MonoImage though their 'image'
-        * field plus the number of images which reference this MonoImage through their 
-        * 'modules' field, plus the number of threads holding temporary references to
-        * this image between calls of mono_image_open () and mono_image_close ().
+        * This count is incremented during these situations:
+        *   - An assembly references this MonoImage though its 'image' field
+        *   - This MonoImage is present in the 'files' field of an image
+        *   - This MonoImage is present in the 'modules' field of an image
+        *   - A thread is holding a temporary reference to this MonoImage between
+        *     calls to mono_image_open and mono_image_close ()
         */
        int   ref_count;
 
@@ -258,16 +260,16 @@ struct _MonoImage {
        MonoAssembly **references;
        int nreferences;
 
-       /* Code files in the assembly. */
+       /* Code files in the assembly. The main assembly has a "file" table and also a "module"
+        * table, where the module table is a subset of the file table. We track both lists,
+        * and because we can lazy-load them at different times we reference-increment both.
+        */
        MonoImage **modules;
        guint32 module_count;
        gboolean *modules_loaded;
 
-       /*
-        * Files in the assembly. Items are either NULL or alias items in modules, so this does not impact ref_count.
-        * Protected by the image lock.
-        */
        MonoImage **files;
+       guint32 file_count;
 
        gpointer aot_module;
 
index d28bd6c9f7997479f5cf34cbce3c6f37b1f43faa..b420ff75543492180fccb50bcbd5fe7e349d2b36 100644 (file)
@@ -381,6 +381,7 @@ struct _MonoInternalThread {
        gpointer thread_pinning_ref;
        gsize abort_protected_block_count;
        gint32 priority;
+       GPtrArray *owned_mutexes;
        /* 
         * These fields are used to avoid having to increment corlib versions
         * when a new field is added to this structure.
index c902fcdbe5a92ad3aa5427b21c4bceed9ce42e0a..fdbc46a2cfbf6d0d72f7957a7a1bdec60f9a9733 100644 (file)
@@ -2208,12 +2208,9 @@ sgen_client_thread_register (SgenThreadInfo* info, void *stack_bottom_fallback)
        info->client_info.signal = 0;
 #endif
 
-       /* On win32, stack_start_limit should be 0, since the stack can grow dynamically */
        mono_thread_info_get_stack_bounds (&staddr, &stsize);
        if (staddr) {
-#ifndef HOST_WIN32
                info->client_info.stack_start_limit = staddr;
-#endif
                info->client_info.stack_end = staddr + stsize;
        } else {
                gsize stack_bottom = (gsize)stack_bottom_fallback;
@@ -2301,7 +2298,7 @@ sgen_thread_detach (SgenThreadInfo *p)
         * so we assume that if the domain is still registered, we can detach
         * the thread
         */
-       if (mono_domain_get ())
+       if (mono_thread_internal_current_is_attached ())
                mono_thread_detach_internal (mono_thread_internal_current ());
 }
 
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 462fd69a77f172521b3ff983aae71160b2099aa4..7849d4554f5646220aa302bcc00ae013dfcd837d 100644 (file)
@@ -162,7 +162,7 @@ typedef struct {
 
 typedef struct {
        gint32 ref;
-       MonoCoopSem sem;
+       MonoCoopCond cond;
 } ThreadPoolDomainCleanupSemaphore;
 
 typedef enum {
@@ -439,7 +439,7 @@ domain_get (MonoDomain *domain, gboolean create)
                ThreadPoolDomainCleanupSemaphore *cleanup_semaphore;
                cleanup_semaphore = g_new0 (ThreadPoolDomainCleanupSemaphore, 1);
                cleanup_semaphore->ref = 2;
-               mono_coop_sem_init (&cleanup_semaphore->sem, 0);
+               mono_coop_cond_init (&cleanup_semaphore->cond);
 
                g_assert(!domain->cleanup_semaphore);
                domain->cleanup_semaphore = cleanup_semaphore;
@@ -702,11 +702,12 @@ worker_thread (gpointer data)
                        g_assert (removed);
 
                        cleanup_semaphore = (ThreadPoolDomainCleanupSemaphore*) tpdomain->domain->cleanup_semaphore;
+                       g_assert (cleanup_semaphore);
+
+                       mono_coop_cond_signal (&cleanup_semaphore->cond);
 
-                       g_assert(cleanup_semaphore);
-                       mono_coop_sem_post (&cleanup_semaphore->sem);
                        if (InterlockedDecrement (&cleanup_semaphore->ref) == 0) {
-                               mono_coop_sem_destroy (&cleanup_semaphore->sem);
+                               mono_coop_cond_destroy (&cleanup_semaphore->cond);
                                g_free (cleanup_semaphore);
                                tpdomain->domain->cleanup_semaphore = NULL;
                        }
@@ -1453,10 +1454,10 @@ mono_threadpool_ms_end_invoke (MonoAsyncResult *ares, MonoArray **out_args, Mono
 gboolean
 mono_threadpool_ms_remove_domain_jobs (MonoDomain *domain, int timeout)
 {
-       gint res;
-       gint64 now, end;
+       gint64 end;
        ThreadPoolDomain *tpdomain;
        ThreadPoolDomainCleanupSemaphore *cleanup_semaphore;
+       gboolean ret;
 
        g_assert (domain);
        g_assert (timeout >= -1);
@@ -1493,29 +1494,41 @@ mono_threadpool_ms_remove_domain_jobs (MonoDomain *domain, int timeout)
                return TRUE;
        }
 
-       mono_coop_mutex_unlock(&threadpool->domains_lock);
-
        g_assert (domain->cleanup_semaphore);
-
        cleanup_semaphore = (ThreadPoolDomainCleanupSemaphore*) domain->cleanup_semaphore;
 
-       if (timeout == -1) {
-               res = mono_coop_sem_wait (&cleanup_semaphore->sem, MONO_SEM_FLAGS_NONE);
-               g_assert (res == MONO_SEM_TIMEDWAIT_RET_SUCCESS);
-       } else {
-               now = mono_msec_ticks();
-               if (now > end)
-                       return FALSE;
-               res = mono_coop_sem_timedwait (&cleanup_semaphore->sem, end - now, MONO_SEM_FLAGS_NONE);
-       }
+       ret = TRUE;
+
+       do {
+               if (timeout == -1) {
+                       mono_coop_cond_wait (&cleanup_semaphore->cond, &threadpool->domains_lock);
+               } else {
+                       gint64 now;
+                       gint res;
+
+                       now = mono_msec_ticks();
+                       if (now > end) {
+                               ret = FALSE;
+                               break;
+                       }
+
+                       res = mono_coop_cond_timedwait (&cleanup_semaphore->cond, &threadpool->domains_lock, end - now);
+                       if (res != 0) {
+                               ret = FALSE;
+                               break;
+                       }
+               }
+       } while (tpdomain->outstanding_request != 0);
 
        if (InterlockedDecrement (&cleanup_semaphore->ref) == 0) {
-               mono_coop_sem_destroy (&cleanup_semaphore->sem);
+               mono_coop_cond_destroy (&cleanup_semaphore->cond);
                g_free (cleanup_semaphore);
                domain->cleanup_semaphore = NULL;
        }
 
-       return res == MONO_SEM_TIMEDWAIT_RET_SUCCESS;
+       mono_coop_mutex_unlock(&threadpool->domains_lock);
+
+       return ret;
 }
 
 void
index ad472a0b9c06030dcc1e3cba4a235bc9c6287517..a7fd76f1f1c435ef6cc7888fdf1153f2a9ff6df8 100644 (file)
@@ -260,4 +260,13 @@ void mono_threads_begin_abort_protected_block (void);
 void mono_threads_end_abort_protected_block (void);
 MonoException* mono_thread_try_resume_interruption (void);
 
+gboolean
+mono_thread_internal_current_is_attached (void);
+
+void
+mono_thread_internal_describe (MonoInternalThread *internal, GString *str);
+
+gboolean
+mono_thread_internal_is_current (MonoInternalThread *internal);
+
 #endif /* _MONO_METADATA_THREADS_TYPES_H_ */
index 8d8510f5fb0edca44e597ccf064b725d2ea02ffc..7a2379628800309be9e35819f64e5e1fedf07a40 100644 (file)
@@ -46,6 +46,7 @@
 #include <mono/utils/mono-error-internals.h>
 #include <mono/utils/w32handle.h>
 #include <mono/metadata/w32event.h>
+#include <mono/metadata/w32mutex.h>
 
 #include <mono/metadata/gc-internals.h>
 #include <mono/metadata/reflection-internals.h>
@@ -874,20 +875,10 @@ static guint32 WINAPI start_wrapper_internal(StartInfo *start_info, gsize *stack
         * for the current thead */
        mono_thread_cleanup_apartment_state ();
 
-       thread_cleanup (internal);
+       mono_thread_detach_internal (internal);
 
        internal->tid = 0;
 
-       /* Remove the reference to the thread object in the TLS data,
-        * so the thread object can be finalized.  This won't be
-        * reached if the thread threw an uncaught exception, so those
-        * thread handles will stay referenced :-( (This is due to
-        * missing support for scanning thread-specific data in the
-        * Boehm GC - the io-layer keeps a GC-visible hash of pointers
-        * to TLS data.)
-        */
-       SET_CURRENT_OBJECT (NULL);
-
        return(0);
 }
 
@@ -1075,7 +1066,7 @@ mono_thread_attach_full (MonoDomain *domain, gboolean force_attach)
        MonoNativeThreadId tid;
        gsize stack_ptr;
 
-       if ((internal = mono_thread_internal_current ())) {
+       if (mono_thread_internal_current_is_attached ()) {
                if (domain != mono_domain_get ())
                        mono_domain_set (domain, TRUE);
                /* Already attached */
@@ -1127,6 +1118,10 @@ mono_thread_detach_internal (MonoInternalThread *thread)
 
        THREAD_DEBUG (g_message ("%s: mono_thread_detach for %p (%"G_GSIZE_FORMAT")", __func__, thread, (gsize)thread->tid));
 
+#ifndef HOST_WIN32
+       mono_w32mutex_abandon ();
+#endif
+
        thread_cleanup (thread);
 
        SET_CURRENT_OBJECT (NULL);
@@ -1168,6 +1163,18 @@ mono_thread_detach_if_exiting (void)
        return FALSE;
 }
 
+gboolean
+mono_thread_internal_current_is_attached (void)
+{
+       MonoInternalThread *internal;
+
+       internal = GET_CURRENT_OBJECT ();
+       if (!internal)
+               return FALSE;
+
+       return TRUE;
+}
+
 void
 mono_thread_exit (void)
 {
@@ -1175,13 +1182,12 @@ mono_thread_exit (void)
 
        THREAD_DEBUG (g_message ("%s: mono_thread_exit for %p (%"G_GSIZE_FORMAT")", __func__, thread, (gsize)thread->tid));
 
-       thread_cleanup (thread);
-       SET_CURRENT_OBJECT (NULL);
-       mono_domain_unset ();
+       mono_thread_detach_internal (thread);
 
        /* we could add a callback here for embedders to use. */
        if (mono_thread_get_main () && (thread == mono_thread_get_main ()->internal_thread))
                exit (mono_environment_exitcode_get ());
+
        mono_thread_info_exit ();
 }
 
@@ -3122,8 +3128,8 @@ mono_threads_set_shutting_down (void)
                        UNLOCK_THREAD (current_thread);
                }
 
-               /*since we're killing the thread, unset the current domain.*/
-               mono_domain_unset ();
+               /*since we're killing the thread, detach it.*/
+               mono_thread_detach_internal (current_thread);
 
                /* Wake up other threads potentially waiting for us */
                mono_thread_info_exit ();
@@ -3383,7 +3389,7 @@ get_thread_dump (MonoThreadInfo *info, gpointer ud)
 #if 0
 /* This no longer works with remote unwinding */
        g_string_append_printf (text, " tid=0x%p this=0x%p ", (gpointer)(gsize)thread->tid, thread);
-       mono_thread_info_describe (info, text);
+       mono_thread_internal_describe (thread, text);
        g_string_append (text, "\n");
 #endif
 
@@ -5156,4 +5162,31 @@ mono_threads_is_ready_to_be_interrupted (void)
 
        UNLOCK_THREAD (thread);
        return TRUE;
-}
\ No newline at end of file
+}
+
+void
+mono_thread_internal_describe (MonoInternalThread *internal, GString *text)
+{
+       g_string_append_printf (text, ", thread handle : %p", internal->handle);
+
+       if (internal->thread_info) {
+               g_string_append (text, ", state : ");
+               mono_thread_info_describe_interrupt_token ((MonoThreadInfo*) internal->thread_info, text);
+       }
+
+       if (internal->owned_mutexes) {
+               int i;
+
+               g_string_append (text, ", owns : [");
+               for (i = 0; i < internal->owned_mutexes->len; i++)
+                       g_string_append_printf (text, i == 0 ? "%p" : ", %p", g_ptr_array_index (internal->owned_mutexes, i));
+               g_string_append (text, "]");
+       }
+}
+
+gboolean
+mono_thread_internal_is_current (MonoInternalThread *internal)
+{
+       g_assert (internal);
+       return mono_native_thread_id_equals (mono_native_thread_id_get (), MONO_UINT_TO_NATIVE_THREAD_ID (internal->tid));
+}
index 5ffdda1af9403cbd99b089d174ae4c6058a73028..a995eeb3640c44159e9c9534f70f7373a7e577f0 100644 (file)
@@ -8,12 +8,12 @@
  */
 
 #include "w32mutex.h"
-#include "w32mutex-utils.h"
 
 #include <pthread.h>
 
 #include "w32handle-namespace.h"
 #include "mono/io-layer/io-layer.h"
+#include "mono/metadata/object-internals.h"
 #include "mono/utils/mono-logger-internals.h"
 #include "mono/utils/mono-threads.h"
 #include "mono/utils/w32handle.h"
@@ -29,6 +29,35 @@ struct MonoW32HandleNamedMutex {
        MonoW32HandleNamespace sharedns;
 };
 
+static void
+thread_own_mutex (MonoInternalThread *internal, gpointer handle)
+{
+       mono_w32handle_ref (handle);
+
+       /* if we are not on the current thread, there is a
+        * race condition when allocating internal->owned_mutexes */
+       g_assert (mono_thread_internal_is_current (internal));
+
+       if (!internal->owned_mutexes)
+               internal->owned_mutexes = g_ptr_array_new ();
+
+       g_ptr_array_add (internal->owned_mutexes, handle);
+}
+
+static void
+thread_disown_mutex (MonoInternalThread *internal, gpointer handle)
+{
+       gboolean removed;
+
+       g_assert (mono_thread_internal_is_current (internal));
+
+       g_assert (internal->owned_mutexes);
+       removed = g_ptr_array_remove (internal->owned_mutexes, handle);
+       g_assert (removed);
+
+       mono_w32handle_unref (handle);
+}
+
 static gboolean
 mutex_handle_own (gpointer handle, MonoW32HandleType type, guint32 *statuscode)
 {
@@ -41,15 +70,20 @@ mutex_handle_own (gpointer handle, MonoW32HandleType type, guint32 *statuscode)
                return FALSE;
        }
 
-       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: owning %s handle %p, tid %p, recursion %u",
-               __func__, mono_w32handle_ops_typename (type), handle, (gpointer) mutex_handle->tid, mutex_handle->recursion);
+       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: owning %s handle %p, before: [tid: %p, recursion: %d], after: [tid: %p, recursion: %d], abandoned: %s",
+               __func__, mono_w32handle_ops_typename (type), handle, (gpointer) mutex_handle->tid, mutex_handle->recursion, (gpointer) pthread_self (), mutex_handle->recursion + 1, mutex_handle->abandoned ? "true" : "false");
+
+       if (mutex_handle->recursion != 0) {
+               g_assert (pthread_equal (pthread_self (), mutex_handle->tid));
+               mutex_handle->recursion++;
+       } else {
+               mutex_handle->tid = pthread_self ();
+               mutex_handle->recursion = 1;
 
-       mono_thread_info_own_mutex (mono_thread_info_current (), handle);
+               thread_own_mutex (mono_thread_internal_current (), handle);
+       }
 
-       mutex_handle->tid = pthread_self ();
-       mutex_handle->recursion++;
        if (mutex_handle->abandoned) {
-               mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: mutex handle %p was abandoned", __func__, handle);
                mutex_handle->abandoned = FALSE;
                *statuscode = WAIT_ABANDONED_0;
        }
@@ -77,8 +111,8 @@ mutex_handle_is_owned (gpointer handle, MonoW32HandleType type)
                        __func__, mono_w32handle_ops_typename (type), handle, (gpointer) pthread_self ());
                return TRUE;
        } else {
-               mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: %s handle %p not owned by %p, but locked %d times by %p",
-                       __func__, mono_w32handle_ops_typename (type), handle, (gpointer) pthread_self (), mutex_handle->recursion, (gpointer) mutex_handle->tid);
+               mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: %s handle %p not owned by %p, tid: %p recursion: %d",
+                       __func__, mono_w32handle_ops_typename (type), handle, (gpointer) pthread_self (), (gpointer) mutex_handle->tid, mutex_handle->recursion);
                return FALSE;
        }
 }
@@ -363,8 +397,8 @@ ves_icall_System_Threading_Mutex_ReleaseMutex_internal (gpointer handle)
                return FALSE;
        }
 
-       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: releasing %s handle %p",
-               __func__, mono_w32handle_ops_typename (type), handle);
+       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: releasing %s handle %p, tid: %p recursion: %d",
+               __func__, mono_w32handle_ops_typename (type), handle, (gpointer) mutex_handle->tid, mutex_handle->recursion);
 
        thr_ret = mono_w32handle_lock_handle (handle);
        g_assert (thr_ret == 0);
@@ -386,10 +420,10 @@ ves_icall_System_Threading_Mutex_ReleaseMutex_internal (gpointer handle)
                mutex_handle->recursion--;
 
                if (mutex_handle->recursion == 0) {
-                       mono_thread_info_disown_mutex (mono_thread_info_current (), handle);
+                       thread_disown_mutex (mono_thread_internal_current (), handle);
 
-                       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: unlocking %s handle %p",
-                               __func__, mono_w32handle_ops_typename (type), handle);
+                       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: unlocking %s handle %p, tid: %p recusion : %d",
+                               __func__, mono_w32handle_ops_typename (type), handle, (gpointer) mutex_handle->tid, mutex_handle->recursion);
 
                        mutex_handle->tid = 0;
                        mono_w32handle_set_signal_state (handle, TRUE, FALSE);
@@ -441,45 +475,69 @@ cleanup:
 }
 
 void
-mono_w32mutex_abandon (gpointer handle, MonoNativeThreadId tid)
+mono_w32mutex_abandon (void)
 {
-       MonoW32HandleType type;
-       MonoW32HandleMutex *mutex_handle;
-       int thr_ret;
+       MonoInternalThread *internal;
 
-       switch (type = mono_w32handle_get_type (handle)) {
-       case MONO_W32HANDLE_MUTEX:
-       case MONO_W32HANDLE_NAMEDMUTEX:
-               break;
-       default:
-               g_assert_not_reached ();
-       }
+       g_assert (mono_thread_internal_current_is_attached ());
 
-       if (!mono_w32handle_lookup (handle, type, (gpointer *)&mutex_handle)) {
-               g_warning ("%s: error looking up %s handle %p",
-                       __func__, mono_w32handle_ops_typename (type), handle);
+       internal = mono_thread_internal_current ();
+       g_assert (internal);
+
+       if (!internal->owned_mutexes)
                return;
-       }
 
-       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: abandon %s handle %p",
-               __func__, mono_w32handle_ops_typename (type), handle);
+       while (internal->owned_mutexes->len) {
+               MonoW32HandleType type;
+               MonoW32HandleMutex *mutex_handle;
+               MonoNativeThreadId tid;
+               gpointer handle;
+               int thr_ret;
+
+               handle = g_ptr_array_index (internal->owned_mutexes, 0);
+
+               switch (type = mono_w32handle_get_type (handle)) {
+               case MONO_W32HANDLE_MUTEX:
+               case MONO_W32HANDLE_NAMEDMUTEX:
+                       break;
+               default:
+                       g_assert_not_reached ();
+               }
 
-       thr_ret = mono_w32handle_lock_handle (handle);
-       g_assert (thr_ret == 0);
+               if (!mono_w32handle_lookup (handle, type, (gpointer *)&mutex_handle)) {
+                       g_error ("%s: error looking up %s handle %p",
+                               __func__, mono_w32handle_ops_typename (type), handle);
+               }
+
+               mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: abandoning %s handle %p",
+                       __func__, mono_w32handle_ops_typename (type), handle);
+
+               tid = MONO_UINT_TO_NATIVE_THREAD_ID (internal->tid);
+
+               if (!pthread_equal (mutex_handle->tid, tid))
+                       g_error ("%s: trying to release mutex %p acquired by thread %p from thread %p",
+                               __func__, handle, (gpointer) mutex_handle->tid, (gpointer) tid);
+
+               thr_ret = mono_w32handle_lock_handle (handle);
+               g_assert (thr_ret == 0);
 
-       if (pthread_equal (mutex_handle->tid, tid)) {
                mutex_handle->recursion = 0;
                mutex_handle->tid = 0;
                mutex_handle->abandoned = TRUE;
 
                mono_w32handle_set_signal_state (handle, TRUE, FALSE);
 
+               thread_disown_mutex (internal, handle);
+
                mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: abandoned %s handle %p",
                        __func__, mono_w32handle_ops_typename (type), handle);
+
+               thr_ret = mono_w32handle_unlock_handle (handle);
+               g_assert (thr_ret == 0);
        }
 
-       thr_ret = mono_w32handle_unlock_handle (handle);
-       g_assert (thr_ret == 0);
+       g_ptr_array_free (internal->owned_mutexes, TRUE);
+       internal->owned_mutexes = NULL;
 }
 
 MonoW32HandleNamespace*
diff --git a/mono/metadata/w32mutex-utils.h b/mono/metadata/w32mutex-utils.h
deleted file mode 100644 (file)
index a7bad8c..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-
-/* This is just a hack so we can call mono_w32mutex_abandon
- * from mono/utils/mono-threads-posix.c, without importing
- * the whole object.h
- * In the best of all world, mutex owning + disowning + abandoning
- * should be done in metadata/ */
-
-#ifndef _MONO_METADATA_W32MUTEX_UTILS_H_
-#define _MONO_METADATA_W32MUTEX_UTILS_H_
-
-#include <config.h>
-#include <glib.h>
-
-#include "mono/utils/mono-threads.h"
-
-void
-mono_w32mutex_abandon (gpointer handle, MonoNativeThreadId tid);
-
-#endif /* _MONO_METADATA_W32MUTEX_UTILS_H_ */
-
index 3c636192c5e390cbd6eaa3dce9892a535dd61f16..917b36f1dd37fe3415cc36c58487ea3b7d3f1d1c 100644 (file)
@@ -25,4 +25,9 @@ typedef struct MonoW32HandleNamedMutex MonoW32HandleNamedMutex;
 MonoW32HandleNamespace*
 mono_w32mutex_get_namespace (MonoW32HandleNamedMutex *mutex);
 
+#ifndef HOST_WIN32
+void
+mono_w32mutex_abandon (void);
+#endif
+
 #endif /* _MONO_METADATA_W32MUTEX_H_ */
index 265be946e51a8309da60e9c35721695acc315a7e..fa24b73f186132b30eb3d4b358664d3f59e2d4f6 100644 (file)
@@ -2504,7 +2504,7 @@ mono_print_thread_dump_internal (void *sigctx, MonoContext *start_ctx)
                g_string_append (text, "\n\"<unnamed thread>\"");
 
        g_string_append_printf (text, " tid=0x%p this=0x%p ", (gpointer)(gsize)thread->tid, thread);
-       mono_thread_info_describe ((MonoThreadInfo*) thread->thread_info, text);
+       mono_thread_internal_describe (thread, text);
        g_string_append (text, "\n");
 
 #ifdef MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX
index 1a83dfa5898c2ef363148e7340cbeb8c665b3609..36e5c9a5ef011089ec301d63461b37cf7fa6b52a 100644 (file)
@@ -6,7 +6,7 @@ else
 FEATUREFUL_RUNTIME_TEST = test-appdomain-unload
 endif
 
-check-local: assemblyresolve/test/asm.dll testjit test-generic-sharing test-type-load test-cattr-type-load test-reflection-load-with-context test_platform     \
+check-local: assemblyresolve/test/asm.dll testjit test-generic-sharing test-type-load test-multi-netmodule test-cattr-type-load test-reflection-load-with-context test_platform        \
                 test-console-output test-messages test-env-options test-unhandled-exception-2 $(FEATUREFUL_RUNTIME_TEST) test-process-stress rm-empty-logs
 check-full: test-sgen check-local
 check-parallel: compile-tests check-full
@@ -1066,6 +1066,14 @@ test-type-load: $(TEST_DRIVER_DEPEND)
        @echo "Testing load-exception.exe..."
        @$(RUNTIME) load-exceptions.exe > load-exceptions.exe.stdout 2> load-exceptions.exe.stderr
 
+EXTRA_DIST += test-multi-netmodule-1-netmodule.cs test-multi-netmodule-2-dll1.cs test-multi-netmodule-3-dll2.cs test-multi-netmodule-4-exe.cs
+test-multi-netmodule:
+       @$(MCS) -t:module test-multi-netmodule-1-netmodule.cs
+       @$(MCS) -addmodule:test-multi-netmodule-1-netmodule.netmodule -t:library test-multi-netmodule-2-dll1.cs
+       @$(MCS) -addmodule:test-multi-netmodule-1-netmodule.netmodule -t:library test-multi-netmodule-3-dll2.cs
+       @$(MCS) -r:test-multi-netmodule-2-dll1.dll test-multi-netmodule-4-exe.cs
+       $(RUNTIME) test-multi-netmodule-4-exe.exe > test-multi-netmodule-4-exe.exe.stdout 2> test-multi-netmodule-4-exe.exe.stderr
+
 EXTRA_DIST += custom-attr-errors.cs custom-attr-errors-lib.cs
 test-cattr-type-load: $(TEST_DRIVER_DEPEND) custom-attr-errors.cs custom-attr-errors-lib.cs
        $(MCS) -D:WITH_MEMBERS /t:library $(srcdir)/custom-attr-errors-lib.cs
diff --git a/mono/tests/test-multi-netmodule-1-netmodule.cs b/mono/tests/test-multi-netmodule-1-netmodule.cs
new file mode 100644 (file)
index 0000000..2abdc39
--- /dev/null
@@ -0,0 +1,4 @@
+// Compiler options: -t:module
+
+public class M1 {
+}
diff --git a/mono/tests/test-multi-netmodule-2-dll1.cs b/mono/tests/test-multi-netmodule-2-dll1.cs
new file mode 100644 (file)
index 0000000..018db84
--- /dev/null
@@ -0,0 +1,5 @@
+// Compiler options: -addmodule:test-multi-netmodule-1-netmodule.netmodule -t:library
+
+public class M2 {
+       public M1 m1 = new M1();
+}
diff --git a/mono/tests/test-multi-netmodule-3-dll2.cs b/mono/tests/test-multi-netmodule-3-dll2.cs
new file mode 100644 (file)
index 0000000..4229b80
--- /dev/null
@@ -0,0 +1,5 @@
+// Compiler options: -addmodule:test-multi-netmodule-1-netmodule.netmodule -t:library
+
+public class M3 {
+       public M1 m1 = new M1();
+}
diff --git a/mono/tests/test-multi-netmodule-4-exe.cs b/mono/tests/test-multi-netmodule-4-exe.cs
new file mode 100644 (file)
index 0000000..03cd242
--- /dev/null
@@ -0,0 +1,28 @@
+// Compiler options: -r:test-multi-netmodule-2-dll1.dll
+
+using System;
+using System.Reflection;
+
+public class M4 {
+       public static int Main () {
+               M2 m2 = new M2();
+
+               // Expecting failure
+               try {
+                       var DLL = Assembly.LoadFile(@"test-multi-netmodule-3-dll2.dll");
+               var m3Type = DLL.GetType("M3");
+               var m3 = Activator.CreateInstance(m3Type);
+               var m3m1Field = m3Type.GetField("m1");
+
+               Console.WriteLine("M3    assembly:" + m3Type.Assembly);
+                       Console.WriteLine("M3.M1 assembly:" + m3m1Field.DeclaringType.Assembly);
+        } catch (System.TypeLoadException) {
+               return 0;
+        }
+
+               Console.WriteLine("M2    assembly:" + typeof (M2).Assembly);
+               Console.WriteLine("M2.M1 assembly:" + m2.m1.GetType().Assembly);
+
+               return 1;
+       }
+}
index 43a690c75920671419df88b5d2dc80ba1f8c1ca0..82ce187e9c874058f1d4c5c732764d5c8fb7b3e1 100644 (file)
@@ -473,6 +473,12 @@ check_image_may_reference_image(MonoImage *from, MonoImage *to)
                        // For each queued image visit all directly referenced images
                        int inner_idx;
 
+                       // 'files' and 'modules' semantically contain the same items but because of lazy loading we must check both
+                       for (inner_idx = 0; !success && inner_idx < checking->file_count; inner_idx++)
+                       {
+                               CHECK_IMAGE_VISIT (checking->files[inner_idx]);
+                       }
+
                        for (inner_idx = 0; !success && inner_idx < checking->module_count; inner_idx++)
                        {
                                CHECK_IMAGE_VISIT (checking->modules[inner_idx]);
@@ -480,12 +486,7 @@ check_image_may_reference_image(MonoImage *from, MonoImage *to)
 
                        for (inner_idx = 0; !success && inner_idx < checking->nreferences; inner_idx++)
                        {
-                               // References are lazy-loaded and thus allowed to be NULL.
-                               // If they are NULL, we don't care about them for this search, because they haven't impacted ref_count yet.
-                               if (checking->references[inner_idx])
-                               {
-                                       CHECK_IMAGE_VISIT (checking->references[inner_idx]->image);
-                               }
+                               CHECK_IMAGE_VISIT (checking->references[inner_idx]->image);
                        }
 
                        mono_image_unlock (checking);
index 4b9f5d393f5e79fb7ee9dc489f7fe8b00a0e7f69..a8a5b53274e95a0041f8ca6cbed2510df8229c40 100644 (file)
@@ -18,7 +18,6 @@
 #include <mono/utils/mono-threads-posix-signals.h>
 #include <mono/utils/mono-coop-semaphore.h>
 #include <mono/metadata/gc-internals.h>
-#include <mono/metadata/w32mutex-utils.h>
 #include <mono/utils/w32handle.h>
 
 #include <errno.h>
@@ -46,8 +45,6 @@ mono_threads_platform_register (MonoThreadInfo *info)
 {
        gpointer thread_handle;
 
-       info->owned_mutexes = g_ptr_array_new ();
-
        thread_handle = mono_w32handle_new (MONO_W32HANDLE_THREAD, NULL);
        if (thread_handle == INVALID_HANDLE_VALUE)
                g_error ("%s: failed to create handle", __func__);
@@ -290,27 +287,14 @@ mono_native_thread_set_name (MonoNativeThreadId tid, const char *name)
 void
 mono_threads_platform_set_exited (MonoThreadInfo *info)
 {
-       gpointer mutex_handle;
-       int i, thr_ret;
-       pthread_t tid;
+       int thr_ret;
 
        g_assert (info->handle);
-
        if (mono_w32handle_issignalled (info->handle))
                g_error ("%s: handle %p thread %p has already exited, it's handle is signalled", __func__, info->handle, mono_thread_info_get_tid (info));
        if (mono_w32handle_get_type (info->handle) == MONO_W32HANDLE_UNUSED)
                g_error ("%s: handle %p thread %p has already exited, it's handle type is 'unused'", __func__, info->handle, mono_thread_info_get_tid (info));
 
-       tid = pthread_self ();
-
-       for (i = 0; i < info->owned_mutexes->len; i++) {
-               mutex_handle = g_ptr_array_index (info->owned_mutexes, i);
-               mono_w32mutex_abandon (mutex_handle, tid);
-               mono_thread_info_disown_mutex (info, mutex_handle);
-       }
-
-       g_ptr_array_free (info->owned_mutexes, TRUE);
-
        thr_ret = mono_w32handle_lock_handle (info->handle);
        g_assert (thr_ret == 0);
 
@@ -325,37 +309,6 @@ mono_threads_platform_set_exited (MonoThreadInfo *info)
        info->handle = NULL;
 }
 
-void
-mono_threads_platform_describe (MonoThreadInfo *info, GString *text)
-{
-       int i;
-
-       g_string_append_printf (text, "thread handle %p state : ", info->handle);
-
-       mono_thread_info_describe_interrupt_token (info, text);
-
-       g_string_append_printf (text, ", owns (");
-       for (i = 0; i < info->owned_mutexes->len; i++)
-               g_string_append_printf (text, i > 0 ? ", %p" : "%p", g_ptr_array_index (info->owned_mutexes, i));
-       g_string_append_printf (text, ")");
-}
-
-void
-mono_threads_platform_own_mutex (MonoThreadInfo *info, gpointer mutex_handle)
-{
-       mono_w32handle_ref (mutex_handle);
-
-       g_ptr_array_add (info->owned_mutexes, mutex_handle);
-}
-
-void
-mono_threads_platform_disown_mutex (MonoThreadInfo *info, gpointer mutex_handle)
-{
-       mono_w32handle_unref (mutex_handle);
-
-       g_ptr_array_remove (info->owned_mutexes, mutex_handle);
-}
-
 static const gchar* thread_typename (void)
 {
        return "Thread";
index 4761af48d0c90507c6fc9433a6b882b05afb804f..e2b489ecc1064f6eea5fc9c1bd76818232ef1941 100644 (file)
@@ -317,24 +317,6 @@ mono_threads_platform_set_exited (MonoThreadInfo *info)
        info->handle = NULL;
 }
 
-void
-mono_threads_platform_describe (MonoThreadInfo *info, GString *text)
-{
-       /* TODO */
-}
-
-void
-mono_threads_platform_own_mutex (MonoThreadInfo *info, gpointer mutex_handle)
-{
-       g_assert_not_reached ();
-}
-
-void
-mono_threads_platform_disown_mutex (MonoThreadInfo *info, gpointer mutex_handle)
-{
-       g_assert_not_reached ();
-}
-
 void
 mono_threads_platform_init (void)
 {
index 2f07dbae1f1393f39fd62d5ac0a32d3eaae39864..ccb9121d0b6245a5558c099246ae535bbafe3eea 100644 (file)
@@ -1661,21 +1661,3 @@ mono_thread_info_duplicate_handle (MonoThreadInfo *info)
        g_assert (mono_thread_info_is_current (info));
        return mono_threads_platform_duplicate_handle (info);
 }
-
-void
-mono_thread_info_describe (MonoThreadInfo *info, GString *text)
-{
-       mono_threads_platform_describe (info, text);
-}
-
-void
-mono_thread_info_own_mutex (MonoThreadInfo *info, gpointer mutex_handle)
-{
-       mono_threads_platform_own_mutex (info, mutex_handle);
-}
-
-void
-mono_thread_info_disown_mutex (MonoThreadInfo *info, gpointer mutex_handle)
-{
-       mono_threads_platform_disown_mutex (info, mutex_handle);
-}
index 493d44884ca49f564d9f9f057479bf082645848a..db4bdab73b73dee37082ed8fbdf610a64c4902b7 100644 (file)
@@ -241,11 +241,6 @@ typedef struct {
 
        /* Stack mark for targets that explicitly require one */
        gpointer stack_mark;
-
-#if defined(_POSIX_VERSION) || defined(__native_client__)
-       /* This is the data that was stored in the w32 handle */
-       GPtrArray *owned_mutexes;
-#endif
 } MonoThreadInfo;
 
 typedef struct {
@@ -528,9 +523,6 @@ void mono_threads_platform_exit (int exit_code);
 HANDLE mono_threads_platform_open_thread_handle (HANDLE handle, MonoNativeThreadId tid);
 void mono_threads_platform_close_thread_handle (HANDLE handle);
 void mono_threads_platform_set_exited (THREAD_INFO_TYPE *info);
-void mono_threads_platform_describe (THREAD_INFO_TYPE *info, GString *text);
-void mono_threads_platform_own_mutex (THREAD_INFO_TYPE *info, gpointer mutex_handle);
-void mono_threads_platform_disown_mutex (THREAD_INFO_TYPE *info, gpointer mutex_handle);
 gpointer mono_threads_platform_duplicate_handle (THREAD_INFO_TYPE *info);
 
 void mono_threads_coop_begin_global_suspend (void);
@@ -649,13 +641,4 @@ mono_thread_info_is_current (THREAD_INFO_TYPE *info);
 gpointer
 mono_thread_info_duplicate_handle (THREAD_INFO_TYPE *info);
 
-void
-mono_thread_info_describe (THREAD_INFO_TYPE *info, GString *text);
-
-void
-mono_thread_info_own_mutex (THREAD_INFO_TYPE *info, gpointer mutex_handle);
-
-void
-mono_thread_info_disown_mutex (THREAD_INFO_TYPE *info, gpointer mutex_handle);
-
 #endif /* __MONO_THREADS_H__ */
index fc3d1a33f368212a5f1ed9c4272c4713a70acdeb..d9957cef896a9e8faa99a2b3607113d7631c4b9e 100644 (file)
@@ -659,8 +659,11 @@ mono_w32handle_ref_core (gpointer handle, MonoW32HandleBase *handle_data)
 static gboolean
 mono_w32handle_unref_core (gpointer handle, MonoW32HandleBase *handle_data, guint minimum)
 {
+       MonoW32HandleType type;
        guint old, new;
 
+       type = handle_data->type;
+
        do {
                old = handle_data->ref;
                if (!(old >= minimum))
@@ -669,8 +672,11 @@ mono_w32handle_unref_core (gpointer handle, MonoW32HandleBase *handle_data, guin
                new = old - 1;
        } while (InterlockedCompareExchange ((gint32*) &handle_data->ref, new, old) != old);
 
+       /* handle_data might contain invalid data from now on, if
+        * another thread is unref'ing this handle at the same time */
+
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_W32HANDLE, "%s: unref %s handle %p, ref: %d -> %d destroy: %s",
-               __func__, mono_w32handle_ops_typename (handle_data->type), handle, old, new, new == 0 ? "true" : "false");
+               __func__, mono_w32handle_ops_typename (type), handle, old, new, new == 0 ? "true" : "false");
 
        return new == 0;
 }
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