-d:XAMMAC \
-d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK \
-d:XAMARIN_MODERN \
+ -d:NETSTANDARD \
-nowarn:1699 \
-nostdlib \
$(DEFAULT_REFERENCES) \
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.10.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.10.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.10.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.10.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
+++ /dev/null
-//
-// 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;
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-[assembly: AssemblyTitle ("System.Diagnostics.PerformanceCounter.dll")]
-[assembly: AssemblyDescription ("System.Diagnostics.PerformanceCounter.dll")]
-[assembly: AssemblyDefaultAlias ("System.Diagnostics.PerformanceCounter.dll")]
-[assembly: AssemblyCompany ("Xamarin, Inc.")]
-[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
-[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
-[assembly: AssemblyInformationalVersion ("4.0.0.0")]
-[assembly: AssemblyFileVersion ("4.0.0.0")]
-[assembly: AssemblyDelaySign (true)]
-[assembly: AssemblyKeyFile ("../../msfinal.pub")]
-
-[assembly: ReferenceAssembly]
-
-
+++ /dev/null
-<?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>{BA0C64F1-3762-437D-8B58-75F68A5B4E7E}</ProjectGuid>\r
- <OutputType>Library</OutputType>\r
- <NoWarn>1699,1616,1699</NoWarn>\r
- <OutputPath>./../../../class/lib/net_4_x/Facades</OutputPath>\r
- <IntermediateOutputPath>obj-Facades</IntermediateOutputPath>\r
- <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>\r
- <NoStdLib>True</NoStdLib>\r
- \r
- <NoConfig>True</NoConfig>\r
- \r
- <AppDesignerFolder>Properties</AppDesignerFolder>\r
- <RootNamespace>\r
- </RootNamespace>\r
- <AssemblyName>System.Diagnostics.PerformanceCounter</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>../../msfinal.pub</AssemblyOriginatorKeyFile>\r
- </PropertyGroup>\r
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
- <DebugSymbols>true</DebugSymbols>\r
- <DebugType>full</DebugType>\r
- <NoWarn>1699,1616,1699</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,1616,1699</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="AssemblyInfo.cs" />\r
- <Compile Include="TypeForwarders.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
- </ItemGroup>\r
- <ItemGroup>\r
- <Folder Include="Properties\" />\r
- </ItemGroup>\r
-</Project>\r
-
+++ /dev/null
-MCS_BUILD_DIR = ../../../build
-
-thisdir = class/Facades/System.Diagnostics.PerformanceCounter
-SUBDIRS =
-include $(MCS_BUILD_DIR)/rules.make
-
-LIBRARY_SUBDIR = Facades
-LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
-
-LIBRARY = System.Diagnostics.PerformanceCounter.dll
-
-KEY_FILE = ../../msfinal.pub
-SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS)
-
-PLATFORM_DEBUG_FLAGS =
-
-NO_TEST = yes
-
-include $(MCS_BUILD_DIR)/library.make
-
-
+++ /dev/null
-<?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>{9E33CC1D-9BB9-49CC-8B9E-E2F5807623AB}</ProjectGuid>\r
- <OutputType>Library</OutputType>\r
- <NoWarn>1699,1616,1699</NoWarn>\r
- <OutputPath>./../../../class/lib/net_4_x/Facades</OutputPath>\r
- <NoStdLib>True</NoStdLib>\r
- <NoConfig>True</NoConfig>\r
- \r
- <AppDesignerFolder>Properties</AppDesignerFolder>\r
- <RootNamespace>\r
- </RootNamespace>\r
- <AssemblyName>System.Diagnostics.PerformanceCounter</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>../../msfinal.pub</AssemblyOriginatorKeyFile>\r
- </PropertyGroup>\r
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
- <DebugSymbols>true</DebugSymbols>\r
- <DebugType>full</DebugType>\r
- <NoWarn>1699,1616,1699</NoWarn>\r
- <Optimize>false</Optimize>\r
- <DefineConstants>DEBUG;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,1616,1699</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="AssemblyInfo.cs" />\r
- <Compile Include="TypeForwarders.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' ">\r
-\r
- </PreBuildEvent>\r
- <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
-\r
- </PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
- </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="../../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
- </ItemGroup>\r
- <ItemGroup>\r
- <Folder Include="Properties\" />\r
- </ItemGroup>\r
-</Project>\r
-
+++ /dev/null
-TypeForwarders.cs
-AssemblyInfo.cs
-
+++ /dev/null
-//
-// 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.
-//
-
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.CounterSample))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.PerformanceCounter))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.PerformanceCounterInstanceLifetime))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.PerformanceCounterType))]
-
-
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
{
public static class StackFrameExtensions
{
+ [MonoTODO]
+ public static IntPtr GetNativeImageBase (this StackFrame stackFrame)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static IntPtr GetNativeIP (this StackFrame stackFrame)
+ {
+ throw new NotImplementedException ();
+ }
+
[MonoTODO]
public static bool HasNativeImage (this StackFrame stackFrame)
{
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.10.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.10.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
+++ /dev/null
-//
-// 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;
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-[assembly: AssemblyTitle ("System.Net.Http.WebRequestHandler.dll")]
-[assembly: AssemblyDescription ("System.Net.Http.WebRequestHandler.dll")]
-[assembly: AssemblyDefaultAlias ("System.Net.Http.WebRequestHandler.dll")]
-[assembly: AssemblyCompany ("Xamarin, Inc.")]
-[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
-[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
-[assembly: AssemblyInformationalVersion ("4.0.0.0")]
-[assembly: AssemblyFileVersion ("4.0.0.0")]
-[assembly: AssemblyDelaySign (true)]
-[assembly: AssemblyKeyFile ("../../msfinal.pub")]
-
-[assembly: ReferenceAssembly]
-
-
+++ /dev/null
-<?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>{ACA10642-1D5B-443D-99BE-65C31491C54F}</ProjectGuid>\r
- <OutputType>Library</OutputType>\r
- <NoWarn>1699,1616,1699</NoWarn>\r
- <OutputPath>./../../../class/lib/net_4_x/Facades</OutputPath>\r
- <IntermediateOutputPath>obj-Facades</IntermediateOutputPath>\r
- <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>\r
- <NoStdLib>True</NoStdLib>\r
- \r
- <NoConfig>True</NoConfig>\r
- \r
- <AppDesignerFolder>Properties</AppDesignerFolder>\r
- <RootNamespace>\r
- </RootNamespace>\r
- <AssemblyName>System.Net.Http.WebRequestHandler</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>../../msfinal.pub</AssemblyOriginatorKeyFile>\r
- </PropertyGroup>\r
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
- <DebugSymbols>true</DebugSymbols>\r
- <DebugType>full</DebugType>\r
- <NoWarn>1699,1616,1699</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,1616,1699</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="AssemblyInfo.cs" />\r
- <Compile Include="TypeForwarders.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="../../System.Net.Http.WebRequest/System.Net.Http.WebRequest-net_4_x.csproj">\r
- <Project>{A98B5CC3-EAFC-4EFD-ABC6-2F2A65BE98F5}</Project>\r
- <Name>System.Net.Http.WebRequest-net_4_x</Name>\r
- </ProjectReference>\r
- <ProjectReference Include="../../System.Net.Http/System.Net.Http-net_4_x.csproj">\r
- <Project>{F1636C0A-FC68-4362-918F-9CCC789FED13}</Project>\r
- <Name>System.Net.Http-net_4_x</Name>\r
- </ProjectReference>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <Folder Include="Properties\" />\r
- </ItemGroup>\r
-</Project>\r
-
+++ /dev/null
-MCS_BUILD_DIR = ../../../build
-
-thisdir = class/Facades/System.Net.Http.WebRequestHandler
-SUBDIRS =
-include $(MCS_BUILD_DIR)/rules.make
-
-LIBRARY_SUBDIR = Facades
-LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
-
-LIBRARY = System.Net.Http.WebRequestHandler.dll
-
-KEY_FILE = ../../msfinal.pub
-SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System System.Net.Http.WebRequest System.Net.Http
-LIB_MCS_FLAGS = $(SIGN_FLAGS)
-
-PLATFORM_DEBUG_FLAGS =
-
-NO_TEST = yes
-
-include $(MCS_BUILD_DIR)/library.make
-
-
+++ /dev/null
-<?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>{D539B499-390E-4648-9683-EDD787C36928}</ProjectGuid>\r
- <OutputType>Library</OutputType>\r
- <NoWarn>1699,1616,1699</NoWarn>\r
- <OutputPath>./../../../class/lib/net_4_x/Facades</OutputPath>\r
- <NoStdLib>True</NoStdLib>\r
- <NoConfig>True</NoConfig>\r
- \r
- <AppDesignerFolder>Properties</AppDesignerFolder>\r
- <RootNamespace>\r
- </RootNamespace>\r
- <AssemblyName>System.Net.Http.WebRequestHandler</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>../../msfinal.pub</AssemblyOriginatorKeyFile>\r
- </PropertyGroup>\r
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
- <DebugSymbols>true</DebugSymbols>\r
- <DebugType>full</DebugType>\r
- <NoWarn>1699,1616,1699</NoWarn>\r
- <Optimize>false</Optimize>\r
- <DefineConstants>DEBUG;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,1616,1699</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="AssemblyInfo.cs" />\r
- <Compile Include="TypeForwarders.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' ">\r
-\r
- </PreBuildEvent>\r
- <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
-\r
- </PreBuildEvent>\r
-\r
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
- </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="../../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.Net.Http.WebRequest/System.Net.Http.WebRequest-net_4_x.csproj">\r
- <Project>{A98B5CC3-EAFC-4EFD-ABC6-2F2A65BE98F5}</Project>\r
- <Name>System.Net.Http.WebRequest-net_4_x</Name>\r
- </ProjectReference>\r
- <ProjectReference Include="../../System.Net.Http/System.Net.Http-net_4_x.csproj">\r
- <Project>{F1636C0A-FC68-4362-918F-9CCC789FED13}</Project>\r
- <Name>System.Net.Http-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
- </ItemGroup>\r
- <ItemGroup>\r
- <Folder Include="Properties\" />\r
- </ItemGroup>\r
-</Project>\r
-
+++ /dev/null
-TypeForwarders.cs
-AssemblyInfo.cs
-
+++ /dev/null
-//
-// 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.
-//
-
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Http.WebRequestHandler))]
-
-
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.10.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.10.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.10.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.2.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
+++ /dev/null
-//
-// ECCurve.cs
-//
-// Authors:
-// Marek Safar <marek.safar@gmail.com>
-//
-// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-namespace System.Security.Cryptography
-{
- [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
- public struct ECCurve
- {
- public byte[] A;
- public byte[] B;
- public byte[] Cofactor;
- public ECCurveType CurveType;
- public ECPoint G;
- public HashAlgorithmName? Hash;
- public byte[] Order;
- public byte[] Polynomial;
- public byte[] Prime;
- public byte[] Seed;
- public bool IsCharacteristic2 { get { throw new NotImplementedException (); } }
- public bool IsExplicit { get { throw new NotImplementedException (); } }
- public bool IsNamed { get { throw new NotImplementedException (); } }
- public bool IsPrime { get { throw new NotImplementedException (); } }
- public Oid Oid { get { throw new NotImplementedException (); } }
- public static ECCurve CreateFromFriendlyName (string oidFriendlyName) { throw new NotImplementedException (); }
- public static ECCurve CreateFromOid (Oid curveOid) { throw new NotImplementedException (); }
- public static ECCurve CreateFromValue (string oidValue) { throw new NotImplementedException (); }
- public void Validate () { throw new NotImplementedException (); }
-
- public enum ECCurveType
- {
- Implicit = 0,
- PrimeShortWeierstrass = 1,
- PrimeTwistedEdwards = 2,
- PrimeMontgomery = 3,
- Characteristic2 = 4,
- Named = 5,
- }
-
- public static class NamedCurves
- {
- public static ECCurve brainpoolP160r1 { get { throw new NotImplementedException (); } }
- public static ECCurve brainpoolP160t1 { get { throw new NotImplementedException (); } }
- public static ECCurve brainpoolP192r1 { get { throw new NotImplementedException (); } }
- public static ECCurve brainpoolP192t1 { get { throw new NotImplementedException (); } }
- public static ECCurve brainpoolP224r1 { get { throw new NotImplementedException (); } }
- public static ECCurve brainpoolP224t1 { get { throw new NotImplementedException (); } }
- public static ECCurve brainpoolP256r1 { get { throw new NotImplementedException (); } }
- public static ECCurve brainpoolP256t1 { get { throw new NotImplementedException (); } }
- public static ECCurve brainpoolP320r1 { get { throw new NotImplementedException (); } }
- public static ECCurve brainpoolP320t1 { get { throw new NotImplementedException (); } }
- public static ECCurve brainpoolP384r1 { get { throw new NotImplementedException (); } }
- public static ECCurve brainpoolP384t1 { get { throw new NotImplementedException (); } }
- public static ECCurve brainpoolP512r1 { get { throw new NotImplementedException (); } }
- public static ECCurve brainpoolP512t1 { get { throw new NotImplementedException (); } }
- public static ECCurve nistP256 { get { throw new NotImplementedException (); } }
- public static ECCurve nistP384 { get { throw new NotImplementedException (); } }
- public static ECCurve nistP521 { get { throw new NotImplementedException (); } }
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-//
-// ECPArameters.cs
-//
-// Authors:
-// Marek Safar <marek.safar@gmail.com>
-//
-// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-namespace System.Security.Cryptography
-{
- [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
- public partial struct ECParameters
- {
- public ECCurve Curve;
- public byte[] D;
- public ECPoint Q;
- public void Validate () { throw new NotImplementedException (); }
- }
-}
\ No newline at end of file
+++ /dev/null
-//
-// ECPoint.cs
-//
-// Authors:
-// Marek Safar <marek.safar@gmail.com>
-//
-// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-namespace System.Security.Cryptography
-{
- [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
- public struct ECPoint
- {
- public byte[] X;
- public byte[] Y;
- }
-}
\ No newline at end of file
+++ /dev/null
-//
-// IncrementalHash.cs
-//
-// Authors:
-// Marek Safar <marek.safar@gmail.com>
-//
-// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-namespace System.Security.Cryptography
-{
- public sealed class IncrementalHash : IDisposable
- {
- private IncrementalHash () { }
- public HashAlgorithmName AlgorithmName { get { throw new NotImplementedException (); } }
- public void AppendData (byte[] data) { }
- public void AppendData (byte[] data, int offset, int count) { }
- public static IncrementalHash CreateHash (HashAlgorithmName hashAlgorithm) { throw new NotImplementedException (); }
- public static IncrementalHash CreateHMAC (HashAlgorithmName hashAlgorithm, byte[] key) { throw new NotImplementedException (); }
- public void Dispose () { }
- public byte[] GetHashAndReset () { throw new NotImplementedException (); }
- }
-}
\ No newline at end of file
LIB_REFS = System System.Core
LIB_MCS_FLAGS = $(SIGN_FLAGS)
+PLATFORM_DEBUG_FLAGS =
+
NO_TEST = yes
include $(MCS_BUILD_DIR)/library.make
TypeForwarders.cs
AssemblyInfo.cs
-ECCurve.cs
-ECPoint.cs
-ECParameters.cs
-IncrementalHash.cs
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.SHA512))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.TripleDES))]
-
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ECCurve))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ECParameters))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ECPoint))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.IncrementalHash))]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.2.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
{
public sealed class ECDsaOpenSsl : ECDsa
{
+ public ECDsaOpenSsl ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ECDsaOpenSsl (int keySize)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ECDsaOpenSsl(IntPtr handle)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ECDsaOpenSsl (ECCurve curve)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ECDsaOpenSsl (SafeEvpPKeyHandle pkeyHandle)
+ {
+ throw new NotImplementedException ();
+ }
+
public override byte[] SignHash (byte[] hash)
{
throw new NotImplementedException ();
throw new NotImplementedException ();
}
- // TODO: Implement full contract API
+ public SafeEvpPKeyHandle DuplicateKeyHandle ()
+ {
+ throw new NotImplementedException ();
+ }
}
}
\ No newline at end of file
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System.Core
+LIB_REFS = System.Core Facades/System.Security.Cryptography.Algorithms
LIB_MCS_FLAGS = $(SIGN_FLAGS)
NO_TEST = yes
{
public sealed class RSAOpenSsl : RSA
{
+ public RSAOpenSsl ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public RSAOpenSsl (int keySize)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public RSAOpenSsl(IntPtr handle)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public RSAOpenSsl (ECCurve curve)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public RSAOpenSsl (RSAParameters parameters)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public RSAOpenSsl (SafeEvpPKeyHandle pkeyHandle)
+ {
+ throw new NotImplementedException ();
+ }
+
public override RSAParameters ExportParameters (bool includePrivateParameters)
{
throw new NotImplementedException ();
throw new NotImplementedException ();
}
- // TODO: Implement full contract API
+ public SafeEvpPKeyHandle DuplicateKeyHandle ()
+ {
+ throw new NotImplementedException ();
+ }
}
}
\ No newline at end of file
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System System.ServiceModel System.Xml Facades/System.Security.Cryptography.X509Certificates
-
-ifneq (2.1, $(FRAMEWORK_VERSION))
-LIB_REFS += System.IdentityModel
-endif
+LIB_REFS = System System.ServiceModel System.Xml System.IdentityModel Facades/System.Security.Cryptography.X509Certificates
LIB_MCS_FLAGS = $(SIGN_FLAGS)
+PLATFORM_DEBUG_FLAGS =
+
NO_TEST = yes
include $(MCS_BUILD_DIR)/library.make
TypeForwarders.cs
AssemblyInfo.cs
-
-../../../build/common/MonoTODOAttribute.cs
-X509ServiceCertificateAuthentication_mobile.cs
-X509CertificateValidator_mobile.cs
-X509CertificateValidationMode_mobile.cs
-X509CertificateRecipientClientCredential_mobile.cs
-X509CertificateInitiatorClientCredential_mobile.cs
// THE SOFTWARE.
//
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IdentityModel.Selectors.X509CertificateValidator))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ActionNotSupportedException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ChannelFactory))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ChannelFactory<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.SecurityAccessDeniedException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.UserNamePasswordClientCredential))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.WindowsClientCredential))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.X509ServiceCertificateAuthentication))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.X509CertificateInitiatorClientCredential))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.X509CertificateRecipientClientCredential))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.X509CertificateValidationMode))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.SecurityMode))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ServerTooBusyException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ServiceActivationException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.TransferMode))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.UnknownMessageReceivedEventArgs))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.XmlSerializerFormatAttribute))]
-
-#if !MOBILE && !XAMMAC_4_5
-
-// TODO: These are implemented as stubs in the facade directly on mobile (contrary to Desktop where they're forwarded to System.ServiceModel.dll/System.IdentityModel.dll).
-// I'm not 100% sure this is the right approach, but Marek thinks it's fine so I'm sticking with it for now.
-// The problem on mobile is that types like X509CertificateValidator live in System.IdentityModel.dll which is not built for mobile.
-
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IdentityModel.Selectors.X509CertificateValidator))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.X509CertificateValidationMode))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.X509ServiceCertificateAuthentication))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.X509CertificateInitiatorClientCredential))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.X509CertificateRecipientClientCredential))]
-
-#endif
+++ /dev/null
-//
-// X509CertificateInitiatorClientCredential_mobile.cs
-//
-// Author:
-// Alexander Köplinger (alexander.koeplinger@xamarin.com)
-//
-// (C) 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.
-//
-
-#if MOBILE || XAMMAC_4_5
-
-using System.Security.Cryptography.X509Certificates;
-
-namespace System.ServiceModel.Security
-{
- public sealed class X509CertificateInitiatorClientCredential
- {
- [MonoTODO]
- public X509Certificate2 Certificate
- {
- get
- {
- throw new NotImplementedException ();
- }
- set
- {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- internal X509CertificateInitiatorClientCredential()
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void SetCertificate(StoreLocation storeLocation, StoreName storeName, X509FindType findType, object findValue)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void SetCertificate(string subjectName, StoreLocation storeLocation, StoreName storeName)
- {
- throw new NotImplementedException ();
- }
- }
-}
-
-#endif
\ No newline at end of file
+++ /dev/null
-//
-// X509CertificateRecipientClientCredential_mobile.cs
-//
-// Author:
-// Alexander Köplinger (alexander.koeplinger@xamarin.com)
-//
-// (C) 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.
-//
-
-#if MOBILE || XAMMAC_4_5
-
-using System;
-using System.Collections.Generic;
-using System.Security.Cryptography.X509Certificates;
-
-namespace System.ServiceModel.Security
-{
- public sealed class X509CertificateRecipientClientCredential
- {
- [MonoTODO]
- public X509ServiceCertificateAuthentication Authentication
- {
- get
- {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public X509Certificate2 DefaultCertificate
- {
- get
- {
- throw new NotImplementedException ();
- }
- set
- {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public Dictionary<Uri, X509Certificate2> ScopedCertificates
- {
- get
- {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public X509ServiceCertificateAuthentication SslCertificateAuthentication
- {
- get
- {
- throw new NotImplementedException ();
- }
- set
- {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- internal X509CertificateRecipientClientCredential ()
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void SetDefaultCertificate(StoreLocation storeLocation, StoreName storeName, X509FindType findType, object findValue)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void SetDefaultCertificate(string subjectName, StoreLocation storeLocation, StoreName storeName)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void SetScopedCertificate(StoreLocation storeLocation, StoreName storeName, X509FindType findType, object findValue, Uri targetService)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void SetScopedCertificate(string subjectName, StoreLocation storeLocation, StoreName storeName, Uri targetService)
- {
- throw new NotImplementedException ();
- }
- }
-}
-
-#endif
\ No newline at end of file
+++ /dev/null
-//
-// X509CertificateValidationMode_mobile.cs
-//
-// Author:
-// Alexander Köplinger (alexander.koeplinger@xamarin.com)
-//
-// (C) 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.
-//
-
-#if MOBILE || XAMMAC_4_5
-
-namespace System.ServiceModel.Security
-{
- public enum X509CertificateValidationMode
- {
- None,
- PeerTrust,
- ChainTrust,
- PeerOrChainTrust,
- Custom
- }
-}
-
-#endif
\ No newline at end of file
+++ /dev/null
-//
-// X509CertificateValidator_mobile.cs
-//
-// Author:
-// Alexander Köplinger (alexander.koeplinger@xamarin.com)
-//
-// (C) 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.
-//
-
-#if MOBILE || XAMMAC_4_5
-
-using System.Security.Cryptography.X509Certificates;
-
-namespace System.IdentityModel.Selectors
-{
- public abstract class X509CertificateValidator
- {
- public abstract void Validate (X509Certificate2 certificate);
- }
-}
-
-#endif
\ No newline at end of file
+++ /dev/null
-//
-// X509ServiceCertificateAuthentication_mobile.cs
-//
-// Author:
-// Alexander Köplinger (alexander.koeplinger@xamarin.com)
-//
-// (C) 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.
-//
-
-#if MOBILE || XAMMAC_4_5
-
-using System;
-using System.IdentityModel.Selectors;
-using System.Security.Cryptography.X509Certificates;
-
-namespace System.ServiceModel.Security
-{
- public sealed class X509ServiceCertificateAuthentication
- {
- [MonoTODO]
- public X509CertificateValidationMode CertificateValidationMode
- {
- get
- {
- throw new NotImplementedException ();
- }
- set
- {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public X509CertificateValidator CustomCertificateValidator
- {
- get
- {
- throw new NotImplementedException ();
- }
- set
- {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public X509RevocationMode RevocationMode
- {
- get
- {
- throw new NotImplementedException ();
- }
- set
- {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public StoreLocation TrustedStoreLocation
- {
- get
- {
- throw new NotImplementedException ();
- }
- set
- {
- throw new NotImplementedException ();
- }
- }
- }
-}
-
-#endif
\ No newline at end of file
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.10.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.10.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.10.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.10.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.10.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.10.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.10.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.10.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
System.Xml.XPath System.Xml.XmlDocument System.Xml.Xsl.Primitives Microsoft.Win32.Registry.AccessControl System.Diagnostics.StackTrace System.Globalization.Extensions \
System.IO.FileSystem.AccessControl System.Private.CoreLib.InteropServices System.Reflection.TypeExtensions \
System.Security.SecureString System.Threading.AccessControl System.Threading.Overlapped System.Xml.XPath.XDocument \
-System.Security.Cryptography.Algorithms System.Security.Cryptography.Primitives System.Text.Encoding.CodePages System.IO.FileSystem.Watcher \
+System.Security.Cryptography.Primitives System.Text.Encoding.CodePages System.IO.FileSystem.Watcher \
System.Security.Cryptography.ProtectedData System.ServiceProcess.ServiceController System.IO.Pipes
# common_SUBDIRS dependencies
reflection_PARALLEL_SUBDIRS = System.Reflection.Emit.ILGeneration System.Reflection.Emit.Lightweight System.Reflection.Emit
-monotouch_SUBDIRS = $(common_DEPS_SUBDIRS)
+monotouch_SUBDIRS = $(common_DEPS_SUBDIRS) $(mobile_only_DEPS_SUBDIRS)
monotouch_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS)
mobile_static_SUBDIRS = $(monotouch_SUBDIRS)
mobile_static_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
net_4_x_SUBDIRS = $(common_DEPS_SUBDIRS) $(drawing_DEPS_SUBDIRS)
-net_4_x_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(reflection_PARALLEL_SUBDIRS) System.Diagnostics.PerformanceCounter \
-System.Net.Http.WebRequestHandler
+net_4_x_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(reflection_PARALLEL_SUBDIRS)
monodroid_SUBDIRS = $(monotouch_SUBDIRS)
monodroid_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS) $(reflection_PARALLEL_SUBDIRS)
monotouch_tv_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
mobile_only_SUBDIRS = System.Net.Ping System.Runtime.Serialization.Formatters System.Security.Cryptography.Csp System.Security.Cryptography.Pkcs \
-System.Security.Cryptography.Cng System.Security.Cryptography.OpenSsl
+System.Security.Cryptography.Cng
+
+mobile_only_DEPS_SUBDIRS = System.Security.Cryptography.Algorithms System.Security.Cryptography.OpenSsl
PROFILE_PARALLEL_SUBDIRS = $(net_4_x_PARALLEL_SUBDIRS)
System.ServiceModel.Internals \
System.Runtime.Serialization \
System.Xml.Linq \
+ System.IdentityModel \
System.ServiceModel \
System.ServiceModel.Web \
System.Json \
--- /dev/null
+namespace Mono.Security.Interface
+{
+ delegate MonoTlsProvider MonoTlsProviderFactoryDelegate ();
+
+ static partial class MonoTlsProviderFactory
+ {
+ internal static MonoTlsProviderFactoryDelegate _PrivateFactoryDelegate;
+ }
+}
};
}
+ public static MemoryMappedFile CreateFromFile (FileStream fileStream, string mapName, long capacity, MemoryMappedFileAccess access,
+ HandleInheritability inheritability,
+ bool leaveOpen)
+ {
+ if (fileStream == null)
+ throw new ArgumentNullException ("fileStream");
+ if (mapName != null && mapName.Length == 0)
+ throw new ArgumentException ("mapName");
+ if ((!MonoUtil.IsUnix && capacity == 0 && fileStream.Length == 0) || (capacity > fileStream.Length))
+ throw new ArgumentException ("capacity");
+
+ IntPtr handle = MemoryMapImpl.OpenHandle (fileStream.Handle, mapName, out capacity, access, MemoryMappedFileOptions.DelayAllocatePages);
+
+ MemoryMapImpl.ConfigureHandleInheritability (handle, inheritability);
+
+ return new MemoryMappedFile () {
+ handle = handle,
+ fileAccess = access,
+ name = mapName,
+ fileCapacity = capacity,
+
+ stream = fileStream,
+ keepOpen = leaveOpen
+ };
+ }
[MonoLimitation ("memoryMappedFileSecurity is currently ignored")]
public static MemoryMappedFile CreateFromFile (FileStream fileStream, string mapName, long capacity, MemoryMappedFileAccess access,
return CreateNew (mapName, capacity, access, MemoryMappedFileOptions.DelayAllocatePages, null, HandleInheritability.None);
}
+ [MonoLimitation ("Named mappings scope is process local; options is ignored")]
+ public static MemoryMappedFile CreateNew (string mapName, long capacity, MemoryMappedFileAccess access, MemoryMappedFileOptions options, HandleInheritability inheritability)
+ {
+ return CreateNew (mapName, capacity, access, options, null, inheritability);
+ }
+
[MonoLimitation ("Named mappings scope is process local; options and memoryMappedFileSecurity are ignored")]
public static MemoryMappedFile CreateNew (string mapName, long capacity, MemoryMappedFileAccess access,
MemoryMappedFileOptions options, MemoryMappedFileSecurity memoryMappedFileSecurity,
return CreateOrOpen (mapName, capacity, access, MemoryMappedFileOptions.DelayAllocatePages, null, HandleInheritability.None);
}
+ [MonoLimitation ("Named mappings scope is process local")]
+ public static MemoryMappedFile CreateOrOpen (string mapName, long capacity, MemoryMappedFileAccess access, MemoryMappedFileOptions options, HandleInheritability inheritability)
+ {
+ return CreateOrOpen (mapName, capacity, access, options, null, inheritability);
+ }
+
[MonoLimitation ("Named mappings scope is process local")]
public static MemoryMappedFile CreateOrOpen (string mapName, long capacity, MemoryMappedFileAccess access, MemoryMappedFileOptions options, MemoryMappedFileSecurity memoryMappedFileSecurity, HandleInheritability inheritability)
{
using System.Security.Permissions;
using System.Security.Principal;
using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
using Microsoft.Win32;
using Microsoft.Win32.SafeHandles;
}
#endif
+ ~NamedPipeClientStream () {
+ Dispose (false);
+ }
+
INamedPipeClient impl;
public void Connect ()
#endif
}
+ public Task ConnectAsync ()
+ {
+ return ConnectAsync (Timeout.Infinite, CancellationToken.None);
+ }
+
+ public Task ConnectAsync (int timeout)
+ {
+ return ConnectAsync (timeout, CancellationToken.None);
+ }
+
+ public Task ConnectAsync (CancellationToken cancellationToken)
+ {
+ return ConnectAsync (Timeout.Infinite, cancellationToken);
+ }
+
+ public Task ConnectAsync (int timeout, CancellationToken cancellationToken)
+ {
+ throw new NotImplementedException ();
+ }
+
public int NumberOfServerInstances {
get {
CheckPipePropertyOperations ();
using System;
using System.IO;
using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
using System.Security.AccessControl;
using System.Security.Permissions;
using System.Security.Principal;
IsConnected = true;
}
+ public Task WaitForConnectionAsync ()
+ {
+ return WaitForConnectionAsync (CancellationToken.None);
+ }
+
+ [MonoTODO]
+ public Task WaitForConnectionAsync (CancellationToken cancellationToken)
+ {
+ throw new NotImplementedException ();
+ }
+
[MonoTODO]
[SecurityPermission (SecurityAction.Demand, Flags = SecurityPermissionFlag.ControlPrincipal)]
public string GetImpersonationUserName ()
pipeSecurity.Persist (SafePipeHandle);
}
+#endif
// pipe I/O
public void WaitForPipeDrain ()
{
}
-#endif
[MonoTODO]
public override int Read ([In] byte [] buffer, int offset, int count)
--- /dev/null
+//
+// ECCurve.cs
+//
+// Authors:
+// Marek Safar <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NETSTANDARD
+
+namespace System.Security.Cryptography
+{
+ [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+ public struct ECCurve
+ {
+ public byte[] A;
+ public byte[] B;
+ public byte[] Cofactor;
+ public ECCurveType CurveType;
+ public ECPoint G;
+ public HashAlgorithmName? Hash;
+ public byte[] Order;
+ public byte[] Polynomial;
+ public byte[] Prime;
+ public byte[] Seed;
+ public bool IsCharacteristic2 { get { throw new NotImplementedException (); } }
+ public bool IsExplicit { get { throw new NotImplementedException (); } }
+ public bool IsNamed { get { throw new NotImplementedException (); } }
+ public bool IsPrime { get { throw new NotImplementedException (); } }
+ public Oid Oid { get { throw new NotImplementedException (); } }
+ public static ECCurve CreateFromFriendlyName (string oidFriendlyName) { throw new NotImplementedException (); }
+ public static ECCurve CreateFromOid (Oid curveOid) { throw new NotImplementedException (); }
+ public static ECCurve CreateFromValue (string oidValue) { throw new NotImplementedException (); }
+ public void Validate () { throw new NotImplementedException (); }
+
+ public enum ECCurveType
+ {
+ Implicit = 0,
+ PrimeShortWeierstrass = 1,
+ PrimeTwistedEdwards = 2,
+ PrimeMontgomery = 3,
+ Characteristic2 = 4,
+ Named = 5,
+ }
+
+ public static class NamedCurves
+ {
+ public static ECCurve brainpoolP160r1 { get { throw new NotImplementedException (); } }
+ public static ECCurve brainpoolP160t1 { get { throw new NotImplementedException (); } }
+ public static ECCurve brainpoolP192r1 { get { throw new NotImplementedException (); } }
+ public static ECCurve brainpoolP192t1 { get { throw new NotImplementedException (); } }
+ public static ECCurve brainpoolP224r1 { get { throw new NotImplementedException (); } }
+ public static ECCurve brainpoolP224t1 { get { throw new NotImplementedException (); } }
+ public static ECCurve brainpoolP256r1 { get { throw new NotImplementedException (); } }
+ public static ECCurve brainpoolP256t1 { get { throw new NotImplementedException (); } }
+ public static ECCurve brainpoolP320r1 { get { throw new NotImplementedException (); } }
+ public static ECCurve brainpoolP320t1 { get { throw new NotImplementedException (); } }
+ public static ECCurve brainpoolP384r1 { get { throw new NotImplementedException (); } }
+ public static ECCurve brainpoolP384t1 { get { throw new NotImplementedException (); } }
+ public static ECCurve brainpoolP512r1 { get { throw new NotImplementedException (); } }
+ public static ECCurve brainpoolP512t1 { get { throw new NotImplementedException (); } }
+ public static ECCurve nistP256 { get { throw new NotImplementedException (); } }
+ public static ECCurve nistP384 { get { throw new NotImplementedException (); } }
+ public static ECCurve nistP521 { get { throw new NotImplementedException (); } }
+ }
+ }
+}
+
+#endif
\ No newline at end of file
--- /dev/null
+//
+// ECPArameters.cs
+//
+// Authors:
+// Marek Safar <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NETSTANDARD
+
+namespace System.Security.Cryptography
+{
+ [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+ public partial struct ECParameters
+ {
+ public ECCurve Curve;
+ public byte[] D;
+ public ECPoint Q;
+ public void Validate () { throw new NotImplementedException (); }
+ }
+}
+
+#endif
\ No newline at end of file
--- /dev/null
+//
+// ECPoint.cs
+//
+// Authors:
+// Marek Safar <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NETSTANDARD
+
+namespace System.Security.Cryptography
+{
+ [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+ public struct ECPoint
+ {
+ public byte[] X;
+ public byte[] Y;
+ }
+}
+
+#endif
\ No newline at end of file
--- /dev/null
+//
+// IncrementalHash.cs
+//
+// Authors:
+// Marek Safar <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NETSTANDARD
+
+namespace System.Security.Cryptography
+{
+ public sealed class IncrementalHash : IDisposable
+ {
+ private IncrementalHash () { }
+ public HashAlgorithmName AlgorithmName { get { throw new NotImplementedException (); } }
+ public void AppendData (byte[] data) { }
+ public void AppendData (byte[] data, int offset, int count) { }
+ public static IncrementalHash CreateHash (HashAlgorithmName hashAlgorithm) { throw new NotImplementedException (); }
+ public static IncrementalHash CreateHMAC (HashAlgorithmName hashAlgorithm, byte[] key) { throw new NotImplementedException (); }
+ public void Dispose () { }
+ public byte[] GetHashAndReset () { throw new NotImplementedException (); }
+ }
+}
+
+#endif
\ No newline at end of file
../referencesource/System.Core/System/threading/ReaderWriterLockSlim/ReaderWriterLockSlim.cs
../referencesource/System.Core/System/threading/Tasks/TaskExtensions.cs
+
+System.Security.Cryptography/ECCurve.cs
+System.Security.Cryptography/ECPoint.cs
+System.Security.Cryptography/ECParameters.cs
+System.Security.Cryptography/IncrementalHash.cs
throw new NotImplementedException ();
}
+ public virtual DateTimeOffset GetDateTimeOffset (int ordinal)
+ {
+ throw new NotImplementedException ();
+ }
+
public virtual decimal GetDecimal (int ordinal)
{
throw new NotImplementedException ();
throw new NotImplementedException ();
}
- public virtual System.Type GetFieldType (int ordinal)
+ public virtual Type GetFieldType (int ordinal)
{
throw new NotImplementedException ();
}
throw new NotImplementedException ();
}
+ public virtual SqlBinary GetSqlBinary (int ordinal)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual SqlBoolean GetSqlBoolean (int ordinal)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual SqlByte GetSqlByte (int ordinal)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual SqlBytes GetSqlBytes (int ordinal)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual SqlChars GetSqlChars (int ordinal)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual SqlDateTime GetSqlDateTime (int ordinal)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual SqlDecimal GetSqlDecimal (int ordinal)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual SqlDouble GetSqlDouble (int ordinal)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual Type GetSqlFieldType (int ordinal)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual SqlGuid GetSqlGuid (int ordinal)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual SqlInt16 GetSqlInt16 (int ordinal)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual SqlInt32 GetSqlInt32 (int ordinal)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual SqlInt64 GetSqlInt64 (int ordinal)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual SqlMetaData GetSqlMetaData (int ordinal)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual SqlMoney GetSqlMoney (int ordinal)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual SqlSingle GetSqlSingle (int ordinal)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual SqlString GetSqlString (int ordinal)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual object GetSqlValue (int ordinal)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual int GetSqlValues (object[] values)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual SqlXml GetSqlXml (int ordinal)
+ {
+ throw new NotImplementedException ();
+ }
+
public virtual string GetString (int ordinal)
{
throw new NotImplementedException ();
}
+ public virtual TimeSpan GetTimeSpan (int ordinal)
+ {
+ throw new NotImplementedException ();
+ }
+
public virtual object GetValue (int ordinal)
{
throw new NotImplementedException ();
throw new NotImplementedException ();
}
+ public virtual void SetBoolean (int ordinal, bool value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetByte (int ordinal, byte value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetBytes (int ordinal, long fieldOffset, byte[] buffer, int bufferOffset, int length)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetChar (int ordinal, char value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetChars (int ordinal, long fieldOffset, char[] buffer, int bufferOffset, int length)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetDateTime (int ordinal, DateTime value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetDateTimeOffset (int ordinal, DateTimeOffset value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetDBNull (int ordinal)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetDecimal (int ordinal, decimal value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetDouble (int ordinal, double value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetFloat (int ordinal, float value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetGuid (int ordinal, Guid value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetInt16 (int ordinal, short value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetInt32 (int ordinal, int value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetInt64 (int ordinal, long value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetSqlBinary (int ordinal, SqlBinary value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetSqlBoolean (int ordinal, SqlBoolean value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetSqlByte (int ordinal, SqlByte value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetSqlBytes (int ordinal, SqlBytes value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetSqlChars (int ordinal, SqlChars value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetSqlDateTime (int ordinal, SqlDateTime value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetSqlDecimal (int ordinal, SqlDecimal value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetSqlDouble (int ordinal, SqlDouble value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetSqlGuid (int ordinal, SqlGuid value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetSqlInt16 (int ordinal, SqlInt16 value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetSqlInt32 (int ordinal, SqlInt32 value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetSqlInt64 (int ordinal, SqlInt64 value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetSqlMoney (int ordinal, SqlMoney value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetSqlSingle (int ordinal, SqlSingle value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetSqlString (int ordinal, SqlString value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetSqlXml (int ordinal, SqlXml value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetString (int ordinal, string value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetTimeSpan (int ordinal, TimeSpan value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void SetValue (int ordinal, object value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual int SetValues (params object[] values)
+ {
+ throw new NotImplementedException ();
+ }
+
public virtual bool IsDBNull (int ordinal)
{
throw new NotImplementedException ();
using System;
using System.Data;
+using System.Data.SqlClient;
using System.Threading;
using System.Data.SqlTypes;
this._sqlDbType = dbType;
}
+ [MonoTODO]
+ public SqlMetaData (string name, SqlDbType dbType, bool useServerDefault, bool isUniqueKey, SortOrder columnSortOrder, int sortOrdinal)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public SqlMetaData (string name, SqlDbType dbType, long maxLength, bool useServerDefault, bool isUniqueKey, SortOrder columnSortOrder, int sortOrdinal)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public SqlMetaData (string name, SqlDbType dbType, byte precision, byte scale, bool useServerDefault, bool isUniqueKey, SortOrder columnSortOrder, int sortOrdinal)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public SqlMetaData (string name, SqlDbType dbType, long maxLength, long locale, SqlCompareOptions compareOptions, bool useServerDefault, bool isUniqueKey, SortOrder columnSortOrder, int sortOrdinal)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public SqlMetaData (string name, SqlDbType dbType, string database, string owningSchema, string objectName, bool useServerDefault, bool isUniqueKey, SortOrder columnSortOrder, int sortOrdinal)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public SqlMetaData (string name, SqlDbType dbType, long maxLength, byte precision, byte scale, long localeId, SqlCompareOptions compareOptions, System.Type userDefinedType, bool useServerDefault, bool isUniqueKey, SortOrder columnSortOrder, int sortOrdinal)
+ {
+ throw new NotImplementedException ();
+ }
+
public SqlMetaData (string name, SqlDbType dbType, long maxLength)
{
if (name == null)
get { throw new NotImplementedException (); }
}
+ [MonoTODO]
+ public bool IsUniqueKey {
+ get { throw new NotImplementedException (); }
+ }
+
+ [MonoTODO]
+ public SortOrder SortOrder {
+ get { throw new NotImplementedException (); }
+ }
+
+ [MonoTODO]
+ public int SortOrdinal {
+ get { throw new NotImplementedException (); }
+ }
+
+ [MonoTODO]
+ public bool UseServerDefault {
+ get { throw new NotImplementedException (); }
+ }
#endregion // Properties
#region Methods
return value;
}
+ public DateTimeOffset Adjust (DateTimeOffset value)
+ {
+ if (type != typeof (DateTimeOffset))
+ throw new ArgumentException ("Value does not match the SqlMetaData type");
+ return value;
+ }
+
+ public TimeSpan Adjust (TimeSpan value)
+ {
+ if (type != typeof (TimeSpan))
+ throw new ArgumentException ("Value does not match the SqlMetaData type");
+ return value;
+ }
+
public decimal Adjust (decimal value)
{
if (type != typeof (decimal))
return value;
}
+ [MonoTODO]
+ public SqlXml Adjust (SqlXml value)
+ {
+ throw new NotImplementedException ();
+ }
+
public string Adjust (string value)
{
if (type != typeof (string))
using System;
using System.Data;
using System.Data.Common;
+using System.Threading;
+using System.Threading.Tasks;
using Mono.Data.Tds;
using Mono.Data.Tds.Protocol;
set { _destinationTableName = value; }
}
+ [MonoTODO]
+ public bool EnableStreaming {
+ get { throw new NotImplementedException (); }
+ set { throw new NotImplementedException (); }
+ }
+
public int NotifyAfter {
get { return _notifyAfter; }
set {
BulkCopyToServer (table, rowState);
}
+ [MonoTODO]
+ public void WriteToServer (DbDataReader reader)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public Task WriteToServerAsync (DbDataReader reader)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public Task WriteToServerAsync (DbDataReader reader, CancellationToken cancellationToken)
+ {
+ throw new NotImplementedException ();
+ }
+
private void RowsCopied (long rowsCopied)
{
SqlRowsCopiedEventArgs e = new SqlRowsCopiedEventArgs (rowsCopied);
using System.Data.Sql;
using System.Runtime.InteropServices;
using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
using System.Xml;
namespace System.Data.SqlClient {
}
}
+ [MonoTODO]
+ public new Task<SqlDataReader> ExecuteReaderAsync ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public new Task<SqlDataReader> ExecuteReaderAsync (CancellationToken cancellationToken)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public new Task<SqlDataReader> ExecuteReaderAsync (CommandBehavior behavior)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public new Task<SqlDataReader> ExecuteReaderAsync (CommandBehavior behavior, CancellationToken cancellationToken)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public Task<XmlReader> ExecuteXmlReaderAsync ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public Task<XmlReader> ExecuteXmlReaderAsync (CancellationToken cancellationToken)
+ {
+ throw new NotImplementedException ();
+ }
+
public
override
object ExecuteScalar ()
}
}
+ [MonoTODO]
+ public Guid ClientConnectionId {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public
override
}
}
+ [MonoTODO]
+ public void ResetStatistics ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public IDictionary RetrieveStatistics ()
+ {
+ throw new NotImplementedException ();
+ }
#endregion // Methods
get { return Errors [0].Class; }
}
+ [MonoTODO]
+ public Guid ClientConnectionId {
+ get { throw new NotImplementedException (); }
+ }
+
[DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
public SqlErrorCollection Errors {
get { return errors; }
[BrowsableAttribute(false)]
public string UdtTypeName { get; set; }
+ [BrowsableAttribute(false)]
+ public string TypeName { get; set; }
+
#endregion // Properties
#region Methods
[assembly: ComCompatibleVersion (1, 0, 3300, 0)]
[assembly: AllowPartiallyTrustedCallers]
+#if !NET_2_1
[assembly: SecurityCritical (SecurityCriticalScope.Explicit)]
+#endif
\ No newline at end of file
include ../../build/rules.make
LIBRARY = System.IdentityModel.dll
-LIB_REFS = System System.Xml System.Security System.Configuration Mono.Security System.Runtime.Serialization
+LIB_REFS = System System.Xml System.Security Mono.Security System.Runtime.Serialization
LIB_MCS_FLAGS = \
/d:NET_3_0 \
$(OTHER_LIB_MCS_FLAGS)
+ifneq (2.1, $(FRAMEWORK_VERSION))
+LIB_REFS += System.Configuration
+endif
+
ifndef NO_SYSTEM_WEB_DEPENDENCY
+ifneq (2.1, $(FRAMEWORK_VERSION))
LIB_REFS += System.Web
endif
-
+endif
ifndef NO_SYSTEM_WEB_APPSERVICES_DEPENDENCY
ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
//
using System;
using System.Collections.ObjectModel;
-using System.IdentityModel.Policy;
-using System.IdentityModel.Tokens;
using System.Security.Cryptography.X509Certificates;
namespace System.IdentityModel.Selectors
+++ /dev/null
-../../build/common/Consts.cs
-../../build/common/MonoTODOAttribute.cs
-Assembly/AssemblyInfo.cs
-System.IdentityModel/CookieTransform.cs
-System.IdentityModel/OpenObject.cs
-System.IdentityModel/SignatureVerificationFailedException.cs
-System.IdentityModel.Claims/Claim.cs
-System.IdentityModel.Claims/ClaimSet.cs
-System.IdentityModel.Claims/ClaimTypes.cs
-System.IdentityModel.Claims/DefaultClaimSet.cs
-System.IdentityModel.Claims/Rights.cs
-System.IdentityModel.Claims/WindowsClaimSet.cs
-System.IdentityModel.Claims/X509CertificateClaimSet.cs
-System.IdentityModel.Configuration/ICustomIdentityConfiguration.cs
-System.IdentityModel.Configuration/IdentityModelCaches.cs
-System.IdentityModel.Policy/AuthorizationContext.cs
-System.IdentityModel.Policy/EvaluationContext.cs
-System.IdentityModel.Policy/IAuthorizationComponent.cs
-System.IdentityModel.Policy/IAuthorizationPolicy.cs
-System.IdentityModel.Protocols/WSTrust/BinaryExchange.cs
-System.IdentityModel.Protocols/WSTrust/EndpointReference.cs
-System.IdentityModel.Protocols/WSTrust/Entropy.cs
-System.IdentityModel.Protocols/WSTrust/Lifetime.cs
-System.IdentityModel.Protocols/WSTrust/ProtectedKey.cs
-System.IdentityModel.Protocols/WSTrust/RequestSecurityTokenResponse.cs
-System.IdentityModel.Protocols/WSTrust/RequestedProofToken.cs
-System.IdentityModel.Protocols/WSTrust/RequestedSecurityToken.cs
-System.IdentityModel.Protocols/WSTrust/Status.cs
-System.IdentityModel.Protocols/WSTrust/UseKey.cs
-System.IdentityModel.Protocols/WSTrust/WSTrustMessage.cs
-System.IdentityModel.Selectors/AudienceUriMode.cs
-System.IdentityModel.Selectors/CustomUserNameSecurityTokenAuthenticator.cs
-System.IdentityModel.Selectors/KerberosSecurityTokenAuthenticator.cs
-System.IdentityModel.Selectors/KerberosSecurityTokenProvider.cs
-System.IdentityModel.Selectors/RsaSecurityTokenAuthenticator.cs
-System.IdentityModel.Selectors/SamlSecurityTokenAuthenticator.cs
-System.IdentityModel.Selectors/SecurityTokenAuthenticator.cs
-System.IdentityModel.Selectors/SecurityTokenManager.cs
-System.IdentityModel.Selectors/SecurityTokenProvider.cs
-System.IdentityModel.Selectors/SecurityTokenRequirement.cs
-System.IdentityModel.Selectors/SecurityTokenResolver.cs
-System.IdentityModel.Selectors/SecurityTokenSerializer.cs
-System.IdentityModel.Selectors/SecurityTokenVersion.cs
-System.IdentityModel.Selectors/SystemIdentityAuthorizationPolicy.cs
-System.IdentityModel.Selectors/UserNamePasswordValidator.cs
-System.IdentityModel.Selectors/UserNameSecurityTokenAuthenticator.cs
-System.IdentityModel.Selectors/UserNameSecurityTokenProvider.cs
-System.IdentityModel.Selectors/WindowsSecurityTokenAuthenticator.cs
-System.IdentityModel.Selectors/WindowsUserNameSecurityTokenAuthenticator.cs
-System.IdentityModel.Selectors/X509CertificateValidator.cs
-System.IdentityModel.Selectors/X509SecurityTokenAuthenticator.cs
-System.IdentityModel.Selectors/X509SecurityTokenProvider.cs
-System.IdentityModel.Tokens/AsymmetricSecurityKey.cs
-System.IdentityModel.Tokens/AudienceRestriction.cs
-System.IdentityModel.Tokens/AuthenticationContext.cs
-System.IdentityModel.Tokens/AuthenticationInformation.cs
-System.IdentityModel.Tokens/BinaryKeyIdentifierClause.cs
-System.IdentityModel.Tokens/BootstrapContext.cs
-System.IdentityModel.Tokens/EncryptedKeyIdentifierClause.cs
-System.IdentityModel.Tokens/EncryptingCredentials.cs
-System.IdentityModel.Tokens/GenericXmlSecurityToken.cs
-System.IdentityModel.Tokens/InMemorySymmetricSecurityKey.cs
-System.IdentityModel.Tokens/IssuerNameRegistry.cs
-System.IdentityModel.Tokens/KerberosReceiverSecurityToken.cs
-System.IdentityModel.Tokens/KerberosRequestorSecurityToken.cs
-System.IdentityModel.Tokens/LocalIdKeyIdentifierClause.cs
-System.IdentityModel.Tokens/ProofDescriptor.cs
-System.IdentityModel.Tokens/RsaKeyIdentifierClause.cs
-System.IdentityModel.Tokens/RsaSecurityKey.cs
-System.IdentityModel.Tokens/RsaSecurityToken.cs
-System.IdentityModel.Tokens/SamlAccessDecision.cs
-System.IdentityModel.Tokens/SamlAction.cs
-System.IdentityModel.Tokens/SamlAdvice.cs
-System.IdentityModel.Tokens/SamlAssertion.cs
-System.IdentityModel.Tokens/SamlAssertionKeyIdentifierClause.cs
-System.IdentityModel.Tokens/SamlAttribute.cs
-System.IdentityModel.Tokens/SamlAttributeStatement.cs
-System.IdentityModel.Tokens/SamlAudienceRestrictionCondition.cs
-System.IdentityModel.Tokens/SamlAuthenticationClaimResource.cs
-System.IdentityModel.Tokens/SamlAuthenticationStatement.cs
-System.IdentityModel.Tokens/SamlAuthorityBinding.cs
-System.IdentityModel.Tokens/SamlAuthorizationDecisionClaimResource.cs
-System.IdentityModel.Tokens/SamlAuthorizationDecisionStatement.cs
-System.IdentityModel.Tokens/SamlCondition.cs
-System.IdentityModel.Tokens/SamlConditions.cs
-System.IdentityModel.Tokens/SamlConstants.cs
-System.IdentityModel.Tokens/SamlDoNotCacheCondition.cs
-System.IdentityModel.Tokens/SamlEvidence.cs
-System.IdentityModel.Tokens/SamlNameIdentifierClaimResource.cs
-System.IdentityModel.Tokens/SamlSecurityToken.cs
-System.IdentityModel.Tokens/SamlSerializer.cs
-System.IdentityModel.Tokens/SamlStatement.cs
-System.IdentityModel.Tokens/SamlSubject.cs
-System.IdentityModel.Tokens/SamlSubjectStatement.cs
-System.IdentityModel.Tokens/SecurityAlgorithms.cs
-System.IdentityModel.Tokens/SecurityKey.cs
-System.IdentityModel.Tokens/SecurityKeyIdentifier.cs
-System.IdentityModel.Tokens/SecurityKeyIdentifierClause.cs
-System.IdentityModel.Tokens/SecurityKeyType.cs
-System.IdentityModel.Tokens/SecurityKeyUsage.cs
-System.IdentityModel.Tokens/SecurityToken.cs
-System.IdentityModel.Tokens/SecurityTokenDescriptor.cs
-System.IdentityModel.Tokens/SecurityTokenException.cs
-System.IdentityModel.Tokens/SecurityTokenExpiredException.cs
-System.IdentityModel.Tokens/SecurityTokenHandler.cs
-System.IdentityModel.Tokens/SecurityTokenHandlerCollection.cs
-System.IdentityModel.Tokens/SecurityTokenHandlerConfiguration.cs
-System.IdentityModel.Tokens/SecurityTokenNotYetValidException.cs
-System.IdentityModel.Tokens/SecurityTokenReplayDetectedException.cs
-System.IdentityModel.Tokens/SecurityTokenTypes.cs
-System.IdentityModel.Tokens/SecurityTokenValidationException.cs
-System.IdentityModel.Tokens/SessionSecurityToken.cs
-System.IdentityModel.Tokens/SessionSecurityTokenCache.cs
-System.IdentityModel.Tokens/SessionSecurityTokenCacheKey.cs
-System.IdentityModel.Tokens/SessionSecurityTokenHandler.cs
-System.IdentityModel.Tokens/SigningCredentials.cs
-System.IdentityModel.Tokens/SymmetricSecurityKey.cs
-System.IdentityModel.Tokens/TlsHMAC.cs
-System.IdentityModel.Tokens/TokenReplayCache.cs
-System.IdentityModel.Tokens/UserNameSecurityToken.cs
-System.IdentityModel.Tokens/WindowsSecurityToken.cs
-System.IdentityModel.Tokens/X509AsymmetricSecurityKey.cs
-System.IdentityModel.Tokens/X509IssuerSerialKeyIdentifierClause.cs
-System.IdentityModel.Tokens/X509RawDataKeyIdentifierClause.cs
-System.IdentityModel.Tokens/X509SecurityToken.cs
-System.IdentityModel.Tokens/X509SigningCredentials.cs
-System.IdentityModel.Tokens/X509SubjectKeyIdentifierClause.cs
-System.IdentityModel.Tokens/X509ThumbprintKeyIdentifierClause.cs
-System.IdentityModel.Tokens/X509WindowsSecurityToken.cs
-System.Security.Claims/AuthenticationTypes.cs
-System.ServiceModel.Security/X509CertificateValidationMode.cs
--- /dev/null
+../../build/common/Consts.cs
+../../build/common/MonoTODOAttribute.cs
+Assembly/AssemblyInfo.cs
+
+System.IdentityModel.Selectors/X509CertificateValidator.cs
+System.ServiceModel.Security/X509CertificateValidationMode.cs
--- /dev/null
+#include mobile_System.IdentityModel.dll.sources
--- /dev/null
+#include mobile_System.IdentityModel.dll.sources
--- /dev/null
+#include mobile_System.IdentityModel.dll.sources
--- /dev/null
+#include mobile_System.IdentityModel.dll.sources
--- /dev/null
+#include mobile_System.IdentityModel.dll.sources
--- /dev/null
+../../build/common/Consts.cs
+../../build/common/MonoTODOAttribute.cs
+Assembly/AssemblyInfo.cs
+System.IdentityModel/CookieTransform.cs
+System.IdentityModel/OpenObject.cs
+System.IdentityModel/SignatureVerificationFailedException.cs
+System.IdentityModel.Claims/Claim.cs
+System.IdentityModel.Claims/ClaimSet.cs
+System.IdentityModel.Claims/ClaimTypes.cs
+System.IdentityModel.Claims/DefaultClaimSet.cs
+System.IdentityModel.Claims/Rights.cs
+System.IdentityModel.Claims/WindowsClaimSet.cs
+System.IdentityModel.Claims/X509CertificateClaimSet.cs
+System.IdentityModel.Configuration/ICustomIdentityConfiguration.cs
+System.IdentityModel.Configuration/IdentityModelCaches.cs
+System.IdentityModel.Policy/AuthorizationContext.cs
+System.IdentityModel.Policy/EvaluationContext.cs
+System.IdentityModel.Policy/IAuthorizationComponent.cs
+System.IdentityModel.Policy/IAuthorizationPolicy.cs
+System.IdentityModel.Protocols/WSTrust/BinaryExchange.cs
+System.IdentityModel.Protocols/WSTrust/EndpointReference.cs
+System.IdentityModel.Protocols/WSTrust/Entropy.cs
+System.IdentityModel.Protocols/WSTrust/Lifetime.cs
+System.IdentityModel.Protocols/WSTrust/ProtectedKey.cs
+System.IdentityModel.Protocols/WSTrust/RequestSecurityTokenResponse.cs
+System.IdentityModel.Protocols/WSTrust/RequestedProofToken.cs
+System.IdentityModel.Protocols/WSTrust/RequestedSecurityToken.cs
+System.IdentityModel.Protocols/WSTrust/Status.cs
+System.IdentityModel.Protocols/WSTrust/UseKey.cs
+System.IdentityModel.Protocols/WSTrust/WSTrustMessage.cs
+System.IdentityModel.Selectors/AudienceUriMode.cs
+System.IdentityModel.Selectors/CustomUserNameSecurityTokenAuthenticator.cs
+System.IdentityModel.Selectors/KerberosSecurityTokenAuthenticator.cs
+System.IdentityModel.Selectors/KerberosSecurityTokenProvider.cs
+System.IdentityModel.Selectors/RsaSecurityTokenAuthenticator.cs
+System.IdentityModel.Selectors/SamlSecurityTokenAuthenticator.cs
+System.IdentityModel.Selectors/SecurityTokenAuthenticator.cs
+System.IdentityModel.Selectors/SecurityTokenManager.cs
+System.IdentityModel.Selectors/SecurityTokenProvider.cs
+System.IdentityModel.Selectors/SecurityTokenRequirement.cs
+System.IdentityModel.Selectors/SecurityTokenResolver.cs
+System.IdentityModel.Selectors/SecurityTokenSerializer.cs
+System.IdentityModel.Selectors/SecurityTokenVersion.cs
+System.IdentityModel.Selectors/SystemIdentityAuthorizationPolicy.cs
+System.IdentityModel.Selectors/UserNamePasswordValidator.cs
+System.IdentityModel.Selectors/UserNameSecurityTokenAuthenticator.cs
+System.IdentityModel.Selectors/UserNameSecurityTokenProvider.cs
+System.IdentityModel.Selectors/WindowsSecurityTokenAuthenticator.cs
+System.IdentityModel.Selectors/WindowsUserNameSecurityTokenAuthenticator.cs
+System.IdentityModel.Selectors/X509CertificateValidator.cs
+System.IdentityModel.Selectors/X509SecurityTokenAuthenticator.cs
+System.IdentityModel.Selectors/X509SecurityTokenProvider.cs
+System.IdentityModel.Tokens/AsymmetricSecurityKey.cs
+System.IdentityModel.Tokens/AudienceRestriction.cs
+System.IdentityModel.Tokens/AuthenticationContext.cs
+System.IdentityModel.Tokens/AuthenticationInformation.cs
+System.IdentityModel.Tokens/BinaryKeyIdentifierClause.cs
+System.IdentityModel.Tokens/BootstrapContext.cs
+System.IdentityModel.Tokens/EncryptedKeyIdentifierClause.cs
+System.IdentityModel.Tokens/EncryptingCredentials.cs
+System.IdentityModel.Tokens/GenericXmlSecurityToken.cs
+System.IdentityModel.Tokens/InMemorySymmetricSecurityKey.cs
+System.IdentityModel.Tokens/IssuerNameRegistry.cs
+System.IdentityModel.Tokens/KerberosReceiverSecurityToken.cs
+System.IdentityModel.Tokens/KerberosRequestorSecurityToken.cs
+System.IdentityModel.Tokens/LocalIdKeyIdentifierClause.cs
+System.IdentityModel.Tokens/ProofDescriptor.cs
+System.IdentityModel.Tokens/RsaKeyIdentifierClause.cs
+System.IdentityModel.Tokens/RsaSecurityKey.cs
+System.IdentityModel.Tokens/RsaSecurityToken.cs
+System.IdentityModel.Tokens/SamlAccessDecision.cs
+System.IdentityModel.Tokens/SamlAction.cs
+System.IdentityModel.Tokens/SamlAdvice.cs
+System.IdentityModel.Tokens/SamlAssertion.cs
+System.IdentityModel.Tokens/SamlAssertionKeyIdentifierClause.cs
+System.IdentityModel.Tokens/SamlAttribute.cs
+System.IdentityModel.Tokens/SamlAttributeStatement.cs
+System.IdentityModel.Tokens/SamlAudienceRestrictionCondition.cs
+System.IdentityModel.Tokens/SamlAuthenticationClaimResource.cs
+System.IdentityModel.Tokens/SamlAuthenticationStatement.cs
+System.IdentityModel.Tokens/SamlAuthorityBinding.cs
+System.IdentityModel.Tokens/SamlAuthorizationDecisionClaimResource.cs
+System.IdentityModel.Tokens/SamlAuthorizationDecisionStatement.cs
+System.IdentityModel.Tokens/SamlCondition.cs
+System.IdentityModel.Tokens/SamlConditions.cs
+System.IdentityModel.Tokens/SamlConstants.cs
+System.IdentityModel.Tokens/SamlDoNotCacheCondition.cs
+System.IdentityModel.Tokens/SamlEvidence.cs
+System.IdentityModel.Tokens/SamlNameIdentifierClaimResource.cs
+System.IdentityModel.Tokens/SamlSecurityToken.cs
+System.IdentityModel.Tokens/SamlSerializer.cs
+System.IdentityModel.Tokens/SamlStatement.cs
+System.IdentityModel.Tokens/SamlSubject.cs
+System.IdentityModel.Tokens/SamlSubjectStatement.cs
+System.IdentityModel.Tokens/SecurityAlgorithms.cs
+System.IdentityModel.Tokens/SecurityKey.cs
+System.IdentityModel.Tokens/SecurityKeyIdentifier.cs
+System.IdentityModel.Tokens/SecurityKeyIdentifierClause.cs
+System.IdentityModel.Tokens/SecurityKeyType.cs
+System.IdentityModel.Tokens/SecurityKeyUsage.cs
+System.IdentityModel.Tokens/SecurityToken.cs
+System.IdentityModel.Tokens/SecurityTokenDescriptor.cs
+System.IdentityModel.Tokens/SecurityTokenException.cs
+System.IdentityModel.Tokens/SecurityTokenExpiredException.cs
+System.IdentityModel.Tokens/SecurityTokenHandler.cs
+System.IdentityModel.Tokens/SecurityTokenHandlerCollection.cs
+System.IdentityModel.Tokens/SecurityTokenHandlerConfiguration.cs
+System.IdentityModel.Tokens/SecurityTokenNotYetValidException.cs
+System.IdentityModel.Tokens/SecurityTokenReplayDetectedException.cs
+System.IdentityModel.Tokens/SecurityTokenTypes.cs
+System.IdentityModel.Tokens/SecurityTokenValidationException.cs
+System.IdentityModel.Tokens/SessionSecurityToken.cs
+System.IdentityModel.Tokens/SessionSecurityTokenCache.cs
+System.IdentityModel.Tokens/SessionSecurityTokenCacheKey.cs
+System.IdentityModel.Tokens/SessionSecurityTokenHandler.cs
+System.IdentityModel.Tokens/SigningCredentials.cs
+System.IdentityModel.Tokens/SymmetricSecurityKey.cs
+System.IdentityModel.Tokens/TlsHMAC.cs
+System.IdentityModel.Tokens/TokenReplayCache.cs
+System.IdentityModel.Tokens/UserNameSecurityToken.cs
+System.IdentityModel.Tokens/WindowsSecurityToken.cs
+System.IdentityModel.Tokens/X509AsymmetricSecurityKey.cs
+System.IdentityModel.Tokens/X509IssuerSerialKeyIdentifierClause.cs
+System.IdentityModel.Tokens/X509RawDataKeyIdentifierClause.cs
+System.IdentityModel.Tokens/X509SecurityToken.cs
+System.IdentityModel.Tokens/X509SigningCredentials.cs
+System.IdentityModel.Tokens/X509SubjectKeyIdentifierClause.cs
+System.IdentityModel.Tokens/X509ThumbprintKeyIdentifierClause.cs
+System.IdentityModel.Tokens/X509WindowsSecurityToken.cs
+System.Security.Claims/AuthenticationTypes.cs
+System.ServiceModel.Security/X509CertificateValidationMode.cs
--- /dev/null
+#include mobile_System.IdentityModel.dll.sources
--- /dev/null
+#include net_4_x_System.IdentityModel.dll.sources
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System.Collections.Generic;
+using System.Security.Authentication;
+using System.Security.Cryptography.X509Certificates;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Specialized;
using System.Net.Http.Headers;
+using System.Net.Security;
using System.Linq;
namespace System.Net.Http
return CreateResponseMessage (wresponse, request, cancellationToken);
}
+
+#if NETSTANDARD
+ public bool CheckCertificateRevocationList {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public X509CertificateCollection ClientCertificates {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ICredentials DefaultProxyCredentials {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int MaxConnectionsPerServer {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int MaxResponseHeadersLength {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public IDictionary<string,object> Properties {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public Func<HttpRequestMessage,X509Certificate2,X509Chain,SslPolicyErrors,bool> ServerCertificateCustomValidationCallback {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public SslProtocols SslProtocols {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+#endif
}
}
using System.ServiceModel.Dispatcher;
using System.Text;
using System.Xml;
+using System.Threading;
namespace System.Runtime.CompilerServices
{
namespace System.ServiceModel
{
public class EndpointIdentity {}
- public class InstanceContext
+ public class InstanceContext : CommunicationObject, IExtensibleObject<InstanceContext>
{
- public InstanceContext (object dummy) {}
+ protected internal override TimeSpan DefaultCloseTimeout
+ {
+ get { throw new NotImplementedException (); }
+ }
+
+ protected internal override TimeSpan DefaultOpenTimeout
+ {
+ get { throw new NotImplementedException (); }
+ }
+
+ IExtensionCollection<InstanceContext> IExtensibleObject<InstanceContext>.Extensions
+ {
+ get { throw new NotImplementedException (); }
+ }
+
+ public SynchronizationContext SynchronizationContext {
+ get { throw new NotImplementedException (); }
+ set { throw new NotImplementedException (); }
+ }
+
+ public InstanceContext (object implementation)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public object GetServiceInstance (Message message)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnAbort ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override IAsyncResult OnBeginClose (TimeSpan timeout, AsyncCallback callback, object state)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override IAsyncResult OnBeginOpen (TimeSpan timeout, AsyncCallback callback, object state)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnClose (TimeSpan timeout)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnClosed ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnEndClose (IAsyncResult result)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnEndOpen (IAsyncResult result)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnFaulted ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnOpen (TimeSpan timeout)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnOpened ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnOpening ()
+ {
+ throw new NotImplementedException ();
+ }
}
// introduced for silverlight sdk compatibility
internal class OperationFormatStyleHelper
using System.ServiceModel.Dispatcher;
using System.Text;
using System.Xml;
+using System.Threading;
namespace System.ServiceModel
{
- public class InstanceContext
+ public class InstanceContext : CommunicationObject, IExtensibleObject<InstanceContext>
{
- public InstanceContext (object dummy) {}
+ protected internal override TimeSpan DefaultCloseTimeout
+ {
+ get { throw new NotImplementedException (); }
+ }
+
+ protected internal override TimeSpan DefaultOpenTimeout
+ {
+ get { throw new NotImplementedException (); }
+ }
+
+ IExtensionCollection<InstanceContext> IExtensibleObject<InstanceContext>.Extensions
+ {
+ get { throw new NotImplementedException (); }
+ }
+
+ public SynchronizationContext SynchronizationContext {
+ get { throw new NotImplementedException (); }
+ set { throw new NotImplementedException (); }
+ }
+
+ public InstanceContext (object implementation)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public object GetServiceInstance (Message message)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnAbort ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override IAsyncResult OnBeginClose (TimeSpan timeout, AsyncCallback callback, object state)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override IAsyncResult OnBeginOpen (TimeSpan timeout, AsyncCallback callback, object state)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnClose (TimeSpan timeout)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnClosed ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnEndClose (IAsyncResult result)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnEndOpen (IAsyncResult result)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnFaulted ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnOpen (TimeSpan timeout)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnOpened ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnOpening ()
+ {
+ throw new NotImplementedException ();
+ }
}
}
LIBRARY = System.ServiceModel.dll
-LIB_REFS = System System.Xml System.Core System.Runtime.Serialization
+LIB_REFS = System System.Xml System.Core System.Runtime.Serialization System.IdentityModel
LIB_MCS_FLAGS = \
/nowarn:414,169,67,3005,436,219,618 \
/unsafe \
endif
ifneq (2.1, $(FRAMEWORK_VERSION))
-LIB_REFS += System.Configuration System.Data System.Security System.IdentityModel System.IdentityModel.Selectors System.Transactions System.Messaging System.Web.Services Mono.Security
+LIB_REFS += System.Configuration System.Data System.Security System.IdentityModel.Selectors System.Transactions System.Messaging System.Web.Services Mono.Security
LIB_MCS_FLAGS += /d:NET_3_0
ifndef NO_SYSTEM_WEB_DEPENDENCY
using System.ServiceModel.Channels.Security;
using System.IdentityModel.Selectors;
using System.IdentityModel.Tokens;
-using System.ServiceModel.Security.Tokens;
#endif
+using System.ServiceModel.Security.Tokens;
using System.Text;
namespace System.ServiceModel.Channels
{
internal SecurityBindingElement ()
{
+ MessageSecurityVersion = MessageSecurityVersion.Default;
+ endpoint = new SupportingTokenParameters ();
#if !NET_2_1 && !XAMMAC_4_5
DefaultAlgorithmSuite = SecurityAlgorithmSuite.Default;
- MessageSecurityVersion = MessageSecurityVersion.Default;
KeyEntropyMode = SecurityKeyEntropyMode.CombinedEntropy;
- endpoint = new SupportingTokenParameters ();
operation = new Dictionary<string,SupportingTokenParameters> ();
opt_endpoint = new SupportingTokenParameters ();
opt_operation = new Dictionary<string,SupportingTokenParameters> ();
internal SecurityBindingElement (SecurityBindingElement other)
{
-#if !NET_2_1 && !XAMMAC_4_5
- alg_suite = other.alg_suite;
- key_entropy_mode = other.key_entropy_mode;
security_header_layout = other.security_header_layout;
msg_security_version = other.msg_security_version;
endpoint = other.endpoint.Clone ();
+#if !NET_2_1 && !XAMMAC_4_5
+ alg_suite = other.alg_suite;
+ key_entropy_mode = other.key_entropy_mode;
opt_endpoint = other.opt_endpoint.Clone ();
operation = new Dictionary<string,SupportingTokenParameters> ();
foreach (KeyValuePair<string,SupportingTokenParameters> p in other.operation)
LocalClientSettings = other.LocalClientSettings.Clone ();
}
+ SecurityHeaderLayout security_header_layout;
+ MessageSecurityVersion msg_security_version;
+ SupportingTokenParameters endpoint;
+
#if !NET_2_1 && !XAMMAC_4_5
SecurityAlgorithmSuite alg_suite;
SecurityKeyEntropyMode key_entropy_mode;
- SecurityHeaderLayout security_header_layout;
- MessageSecurityVersion msg_security_version;
- SupportingTokenParameters endpoint, opt_endpoint;
+ SupportingTokenParameters opt_endpoint;
IDictionary<string,SupportingTokenParameters> operation, opt_operation;
LocalServiceSecuritySettings service_settings;
#endif
public LocalClientSecuritySettings LocalClientSettings { get; private set; }
+ public SecurityHeaderLayout SecurityHeaderLayout {
+ get { return security_header_layout; }
+ set { security_header_layout = value; }
+ }
+
+ public MessageSecurityVersion MessageSecurityVersion {
+ get { return msg_security_version; }
+ set { msg_security_version = value; }
+ }
+
+ public SupportingTokenParameters EndpointSupportingTokenParameters {
+ get { return endpoint; }
+ }
+
#if !NET_2_1 && !XAMMAC_4_5
public SecurityAlgorithmSuite DefaultAlgorithmSuite {
get { return alg_suite; }
get { return service_settings; }
}
- public SecurityHeaderLayout SecurityHeaderLayout {
- get { return security_header_layout; }
- set { security_header_layout = value; }
- }
-
- public MessageSecurityVersion MessageSecurityVersion {
- get { return msg_security_version; }
- set { msg_security_version = value; }
- }
-
- public SupportingTokenParameters EndpointSupportingTokenParameters {
- get { return endpoint; }
- }
-
public IDictionary<string,SupportingTokenParameters> OperationSupportingTokenParameters {
get { return operation; }
}
throw new NotImplementedException ();
}
- public static SecurityBindingElement
- CreateSecureConversationBindingElement (SecurityBindingElement binding)
- {
- return CreateSecureConversationBindingElement (binding, false);
- }
-
- public static SecurityBindingElement
- CreateSecureConversationBindingElement (
- SecurityBindingElement binding, bool requireCancellation)
- {
- return CreateSecureConversationBindingElement (binding, requireCancellation, null);
- }
-
- public static SecurityBindingElement
- CreateSecureConversationBindingElement (
- SecurityBindingElement binding, bool requireCancellation,
- ChannelProtectionRequirements protectionRequirements)
- {
- SymmetricSecurityBindingElement be =
- new SymmetricSecurityBindingElement ();
- be.ProtectionTokenParameters =
- new SecureConversationSecurityTokenParameters (
- binding, requireCancellation, protectionRequirements);
- return be;
- }
-
public static SymmetricSecurityBindingElement
CreateSslNegotiationBindingElement (bool requireClientCertificate)
{
}
#endif
+ public static SecurityBindingElement
+ CreateSecureConversationBindingElement (SecurityBindingElement binding)
+ {
+ return CreateSecureConversationBindingElement (binding, false);
+ }
+
+ public static SecurityBindingElement
+ CreateSecureConversationBindingElement (
+ SecurityBindingElement binding, bool requireCancellation)
+ {
+ return CreateSecureConversationBindingElement (binding, requireCancellation, null);
+ }
+
+ public static SecurityBindingElement
+ CreateSecureConversationBindingElement (
+ SecurityBindingElement binding, bool requireCancellation,
+ ChannelProtectionRequirements protectionRequirements)
+ {
+#if !NET_2_1 && !XAMMAC_4_5
+ SymmetricSecurityBindingElement be =
+ new SymmetricSecurityBindingElement ();
+ be.ProtectionTokenParameters =
+ new SecureConversationSecurityTokenParameters (
+ binding, requireCancellation, protectionRequirements);
+ return be;
+#else
+ throw new NotImplementedException ();
+#endif
+ }
+
[MonoTODO]
public static TransportSecurityBindingElement
CreateUserNameOverTransportBindingElement ()
using System.Collections.ObjectModel;
using System.IO;
using System.Net.Security;
+using System.Security.Authentication;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Security;
set { require_client_certificate = value; }
}
+ [MonoTODO]
+ public SslProtocols SslProtocols {
+ get { throw new NotImplementedException (); }
+ set { throw new NotImplementedException (); }
+ }
+
private SslStreamSecurityBindingElement (
SslStreamSecurityBindingElement other)
: base (other)
protected ClientCredentials (ClientCredentials source)
{
userpass = source.userpass.Clone ();
-#if !NET_2_1
- issued_token = source.issued_token.Clone ();
digest = source.digest.Clone ();
initiator = source.initiator.Clone ();
recipient = source.recipient.Clone ();
windows = source.windows.Clone ();
+#if !NET_2_1
+ issued_token = source.issued_token.Clone ();
peer = source.peer.Clone ();
support_interactive = source.support_interactive;
#endif
UserNamePasswordClientCredential userpass =
new UserNamePasswordClientCredential ();
-#if !NET_2_1
- IssuedTokenClientCredential issued_token =
- new IssuedTokenClientCredential ();
+
HttpDigestClientCredential digest =
new HttpDigestClientCredential ();
X509CertificateInitiatorClientCredential initiator =
new X509CertificateRecipientClientCredential ();
WindowsClientCredential windows =
new WindowsClientCredential ();
- PeerCredential peer = new PeerCredential ();
- bool support_interactive = true;
public X509CertificateInitiatorClientCredential ClientCertificate {
get { return initiator; }
get { return digest; }
}
+ public X509CertificateRecipientClientCredential ServiceCertificate {
+ get { return recipient; }
+ }
+
+ public WindowsClientCredential Windows {
+ get { return windows; }
+ }
+
+#if !NET_2_1
+ IssuedTokenClientCredential issued_token =
+ new IssuedTokenClientCredential ();
+ PeerCredential peer = new PeerCredential ();
+ bool support_interactive = true;
+
public IssuedTokenClientCredential IssuedToken {
get { return issued_token; }
}
get { return peer; }
}
- public X509CertificateRecipientClientCredential ServiceCertificate {
- get { return recipient; }
- }
-
public bool SupportInteractive {
get { return support_interactive; }
set { support_interactive = value; }
}
-
- public WindowsClientCredential Windows {
- get { return windows; }
- }
#endif
public UserNamePasswordClientCredential UserName {
using System.ServiceModel.Channels;
using System.ServiceModel.Configuration;
using System.ServiceModel.Description;
-using System.ServiceModel.Security.Tokens;
+using System.ServiceModel.Security.Tokens;
namespace System.ServiceModel.Security
{
StoreName storeName, X509FindType findType,
object findValue)
{
+#if !NET_2_1
certificate = ConfigUtil.CreateCertificateFrom (storeLocation, storeName, findType, findValue);
+#else
+ throw new NotImplementedException ();
+#endif
}
public void SetCertificate (
string subjectName, StoreLocation storeLocation,
StoreName storeName)
{
+#if !NET_2_1
certificate = ConfigUtil.CreateCertificateFrom (storeLocation, storeName, X509FindType.FindBySubjectName, subjectName);
+#else
+ throw new NotImplementedException ();
+#endif
}
}
}
//
using System;
using System.Collections.Generic;
+#if !NET_2_1
using System.IdentityModel.Selectors;
+#endif
using System.Security.Cryptography.X509Certificates;
using System.ServiceModel.Channels;
using System.ServiceModel.Configuration;
X509Certificate2 certificate;
Dictionary<Uri,X509Certificate2> scoped =
new Dictionary<Uri,X509Certificate2> ();
+#if !NET_2_1
X509CertificateValidator validator;
+#endif
X509RevocationMode revocation_mode;
StoreLocation store_loc;
get { return scoped; }
}
+ [MonoTODO]
+ public X509ServiceCertificateAuthentication SslCertificateAuthentication
+ {
+ get { throw new NotImplementedException (); }
+ set { throw new NotImplementedException (); }
+ }
+
public void SetDefaultCertificate (string subjectName,
StoreLocation storeLocation, StoreName storeName)
{
public void SetDefaultCertificate (StoreLocation storeLocation,
StoreName storeName, X509FindType findType, Object findValue)
{
+#if !NET_2_1
DefaultCertificate = ConfigUtil.CreateCertificateFrom (storeLocation, storeName, findType, findValue);
+#else
+ throw new NotImplementedException ();
+#endif
}
public void SetScopedCertificate (string subjectName,
StoreName storeName, X509FindType findType,
Object findValue, Uri targetService)
{
+#if !NET_2_1
ScopedCertificates [targetService] = ConfigUtil.CreateCertificateFrom (storeLocation, storeName, findType, findValue);
+#else
+ throw new NotImplementedException ();
+#endif
}
}
}
[MonoTODO]
public class X509ServiceCertificateAuthentication
{
- internal X509ServiceCertificateAuthentication ()
+ public X509ServiceCertificateAuthentication ()
{
}
set { uri = value; }
}
-#if !NET_2_1
public EndpointIdentity Identity {
get { return identity; }
set { identity = value; }
}
+#if !NET_2_1
public XmlDictionaryReader GetReaderAtExtensions ()
{
if (extension == null)
#endif
MessageCredentialType client_credential_type;
- internal MessageSecurityOverTcp ()
+ public MessageSecurityOverTcp ()
{
#if !MOBILE && !XAMMAC_4_5
alg_suite = SecurityAlgorithmSuite.Default;
//
using System;
using System.Net.Security;
+using System.Security.Authentication;
using System.ServiceModel.Security;
namespace System.ServiceModel
public TcpClientCredentialType ClientCredentialType { get; set; }
public ProtectionLevel ProtectionLevel { get; set; }
+
+ [MonoTODO]
+ public SslProtocols SslProtocols
+ {
+ get { throw new NotImplementedException (); }
+ set { throw new NotImplementedException (); }
+ }
}
}
System.ServiceModel.Security/SecurityAccessDeniedException.cs
System.ServiceModel.Security/UserNamePasswordClientCredential.cs
System.ServiceModel.Security/WindowsClientCredential.cs
+System.ServiceModel.Security/X509CertificateInitiatorClientCredential.cs
+System.ServiceModel.Security/X509CertificateRecipientClientCredential.cs
+System.ServiceModel.Security/X509ServiceCertificateAuthentication.cs
System.ServiceModel/ActionNotSupportedException.cs
System.ServiceModel/AllEnums.cs
System.ServiceModel/HttpBindingBase.cs
System.ServiceModel/MessageSecurityVersion.cs
System.ServiceModel.Security/BasicSecurityProfileVersion.cs
+System.ServiceModel.Security/ChannelProtectionRequirements.cs
System.ServiceModel.Security/SecurityVersion.cs
System.ServiceModel.Security/TrustVersion.cs
+System.ServiceModel.Security/MessagePartSpecification.cs
+System.ServiceModel.Security/ScopedMessagePartSpecification.cs
System.ServiceModel.Security/SecureConversationVersion.cs
System.ServiceModel.Security/SecurityPolicyVersion.cs
System.ServiceModel.Dispatcher/XPathMessageFilter.cs
System.ServiceModel.Security.Tokens/SecurityContextSecurityToken.cs
System.ServiceModel.Security.Tokens/SslnegoCookieResolver.cs
+System.ServiceModel.Security.Tokens/SupportingTokenParameters.cs
System.ServiceModel.Security/ChannelProtectionRequirements.cs
System.ServiceModel.Security/IdentityVerifier.cs
System.ServiceModel.Security/IssuedTokenClientCredential.cs
--- /dev/null
+#if SECURITY_DEP
+//
+// AsyncProtocolRequest.cs
+//
+// Author:
+// Martin Baulig <martin.baulig@xamarin.com>
+//
+// Copyright (c) 2015 Xamarin, Inc.
+//
+using System;
+using System.IO;
+using System.Net;
+using System.Net.Security;
+using SD = System.Diagnostics;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace Mono.Net.Security
+{
+ delegate AsyncOperationStatus AsyncOperation (AsyncProtocolRequest asyncRequest, AsyncOperationStatus status);
+
+ class BufferOffsetSize
+ {
+ public byte[] Buffer;
+ public int Offset;
+ public int Size;
+ public int TotalBytes;
+ public bool Complete;
+
+ public int EndOffset {
+ get { return Offset + Size; }
+ }
+
+ public int Remaining {
+ get { return Buffer.Length - Offset - Size; }
+ }
+
+ public BufferOffsetSize (byte[] buffer, int offset, int size)
+ {
+ Buffer = buffer;
+ Offset = offset;
+ Size = size;
+ Complete = false;
+ }
+
+ public override string ToString ()
+ {
+ return string.Format ("[BufferOffsetSize: {0} {1}]", Offset, Size);
+ }
+ }
+
+ class BufferOffsetSize2 : BufferOffsetSize
+ {
+ public readonly int InitialSize;
+
+ public BufferOffsetSize2 (int size)
+ : base (new byte [size], 0, 0)
+ {
+ InitialSize = size;
+ }
+
+ public void Reset ()
+ {
+ Offset = Size = 0;
+ TotalBytes = 0;
+ Buffer = new byte [InitialSize];
+ Complete = false;
+ }
+
+ public void MakeRoom (int size)
+ {
+ if (Remaining >= size)
+ return;
+
+ int missing = size - Remaining;
+ if (Offset == 0 && Size == 0) {
+ Buffer = new byte [size];
+ return;
+ }
+
+ var buffer = new byte [Buffer.Length + missing];
+ Buffer.CopyTo (buffer, 0);
+ Buffer = buffer;
+ }
+
+ public void AppendData (byte[] buffer, int offset, int size)
+ {
+ MakeRoom (size);
+ System.Buffer.BlockCopy (buffer, offset, Buffer, EndOffset, size);
+ Size += size;
+ }
+ }
+
+ enum AsyncOperationStatus {
+ NotStarted,
+ Initialize,
+ Continue,
+ Running,
+ Complete,
+ WantRead,
+ WantWrite,
+ ReadDone
+ }
+
+ class AsyncProtocolRequest
+ {
+ public readonly MobileAuthenticatedStream Parent;
+ public readonly BufferOffsetSize UserBuffer;
+
+ int RequestedSize;
+ public int CurrentSize;
+ public int UserResult;
+
+ AsyncOperation Operation;
+ int Status;
+
+ public readonly int ID = ++next_id;
+ static int next_id;
+
+ public readonly LazyAsyncResult UserAsyncResult;
+
+ public AsyncProtocolRequest (MobileAuthenticatedStream parent, LazyAsyncResult lazyResult, BufferOffsetSize userBuffer = null)
+ {
+ Parent = parent;
+ UserAsyncResult = lazyResult;
+ UserBuffer = userBuffer;
+ }
+
+ public bool CompleteWithError (Exception ex)
+ {
+ Status = (int)AsyncOperationStatus.Complete;
+ if (UserAsyncResult == null)
+ return true;
+ if (!UserAsyncResult.InternalPeekCompleted)
+ UserAsyncResult.InvokeCallback (ex);
+ return false;
+ }
+
+ [SD.Conditional ("MARTIN_DEBUG")]
+ protected void Debug (string message, params object[] args)
+ {
+ Parent.Debug ("AsyncProtocolRequest({0}:{1}): {2}", Parent.ID, ID, string.Format (message, args));
+ }
+
+ internal void RequestRead (int size)
+ {
+ var oldStatus = (AsyncOperationStatus)Interlocked.CompareExchange (ref Status, (int)AsyncOperationStatus.WantRead, (int)AsyncOperationStatus.Running);
+ Debug ("RequestRead: {0} {1}", oldStatus, size);
+ if (oldStatus == AsyncOperationStatus.Running)
+ RequestedSize = size;
+ else if (oldStatus == AsyncOperationStatus.WantRead)
+ RequestedSize += size;
+ else if (oldStatus != AsyncOperationStatus.WantWrite)
+ throw new InvalidOperationException ();
+ }
+
+ internal void ResetRead ()
+ {
+ var oldStatus = (AsyncOperationStatus)Interlocked.CompareExchange (ref Status, (int)AsyncOperationStatus.Complete, (int)AsyncOperationStatus.WantRead);
+ Debug ("ResetRead: {0} {1}", oldStatus, Status);
+ }
+
+ internal void RequestWrite ()
+ {
+ var oldStatus = (AsyncOperationStatus)Interlocked.CompareExchange (ref Status, (int)AsyncOperationStatus.WantWrite, (int)AsyncOperationStatus.Running);
+ if (oldStatus == AsyncOperationStatus.Running)
+ return;
+ else if (oldStatus != AsyncOperationStatus.WantRead && oldStatus != AsyncOperationStatus.WantWrite)
+ throw new InvalidOperationException ();
+ }
+
+ internal void StartOperation (AsyncOperation operation)
+ {
+ Debug ("Start Operation: {0} {1}", Status, operation);
+ if (Interlocked.CompareExchange (ref Status, (int)AsyncOperationStatus.Initialize, (int)AsyncOperationStatus.NotStarted) != (int)AsyncOperationStatus.NotStarted)
+ throw new InvalidOperationException ();
+
+ Operation = operation;
+
+ if (UserAsyncResult == null) {
+ StartOperation ();
+ return;
+ }
+
+ ThreadPool.QueueUserWorkItem (_ => StartOperation ());
+ }
+
+ void StartOperation ()
+ {
+ try {
+ ProcessOperation ();
+ if (UserAsyncResult != null && !UserAsyncResult.InternalPeekCompleted)
+ UserAsyncResult.InvokeCallback (UserResult);
+ } catch (Exception ex) {
+ if (UserAsyncResult == null)
+ throw;
+ if (!UserAsyncResult.InternalPeekCompleted)
+ UserAsyncResult.InvokeCallback (ex);
+ }
+ }
+
+ void ProcessOperation ()
+ {
+ AsyncOperationStatus status;
+ do {
+ status = (AsyncOperationStatus)Interlocked.Exchange (ref Status, (int)AsyncOperationStatus.Running);
+
+ Debug ("ProcessOperation: {0}", status);
+
+ status = ProcessOperation (status);
+
+ var oldStatus = (AsyncOperationStatus)Interlocked.CompareExchange (ref Status, (int)status, (int)AsyncOperationStatus.Running);
+ Debug ("ProcessOperation done: {0} -> {1}", oldStatus, status);
+
+ if (oldStatus != AsyncOperationStatus.Running) {
+ if (status == oldStatus || status == AsyncOperationStatus.Continue || status == AsyncOperationStatus.Complete)
+ status = oldStatus;
+ else
+ throw new InvalidOperationException ();
+ }
+ } while (status != AsyncOperationStatus.Complete);
+ }
+
+ AsyncOperationStatus ProcessOperation (AsyncOperationStatus status)
+ {
+ if (status == AsyncOperationStatus.WantRead) {
+ if (RequestedSize < 0)
+ throw new InvalidOperationException ();
+ else if (RequestedSize == 0)
+ return AsyncOperationStatus.Continue;
+
+ Debug ("ProcessOperation - read inner: {0}", RequestedSize);
+ var ret = Parent.InnerRead (RequestedSize);
+ Debug ("ProcessOperation - read inner done: {0} - {1}", RequestedSize, ret);
+
+ if (ret < 0)
+ return AsyncOperationStatus.ReadDone;
+
+ RequestedSize -= ret;
+
+ if (ret == 0 || RequestedSize == 0)
+ return AsyncOperationStatus.Continue;
+ else
+ return AsyncOperationStatus.WantRead;
+ } else if (status == AsyncOperationStatus.WantWrite) {
+ Parent.InnerWrite ();
+ return AsyncOperationStatus.Continue;
+ } else if (status == AsyncOperationStatus.Initialize || status == AsyncOperationStatus.Continue) {
+ Debug ("ProcessOperation - continue");
+ status = Operation (this, status);
+ Debug ("ProcessOperation - continue done: {0}", status);
+ return status;
+ } else if (status == AsyncOperationStatus.ReadDone) {
+ Debug ("ProcessOperation - read done");
+ status = Operation (this, status);
+ Debug ("ProcessOperation - read done: {0}", status);
+ return status;
+ }
+
+ throw new InvalidOperationException ();
+ }
+ }
+}
+#endif
--- /dev/null
+//
+// MobileAuthenticatedStream.cs
+//
+// Author:
+// Martin Baulig <martin.baulig@xamarin.com>
+//
+// Copyright (c) 2015 Xamarin, Inc.
+//
+
+#if SECURITY_DEP
+#if MONO_SECURITY_ALIAS
+extern alias MonoSecurity;
+#endif
+
+#if MONO_SECURITY_ALIAS
+using MSI = MonoSecurity::Mono.Security.Interface;
+#else
+using MSI = Mono.Security.Interface;
+#endif
+
+using System;
+using System.IO;
+using System.Net;
+using System.Net.Security;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Security.Cryptography.X509Certificates;
+
+using SD = System.Diagnostics;
+using SSA = System.Security.Authentication;
+using SslProtocols = System.Security.Authentication.SslProtocols;
+
+namespace Mono.Net.Security
+{
+ abstract class MobileAuthenticatedStream : AuthenticatedStream, MSI.IMonoSslStream
+ {
+ MobileTlsContext xobileTlsContext;
+ Exception lastException;
+
+ AsyncProtocolRequest asyncHandshakeRequest;
+ AsyncProtocolRequest asyncReadRequest;
+ AsyncProtocolRequest asyncWriteRequest;
+ BufferOffsetSize2 readBuffer;
+ BufferOffsetSize2 writeBuffer;
+
+ object ioLock = new object ();
+ int closeRequested;
+
+ static int uniqueNameInteger = 123;
+
+ public MobileAuthenticatedStream (Stream innerStream, bool leaveInnerStreamOpen,
+ MSI.MonoTlsSettings settings, MSI.MonoTlsProvider provider)
+ : base (innerStream, leaveInnerStreamOpen)
+ {
+ Settings = settings;
+ Provider = provider;
+
+ readBuffer = new BufferOffsetSize2 (16834);
+ writeBuffer = new BufferOffsetSize2 (16384);
+ }
+
+ public MSI.MonoTlsSettings Settings {
+ get;
+ private set;
+ }
+
+ public MSI.MonoTlsProvider Provider {
+ get;
+ private set;
+ }
+
+ MSI.MonoTlsProvider MSI.IMonoSslStream.Provider {
+ get { return Provider; }
+ }
+
+ internal bool HasContext {
+ get { return xobileTlsContext != null; }
+ }
+
+ internal MobileTlsContext Context {
+ get {
+ CheckThrow (true);
+ return xobileTlsContext;
+ }
+ }
+
+ internal void CheckThrow (bool authSuccessCheck)
+ {
+ if (closeRequested != 0)
+ throw new InvalidOperationException ("Stream is closed.");
+ if (lastException != null)
+ throw lastException;
+ if (authSuccessCheck && !IsAuthenticated)
+ throw new InvalidOperationException ("Must be authenticated.");
+ }
+
+ Exception SetException (Exception e)
+ {
+ e = SetException_internal (e);
+ if (e != null && xobileTlsContext != null)
+ xobileTlsContext.Dispose ();
+ return e;
+ }
+
+ Exception SetException_internal (Exception e)
+ {
+ if (lastException == null)
+ lastException = e;
+ return lastException;
+ }
+
+ SslProtocols DefaultProtocols {
+ get { return SslProtocols.Tls12 | SslProtocols.Tls11 | SslProtocols.Tls; }
+ }
+
+ public void AuthenticateAsClient (string targetHost)
+ {
+ AuthenticateAsClient (targetHost, new X509CertificateCollection (), DefaultProtocols, false);
+ }
+
+ public void AuthenticateAsClient (string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
+ {
+ ValidateCreateContext (false, targetHost, enabledSslProtocols, null, clientCertificates, false);
+ ProcessAuthentication (null);
+ }
+
+ public IAsyncResult BeginAuthenticateAsClient (string targetHost, AsyncCallback asyncCallback, object asyncState)
+ {
+ return BeginAuthenticateAsClient (targetHost, new X509CertificateCollection (), DefaultProtocols, false, asyncCallback, asyncState);
+ }
+
+ public IAsyncResult BeginAuthenticateAsClient (string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState)
+ {
+ ValidateCreateContext (false, targetHost, enabledSslProtocols, null, clientCertificates, false);
+ var result = new LazyAsyncResult (this, asyncState, asyncCallback);
+ ProcessAuthentication (result);
+ return result;
+ }
+
+ public void EndAuthenticateAsClient (IAsyncResult asyncResult)
+ {
+ EndProcessAuthentication (asyncResult);
+ }
+
+ public void AuthenticateAsServer (X509Certificate serverCertificate)
+ {
+ AuthenticateAsServer (serverCertificate, false, DefaultProtocols, false);
+ }
+
+ public void AuthenticateAsServer (X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
+ {
+ ValidateCreateContext (true, string.Empty, enabledSslProtocols, serverCertificate, null, clientCertificateRequired);
+ ProcessAuthentication (null);
+ }
+
+ public IAsyncResult BeginAuthenticateAsServer (X509Certificate serverCertificate, AsyncCallback asyncCallback, object asyncState)
+ {
+ return BeginAuthenticateAsServer (serverCertificate, false, DefaultProtocols, false, asyncCallback, asyncState);
+ }
+
+ public IAsyncResult BeginAuthenticateAsServer (X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState)
+ {
+ ValidateCreateContext (true, string.Empty, enabledSslProtocols, serverCertificate, null, clientCertificateRequired);
+ var result = new LazyAsyncResult (this, asyncState, asyncCallback);
+ ProcessAuthentication (result);
+ return result;
+ }
+
+ public void EndAuthenticateAsServer (IAsyncResult asyncResult)
+ {
+ EndProcessAuthentication (asyncResult);
+ }
+
+ public Task AuthenticateAsClientAsync (string targetHost)
+ {
+ return Task.Factory.FromAsync (BeginAuthenticateAsClient, EndAuthenticateAsClient, targetHost, null);
+ }
+
+ public Task AuthenticateAsClientAsync (string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
+ {
+ return Task.Factory.FromAsync ((callback, state) => BeginAuthenticateAsClient (targetHost, clientCertificates, enabledSslProtocols, checkCertificateRevocation, callback, state), EndAuthenticateAsClient, null);
+ }
+
+ public Task AuthenticateAsServerAsync (X509Certificate serverCertificate)
+ {
+ return Task.Factory.FromAsync (BeginAuthenticateAsServer, EndAuthenticateAsServer, serverCertificate, null);
+ }
+
+ public Task AuthenticateAsServerAsync (X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
+ {
+ return Task.Factory.FromAsync ((callback, state) => BeginAuthenticateAsServer (serverCertificate, clientCertificateRequired, enabledSslProtocols, checkCertificateRevocation, callback, state), EndAuthenticateAsServer, null);
+ }
+
+ public AuthenticatedStream AuthenticatedStream {
+ get { return this; }
+ }
+
+ internal void ProcessAuthentication (LazyAsyncResult lazyResult)
+ {
+ var asyncRequest = new AsyncProtocolRequest (this, lazyResult);
+ if (Interlocked.CompareExchange (ref asyncHandshakeRequest, asyncRequest, null) != null)
+ throw new InvalidOperationException ("Invalid nested call.");
+
+ try {
+ if (lastException != null)
+ throw lastException;
+ if (xobileTlsContext == null)
+ throw new InvalidOperationException ();
+
+ readBuffer.Reset ();
+ writeBuffer.Reset ();
+
+ try {
+ asyncRequest.StartOperation (ProcessHandshake);
+ } catch (Exception ex) {
+ throw SetException (ex);
+ }
+ } finally {
+ if (lazyResult == null || lastException != null) {
+ readBuffer.Reset ();
+ writeBuffer.Reset ();
+ asyncHandshakeRequest = null;
+ }
+ }
+ }
+
+ internal void EndProcessAuthentication (IAsyncResult result)
+ {
+ if (result == null)
+ throw new ArgumentNullException ("asyncResult");
+
+ var lazyResult = (LazyAsyncResult)result;
+ if (Interlocked.Exchange (ref asyncHandshakeRequest, null) == null)
+ throw new InvalidOperationException ("Invalid end call.");
+
+ lazyResult.InternalWaitForCompletion ();
+
+ readBuffer.Reset ();
+ writeBuffer.Reset ();
+
+ var e = lazyResult.Result as Exception;
+ if (e != null)
+ throw SetException (e);
+ }
+
+ internal void ValidateCreateContext (bool serverMode, string targetHost, SslProtocols enabledProtocols, X509Certificate serverCertificate, X509CertificateCollection clientCertificates, bool clientCertRequired)
+ {
+ if (xobileTlsContext != null)
+ throw new InvalidOperationException ();
+
+ if (serverMode) {
+ if (serverCertificate == null)
+ throw new ArgumentException ("serverCertificate");
+ } else {
+ if (targetHost == null)
+ throw new ArgumentException ("targetHost");
+ if (targetHost.Length == 0)
+ targetHost = "?" + Interlocked.Increment (ref uniqueNameInteger).ToString (NumberFormatInfo.InvariantInfo);
+ }
+
+ xobileTlsContext = CreateContext (this, serverMode, targetHost, enabledProtocols, serverCertificate, clientCertificates, clientCertRequired);
+ }
+
+ protected abstract MobileTlsContext CreateContext (
+ MobileAuthenticatedStream parent, bool serverMode, string targetHost,
+ SSA.SslProtocols enabledProtocols, X509Certificate serverCertificate,
+ X509CertificateCollection clientCertificates, bool askForClientCert);
+
+ public override IAsyncResult BeginRead (byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState)
+ {
+ return BeginReadOrWrite (ref asyncReadRequest, ref readBuffer, ProcessRead, new BufferOffsetSize (buffer, offset, count), asyncCallback, asyncState);
+ }
+
+ public override int EndRead (IAsyncResult asyncResult)
+ {
+ return (int)EndReadOrWrite (asyncResult, ref asyncReadRequest);
+ }
+
+ public override IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState)
+ {
+ return BeginReadOrWrite (ref asyncWriteRequest, ref writeBuffer, ProcessWrite, new BufferOffsetSize (buffer, offset, count), asyncCallback, asyncState);
+ }
+
+ public override void EndWrite (IAsyncResult asyncResult)
+ {
+ EndReadOrWrite (asyncResult, ref asyncWriteRequest);
+ }
+
+ public override int Read (byte[] buffer, int offset, int count)
+ {
+ return ProcessReadOrWrite (ref asyncReadRequest, ref readBuffer, ProcessRead, new BufferOffsetSize (buffer, offset, count), null);
+ }
+
+ public void Write (byte[] buffer)
+ {
+ Write (buffer, 0, buffer.Length);
+ }
+ public override void Write (byte[] buffer, int offset, int count)
+ {
+ ProcessReadOrWrite (ref asyncWriteRequest, ref writeBuffer, ProcessWrite, new BufferOffsetSize (buffer, offset, count), null);
+ }
+
+ IAsyncResult BeginReadOrWrite (ref AsyncProtocolRequest nestedRequest, ref BufferOffsetSize2 internalBuffer, AsyncOperation operation, BufferOffsetSize userBuffer, AsyncCallback asyncCallback, object asyncState)
+ {
+ LazyAsyncResult lazyResult = new LazyAsyncResult (this, asyncState, asyncCallback);
+ ProcessReadOrWrite (ref nestedRequest, ref internalBuffer, operation, userBuffer, lazyResult);
+ return lazyResult;
+ }
+
+ object EndReadOrWrite (IAsyncResult asyncResult, ref AsyncProtocolRequest nestedRequest)
+ {
+ if (asyncResult == null)
+ throw new ArgumentNullException("asyncResult");
+
+ var lazyResult = (LazyAsyncResult)asyncResult;
+
+ if (Interlocked.Exchange (ref nestedRequest, null) == null)
+ throw new InvalidOperationException ("Invalid end call.");
+
+ // No "artificial" timeouts implemented so far, InnerStream controls timeout.
+ lazyResult.InternalWaitForCompletion ();
+
+ Debug ("EndReadOrWrite");
+
+ var e = lazyResult.Result as Exception;
+ if (e != null) {
+ var ioEx = e as IOException;
+ if (ioEx != null)
+ throw ioEx;
+ throw new IOException ("read failed", e);
+ }
+
+ return lazyResult.Result;
+ }
+
+ int ProcessReadOrWrite (ref AsyncProtocolRequest nestedRequest, ref BufferOffsetSize2 internalBuffer, AsyncOperation operation, BufferOffsetSize userBuffer, LazyAsyncResult lazyResult)
+ {
+ if (userBuffer == null || userBuffer.Buffer == null)
+ throw new ArgumentNullException ("buffer");
+ if (userBuffer.Offset < 0)
+ throw new ArgumentOutOfRangeException ("offset");
+ if (userBuffer.Size < 0 || userBuffer.Offset + userBuffer.Size > userBuffer.Buffer.Length)
+ throw new ArgumentOutOfRangeException ("count");
+
+ CheckThrow (true);
+
+ var name = internalBuffer == readBuffer ? "read" : "write";
+ Debug ("ProcessReadOrWrite: {0} {1}", name, userBuffer);
+
+ var asyncRequest = new AsyncProtocolRequest (this, lazyResult, userBuffer);
+ return StartOperation (ref nestedRequest, ref internalBuffer, operation, asyncRequest, name);
+ }
+
+ int StartOperation (ref AsyncProtocolRequest nestedRequest, ref BufferOffsetSize2 internalBuffer, AsyncOperation operation, AsyncProtocolRequest asyncRequest, string name)
+ {
+ if (Interlocked.CompareExchange (ref nestedRequest, asyncRequest, null) != null)
+ throw new InvalidOperationException ("Invalid nested call.");
+
+ bool failed = false;
+ try {
+ internalBuffer.Reset ();
+ asyncRequest.StartOperation (operation);
+ return asyncRequest.UserResult;
+ } catch (Exception e) {
+ failed = true;
+ if (e is IOException)
+ throw;
+ throw new IOException (name + " failed", e);
+ } finally {
+ if (asyncRequest.UserAsyncResult == null || failed) {
+ internalBuffer.Reset ();
+ nestedRequest = null;
+ }
+ }
+ }
+
+ static int nextId;
+ internal readonly int ID = ++nextId;
+
+ [SD.Conditional ("MARTIN_DEBUG")]
+ protected internal void Debug (string message, params object[] args)
+ {
+ Console.Error.WriteLine ("MobileAuthenticatedStream({0}): {1}", ID, string.Format (message, args));
+ }
+
+ #region Called back from native code via SslConnection
+
+ /*
+ * Called from within SSLRead() and SSLHandshake(). We only access tha managed byte[] here.
+ */
+ internal int InternalRead (byte[] buffer, int offset, int size, out bool wantMore)
+ {
+ try {
+ Debug ("InternalRead: {0} {1} {2} {3}", offset, size, asyncReadRequest != null, readBuffer != null);
+ var asyncRequest = asyncHandshakeRequest ?? asyncReadRequest;
+ return InternalRead (asyncRequest, readBuffer, buffer, offset, size, out wantMore);
+ } catch (Exception ex) {
+ Debug ("InternalRead failed: {0}", ex);
+ SetException_internal (ex);
+ wantMore = false;
+ return -1;
+ }
+ }
+
+ int InternalRead (AsyncProtocolRequest asyncRequest, BufferOffsetSize internalBuffer, byte[] buffer, int offset, int size, out bool wantMore)
+ {
+ if (asyncRequest == null)
+ throw new InvalidOperationException ();
+
+ Debug ("InternalRead: {0} {1} {2}", internalBuffer, offset, size);
+
+ /*
+ * One of Apple's native functions wants to read 'size' bytes of data.
+ *
+ * First, we check whether we already have enough in the internal buffer.
+ *
+ * If the internal buffer is empty (it will be the first time we're called), we save
+ * the amount of bytes that were requested and return 'SslStatus.WouldBlock' to our
+ * native caller. This native function will then return this code to managed code,
+ * where we read the requested amount of data into the internal buffer, then call the
+ * native function again.
+ */
+ if (internalBuffer.Size == 0 && !internalBuffer.Complete) {
+ Debug ("InternalRead #1: {0} {1}", internalBuffer.Offset, internalBuffer.TotalBytes);
+ internalBuffer.Offset = internalBuffer.Size = 0;
+ asyncRequest.RequestRead (size);
+ wantMore = true;
+ return 0;
+ }
+
+ /*
+ * The second time we're called, the native buffer will contain the exact amount of data that the
+ * previous call requested from us, so we should be able to return it all here. However, just in
+ * case that Apple's native function changed its mind, we can also return less.
+ *
+ * In either case, if we have any data buffered, then we return as much of it as possible - if the
+ * native code isn't satisfied, then it will call us again to request more.
+ */
+ var len = System.Math.Min (internalBuffer.Size, size);
+ Buffer.BlockCopy (internalBuffer.Buffer, internalBuffer.Offset, buffer, offset, len);
+ internalBuffer.Offset += len;
+ internalBuffer.Size -= len;
+ wantMore = !internalBuffer.Complete && len < size;
+ return len;
+ }
+
+ /*
+ * We may get called from SSLWrite(), SSLHandshake() or SSLClose().
+ */
+ internal bool InternalWrite (byte[] buffer, int offset, int size)
+ {
+ try {
+ Debug ("InternalWrite: {0} {1}", offset, size);
+ var asyncRequest = asyncHandshakeRequest ?? asyncWriteRequest;
+ return InternalWrite (asyncRequest, writeBuffer, buffer, offset, size);
+ } catch (Exception ex) {
+ Debug ("InternalWrite failed: {0}", ex);
+ SetException_internal (ex);
+ return false;
+ }
+ }
+
+ bool InternalWrite (AsyncProtocolRequest asyncRequest, BufferOffsetSize2 internalBuffer, byte[] buffer, int offset, int size)
+ {
+ Debug ("InternalWrite: {0} {1} {2} {3}", asyncRequest != null, internalBuffer, offset, size);
+
+ if (asyncRequest == null) {
+ /*
+ * The only situation where 'asyncRequest' could possibly be 'null' is when we're called
+ * from within SSLClose() - which might attempt to send the close_notity notification.
+ * Since this notification message is very small, it should definitely fit into our internal
+ * buffer, so we just save it in there and after SSLClose() returns, the final call to
+ * InternalFlush() - just before closing the underlying stream - will send it out.
+ */
+ if (lastException != null)
+ return false;
+
+ if (Interlocked.Exchange (ref closeRequested, 1) == 0)
+ internalBuffer.Reset ();
+ else if (internalBuffer.Remaining == 0)
+ throw new InvalidOperationException ();
+ }
+
+ /*
+ * Normal write - can be either SSLWrite() or SSLHandshake().
+ *
+ * It is important that we always accept all the data and queue it.
+ */
+
+ internalBuffer.AppendData (buffer, offset, size);
+
+ /*
+ * Calling 'asyncRequest.RequestWrite()' here ensures that ProcessWrite() is called next
+ * time we regain control from native code.
+ *
+ * During the handshake, the native code won't actually realize (unless if attempts to send
+ * so much that the write buffer gets full) that we only buffered the data.
+ *
+ * However, it doesn't matter because it will either return with a completed handshake
+ * (and doesn't care whether the remote actually received the data) or it will expect more
+ * data from the remote and request a read. In either case, we regain control in managed
+ * code and can flush out the data.
+ *
+ * Note that a calling RequestWrite() followed by RequestRead() will first flush the write
+ * queue once we return to managed code - before attempting to read anything.
+ */
+ if (asyncRequest != null)
+ asyncRequest.RequestWrite ();
+
+ return true;
+ }
+
+ #endregion
+
+ #region Inner Stream
+
+ /*
+ * Read / write data from the inner stream; we're only called from managed code and only manipulate
+ * the internal buffers.
+ */
+ internal int InnerRead (int requestedSize)
+ {
+ Debug ("InnerRead: {0} {1} {2} {3}", readBuffer.Offset, readBuffer.Size, readBuffer.Remaining, requestedSize);
+
+ var len = System.Math.Min (readBuffer.Remaining, requestedSize);
+ if (len == 0)
+ throw new InvalidOperationException ();
+ var ret = InnerStream.Read (readBuffer.Buffer, readBuffer.EndOffset, len);
+ Debug ("InnerRead done: {0} {1} - {2}", readBuffer.Remaining, len, ret);
+
+ if (ret >= 0) {
+ readBuffer.Size += ret;
+ readBuffer.TotalBytes += ret;
+ }
+
+ if (ret == 0) {
+ readBuffer.Complete = true;
+ Debug ("InnerRead - end of stream!");
+ /*
+ * Try to distinguish between a graceful close - first Read() returned 0 - and
+ * the remote prematurely closing the connection without sending us all data.
+ */
+ if (readBuffer.TotalBytes > 0)
+ ret = -1;
+ }
+
+ Debug ("InnerRead done: {0} - {1} {2}", readBuffer, len, ret);
+ return ret;
+ }
+
+ internal void InnerWrite ()
+ {
+ Debug ("InnerWrite: {0} {1}", writeBuffer.Offset, writeBuffer.Size);
+ InnerFlush ();
+ }
+
+ internal void InnerFlush ()
+ {
+ if (writeBuffer.Size > 0) {
+ InnerStream.Write (writeBuffer.Buffer, writeBuffer.Offset, writeBuffer.Size);
+ writeBuffer.TotalBytes += writeBuffer.Size;
+ writeBuffer.Offset = writeBuffer.Size = 0;
+ }
+ }
+
+ #endregion
+
+ #region Main async I/O loop
+
+ AsyncOperationStatus ProcessHandshake (AsyncProtocolRequest asyncRequest, AsyncOperationStatus status)
+ {
+ Debug ("ProcessHandshake: {0}", status);
+
+ /*
+ * The first time we're called (AsyncOperationStatus.Initialize), we need to setup the SslContext and
+ * start the handshake.
+ */
+ if (status == AsyncOperationStatus.Initialize) {
+ xobileTlsContext.StartHandshake ();
+ return AsyncOperationStatus.Continue;
+ } else if (status == AsyncOperationStatus.ReadDone) {
+ // remote prematurely closed connection.
+ throw new IOException ("Remote prematurely closed connection.");
+ } else if (status != AsyncOperationStatus.Continue) {
+ throw new InvalidOperationException ();
+ }
+
+ /*
+ * SSLHandshake() will return repeatedly with 'SslStatus.WouldBlock', we then need
+ * to take care of I/O and call it again.
+ */
+ if (!xobileTlsContext.ProcessHandshake ()) {
+ /*
+ * Flush the internal write buffer.
+ */
+ InnerFlush ();
+ return AsyncOperationStatus.Continue;
+ }
+
+ xobileTlsContext.FinishHandshake ();
+ return AsyncOperationStatus.Complete;
+ }
+
+ AsyncOperationStatus ProcessRead (AsyncProtocolRequest asyncRequest, AsyncOperationStatus status)
+ {
+ Debug ("ProcessRead - read user: {0} {1}", status, asyncRequest.UserBuffer);
+
+ int ret;
+ bool wantMore;
+ lock (ioLock) {
+ ret = Context.Read (asyncRequest.UserBuffer.Buffer, asyncRequest.UserBuffer.Offset, asyncRequest.UserBuffer.Size, out wantMore);
+ }
+ Debug ("ProcessRead - read user done: {0} - {1} {2}", asyncRequest.UserBuffer, ret, wantMore);
+
+ if (ret < 0) {
+ asyncRequest.UserResult = -1;
+ return AsyncOperationStatus.Complete;
+ }
+
+ asyncRequest.CurrentSize += ret;
+ asyncRequest.UserBuffer.Offset += ret;
+ asyncRequest.UserBuffer.Size -= ret;
+
+ Debug ("Process Read - read user done #1: {0} - {1} {2}", asyncRequest.UserBuffer, asyncRequest.CurrentSize, wantMore);
+
+ if (wantMore && asyncRequest.CurrentSize == 0)
+ return AsyncOperationStatus.WantRead;
+
+ asyncRequest.ResetRead ();
+ asyncRequest.UserResult = asyncRequest.CurrentSize;
+ return AsyncOperationStatus.Complete;
+ }
+
+ AsyncOperationStatus ProcessWrite (AsyncProtocolRequest asyncRequest, AsyncOperationStatus status)
+ {
+ Debug ("ProcessWrite - write user: {0} {1}", status, asyncRequest.UserBuffer);
+
+ if (asyncRequest.UserBuffer.Size == 0) {
+ asyncRequest.UserResult = asyncRequest.CurrentSize;
+ return AsyncOperationStatus.Complete;
+ }
+
+ int ret;
+ bool wantMore;
+ lock (ioLock) {
+ ret = Context.Write (asyncRequest.UserBuffer.Buffer, asyncRequest.UserBuffer.Offset, asyncRequest.UserBuffer.Size, out wantMore);
+ }
+ Debug ("ProcessWrite - write user done: {0} - {1} {2}", asyncRequest.UserBuffer, ret, wantMore);
+
+ if (ret < 0) {
+ asyncRequest.UserResult = -1;
+ return AsyncOperationStatus.Complete;
+ }
+
+ asyncRequest.CurrentSize += ret;
+ asyncRequest.UserBuffer.Offset += ret;
+ asyncRequest.UserBuffer.Size -= ret;
+
+ if (wantMore || writeBuffer.Size > 0)
+ return AsyncOperationStatus.WantWrite;
+
+ asyncRequest.UserResult = asyncRequest.CurrentSize;
+ return AsyncOperationStatus.Complete;
+ }
+
+ AsyncOperationStatus ProcessClose (AsyncProtocolRequest asyncRequest, AsyncOperationStatus status)
+ {
+ Debug ("ProcessClose: {0}", status);
+
+ lock (ioLock) {
+ if (xobileTlsContext == null)
+ return AsyncOperationStatus.Complete;
+
+ xobileTlsContext.Close ();
+ xobileTlsContext = null;
+ return AsyncOperationStatus.Continue;
+ }
+ }
+
+ AsyncOperationStatus ProcessFlush (AsyncProtocolRequest asyncRequest, AsyncOperationStatus status)
+ {
+ Debug ("ProcessFlush: {0}", status);
+ return AsyncOperationStatus.Complete;
+ }
+
+ #endregion
+
+ public override bool IsServer {
+ get { return xobileTlsContext != null && xobileTlsContext.IsServer; }
+ }
+
+ public override bool IsAuthenticated {
+ get { return xobileTlsContext != null && lastException == null && xobileTlsContext.IsAuthenticated; }
+ }
+
+ public override bool IsMutuallyAuthenticated {
+ get {
+ return IsAuthenticated &&
+ (Context.IsServer? Context.LocalServerCertificate: Context.LocalClientCertificate) != null &&
+ Context.IsRemoteCertificateAvailable;
+ }
+ }
+
+ protected override void Dispose (bool disposing)
+ {
+ try {
+ lastException = new ObjectDisposedException ("MobileAuthenticatedStream");
+ lock (ioLock) {
+ if (xobileTlsContext != null) {
+ xobileTlsContext.Dispose ();
+ xobileTlsContext = null;
+ }
+ }
+ } finally {
+ base.Dispose (disposing);
+ }
+ }
+
+ public override void Flush ()
+ {
+ CheckThrow (true);
+ var asyncRequest = new AsyncProtocolRequest (this, null);
+ StartOperation (ref asyncWriteRequest, ref writeBuffer, ProcessFlush, asyncRequest, "flush");
+ }
+
+ public override void Close ()
+ {
+ /*
+ * SSLClose() is a little bit tricky as it might attempt to send a close_notify alert
+ * and thus call our write callback.
+ *
+ * It is also not thread-safe with SSLRead() or SSLWrite(), so we need to take the I/O lock here.
+ */
+ if (Interlocked.Exchange (ref closeRequested, 1) == 1)
+ return;
+ if (xobileTlsContext == null)
+ return;
+
+ var asyncRequest = new AsyncProtocolRequest (this, null);
+ StartOperation (ref asyncWriteRequest, ref writeBuffer, ProcessClose, asyncRequest, "close");
+ }
+
+ //
+ // 'xobileTlsContext' must not be accessed below this point.
+ //
+
+ public override long Seek (long offset, SeekOrigin origin)
+ {
+ throw new NotSupportedException ();
+ }
+
+ public override void SetLength (long value)
+ {
+ InnerStream.SetLength (value);
+ }
+
+ public TransportContext TransportContext {
+ get { throw new NotSupportedException (); }
+ }
+
+ public override bool CanRead {
+ get { return IsAuthenticated && InnerStream.CanRead; }
+ }
+
+ public override bool CanTimeout {
+ get { return InnerStream.CanTimeout; }
+ }
+
+ public override bool CanWrite {
+ get { return IsAuthenticated & InnerStream.CanWrite; }
+ }
+
+ public override bool CanSeek {
+ get { return false; }
+ }
+
+ public override long Length {
+ get { return InnerStream.Length; }
+ }
+
+ public override long Position {
+ get { return InnerStream.Position; }
+ set { throw new NotSupportedException (); }
+ }
+
+ public override bool IsEncrypted {
+ get { return IsAuthenticated; }
+ }
+
+ public override bool IsSigned {
+ get { return IsAuthenticated; }
+ }
+
+ public override int ReadTimeout {
+ get { return InnerStream.ReadTimeout; }
+ set { InnerStream.ReadTimeout = value; }
+ }
+
+ public override int WriteTimeout {
+ get { return InnerStream.WriteTimeout; }
+ set { InnerStream.WriteTimeout = value; }
+ }
+
+ public SslProtocols SslProtocol {
+ get {
+ CheckThrow (true);
+ return (SslProtocols)Context.NegotiatedProtocol;
+ }
+ }
+
+ public X509Certificate RemoteCertificate {
+ get {
+ CheckThrow (true);
+ return Context.RemoteCertificate;
+ }
+ }
+
+ public X509Certificate LocalCertificate {
+ get {
+ CheckThrow (true);
+ return InternalLocalCertificate;
+ }
+ }
+
+ public X509Certificate InternalLocalCertificate {
+ get {
+ CheckThrow (false);
+ if (!HasContext)
+ return null;
+ return Context.IsServer ? Context.LocalServerCertificate : Context.LocalClientCertificate;
+ }
+ }
+
+ public MSI.MonoTlsConnectionInfo GetConnectionInfo ()
+ {
+ CheckThrow (true);
+ return Context.ConnectionInfo;
+ }
+
+ public SSA.CipherAlgorithmType CipherAlgorithm {
+ get {
+ CheckThrow (true);
+ var info = Context.ConnectionInfo;
+ if (info == null)
+ return SSA.CipherAlgorithmType.None;
+ switch (info.CipherAlgorithmType) {
+ case MSI.CipherAlgorithmType.Aes128:
+ case MSI.CipherAlgorithmType.AesGcm128:
+ return SSA.CipherAlgorithmType.Aes128;
+ case MSI.CipherAlgorithmType.Aes256:
+ case MSI.CipherAlgorithmType.AesGcm256:
+ return SSA.CipherAlgorithmType.Aes256;
+ default:
+ return SSA.CipherAlgorithmType.None;
+ }
+ }
+ }
+
+ public SSA.HashAlgorithmType HashAlgorithm {
+ get {
+ CheckThrow (true);
+ var info = Context.ConnectionInfo;
+ if (info == null)
+ return SSA.HashAlgorithmType.None;
+ switch (info.HashAlgorithmType) {
+ case MSI.HashAlgorithmType.Md5:
+ case MSI.HashAlgorithmType.Md5Sha1:
+ return SSA.HashAlgorithmType.Md5;
+ case MSI.HashAlgorithmType.Sha1:
+ case MSI.HashAlgorithmType.Sha224:
+ case MSI.HashAlgorithmType.Sha256:
+ case MSI.HashAlgorithmType.Sha384:
+ case MSI.HashAlgorithmType.Sha512:
+ return SSA.HashAlgorithmType.Sha1;
+ default:
+ return SSA.HashAlgorithmType.None;
+ }
+ }
+ }
+
+ public SSA.ExchangeAlgorithmType KeyExchangeAlgorithm {
+ get {
+ CheckThrow (true);
+ var info = Context.ConnectionInfo;
+ if (info == null)
+ return SSA.ExchangeAlgorithmType.None;
+ switch (info.ExchangeAlgorithmType) {
+ case MSI.ExchangeAlgorithmType.Rsa:
+ return SSA.ExchangeAlgorithmType.RsaSign;
+ case MSI.ExchangeAlgorithmType.Dhe:
+ case MSI.ExchangeAlgorithmType.EcDhe:
+ return SSA.ExchangeAlgorithmType.DiffieHellman;
+ default:
+ return SSA.ExchangeAlgorithmType.None;
+ }
+ }
+ }
+
+ #region Need to Implement
+ public int CipherStrength {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+ public int HashStrength {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+ public int KeyExchangeStrength {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+ public bool CheckCertRevocationStatus {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ #endregion
+ }
+}
+#endif
--- /dev/null
+//
+// MobileTlsContext.cs
+//
+// Author:
+// Martin Baulig <martin.baulig@xamarin.com>
+//
+// Copyright (c) 2015 Xamarin, Inc.
+//
+
+#if SECURITY_DEP
+#if MONO_SECURITY_ALIAS
+extern alias MonoSecurity;
+#endif
+
+#if MONO_SECURITY_ALIAS
+using MonoSecurity::Mono.Security.Interface;
+#else
+using Mono.Security.Interface;
+#endif
+
+using System;
+using System.IO;
+using SD = System.Diagnostics;
+using System.Collections;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Security.Authentication;
+using System.Security.Cryptography.X509Certificates;
+
+namespace Mono.Net.Security
+{
+ abstract class MobileTlsContext : IDisposable
+ {
+ MobileAuthenticatedStream parent;
+ bool serverMode;
+ string targetHost;
+ SslProtocols enabledProtocols;
+ X509Certificate serverCertificate;
+ X509CertificateCollection clientCertificates;
+ bool askForClientCert;
+ ICertificateValidator2 certificateValidator;
+
+ public MobileTlsContext (
+ MobileAuthenticatedStream parent, bool serverMode, string targetHost,
+ SslProtocols enabledProtocols, X509Certificate serverCertificate,
+ X509CertificateCollection clientCertificates, bool askForClientCert)
+ {
+ this.parent = parent;
+ this.serverMode = serverMode;
+ this.targetHost = targetHost;
+ this.enabledProtocols = enabledProtocols;
+ this.serverCertificate = serverCertificate;
+ this.clientCertificates = clientCertificates;
+ this.askForClientCert = askForClientCert;
+
+ certificateValidator = CertificateValidationHelper.GetDefaultValidator (
+ parent.Settings, parent.Provider);
+ }
+
+ internal MobileAuthenticatedStream Parent {
+ get { return parent; }
+ }
+
+ public MonoTlsSettings Settings {
+ get { return parent.Settings; }
+ }
+
+ public MonoTlsProvider Provider {
+ get { return parent.Provider; }
+ }
+
+ [SD.Conditional ("MARTIN_DEBUG")]
+ protected void Debug (string message, params object[] args)
+ {
+ Console.Error.WriteLine ("{0}: {1}", GetType ().Name, string.Format (message, args));
+ }
+
+ public abstract bool HasContext {
+ get;
+ }
+
+ public abstract bool IsAuthenticated {
+ get;
+ }
+
+ public bool IsServer {
+ get { return serverMode; }
+ }
+
+ protected string TargetHost {
+ get { return targetHost; }
+ }
+
+ protected bool AskForClientCertificate {
+ get { return askForClientCert; }
+ }
+
+ protected SslProtocols EnabledProtocols {
+ get { return enabledProtocols; }
+ }
+
+ protected X509CertificateCollection ClientCertificates {
+ get { return clientCertificates; }
+ }
+
+ protected void GetProtocolVersions (out TlsProtocolCode min, out TlsProtocolCode max)
+ {
+ if ((enabledProtocols & SslProtocols.Tls) != 0)
+ min = TlsProtocolCode.Tls10;
+ else if ((enabledProtocols & SslProtocols.Tls11) != 0)
+ min = TlsProtocolCode.Tls11;
+ else
+ min = TlsProtocolCode.Tls12;
+
+ if ((enabledProtocols & SslProtocols.Tls12) != 0)
+ max = TlsProtocolCode.Tls12;
+ else if ((enabledProtocols & SslProtocols.Tls11) != 0)
+ max = TlsProtocolCode.Tls11;
+ else
+ max = TlsProtocolCode.Tls10;
+ }
+
+ public abstract void StartHandshake ();
+
+ public abstract bool ProcessHandshake ();
+
+ public abstract void FinishHandshake ();
+
+ public abstract MonoTlsConnectionInfo ConnectionInfo {
+ get;
+ }
+
+ internal X509Certificate LocalServerCertificate {
+ get { return serverCertificate; }
+ }
+
+ internal abstract bool IsRemoteCertificateAvailable {
+ get;
+ }
+
+ internal abstract X509Certificate LocalClientCertificate {
+ get;
+ }
+
+ public abstract X509Certificate RemoteCertificate {
+ get;
+ }
+
+ public abstract TlsProtocols NegotiatedProtocol {
+ get;
+ }
+
+ public abstract void Flush ();
+
+ public abstract int Read (byte[] buffer, int offset, int count, out bool wantMore);
+
+ public abstract int Write (byte[] buffer, int offset, int count, out bool wantMore);
+
+ public abstract void Close ();
+
+ protected ValidationResult ValidateCertificate (X509Certificate leaf, X509Chain chain)
+ {
+ return certificateValidator.ValidateCertificate (
+ targetHost, serverMode, leaf, chain);
+ }
+
+ protected X509Certificate SelectClientCertificate (string[] acceptableIssuers)
+ {
+ X509Certificate certificate;
+ var selected = certificateValidator.SelectClientCertificate (
+ targetHost, clientCertificates, serverCertificate,
+ null, out certificate);
+ if (selected)
+ return certificate;
+
+ if (clientCertificates == null || clientCertificates.Count == 0)
+ return null;
+
+ if (clientCertificates.Count == 1)
+ return clientCertificates [0];
+
+ // FIXME: select one.
+ throw new NotImplementedException ();
+ }
+
+ public void Dispose ()
+ {
+ Dispose (true);
+ GC.SuppressFinalize (this);
+ }
+
+ protected virtual void Dispose (bool disposing)
+ {
+ }
+
+ ~MobileTlsContext ()
+ {
+ Dispose (false);
+ }
+ }
+}
+
+#endif
+++ /dev/null
-//
-// 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.
-#if SECURITY_DEP
-#if MONO_SECURITY_ALIAS
-extern alias MonoSecurity;
-#endif
-
-using XHttpWebRequest = System.Net.HttpWebRequest;
-using XSslProtocols = System.Security.Authentication.SslProtocols;
-using XX509CertificateCollection = System.Security.Cryptography.X509Certificates.X509CertificateCollection;
-
-#if MONO_SECURITY_ALIAS
-using MonoSecurity::Mono.Security.Interface;
-#else
-using Mono.Security.Interface;
-#endif
-
-using System;
-using System.IO;
-using System.Net;
-using System.Net.Security;
-using System.Security.Cryptography.X509Certificates;
-
-namespace Mono.Net.Security.Private
-{
- /*
- * Strictly private - do not use outside the Mono.Net.Security directory.
- */
- class MonoDefaultTlsProvider : MonoTlsProviderImpl
- {
- static readonly Guid id = new Guid ("809e77d5-56cc-4da8-b9f0-45e65ba9cceb");
-
- public override Guid ID {
- get { return id; }
- }
-
- public override string Name {
- get { return "legacy"; }
- }
-
- public MonoTlsProvider Provider {
- get { return this; }
- }
-
- 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 XSslProtocols SupportedProtocols {
- get { return XSslProtocols.Ssl3 | XSslProtocols.Tls; }
- }
-
- protected override IMonoSslStream CreateSslStreamImpl (
- Stream innerStream, bool leaveInnerStreamOpen,
- MonoTlsSettings settings)
- {
- return new LegacySslStream (innerStream, leaveInnerStreamOpen, this, settings);
- }
-
- protected override IMonoTlsContext CreateTlsContextImpl (
- string hostname, bool serverMode, TlsProtocols protocolFlags,
- X509Certificate serverCertificate, X509CertificateCollection clientCertificates,
- bool remoteCertRequired, MonoEncryptionPolicy encryptionPolicy,
- MonoTlsSettings settings)
- {
- throw new NotSupportedException ();
- }
- }
-}
-#endif
-
--- /dev/null
+//
+// MonoLegacyTlsProvider.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.
+#if SECURITY_DEP
+#if MONO_SECURITY_ALIAS
+extern alias MonoSecurity;
+#endif
+
+using XHttpWebRequest = System.Net.HttpWebRequest;
+using XSslProtocols = System.Security.Authentication.SslProtocols;
+using XX509CertificateCollection = System.Security.Cryptography.X509Certificates.X509CertificateCollection;
+
+#if MONO_SECURITY_ALIAS
+using MonoSecurity::Mono.Security.Interface;
+#else
+using Mono.Security.Interface;
+#endif
+
+using System;
+using System.IO;
+using System.Net;
+using System.Net.Security;
+using System.Security.Cryptography.X509Certificates;
+
+namespace Mono.Net.Security.Private
+{
+ /*
+ * Strictly private - do not use outside the Mono.Net.Security directory.
+ */
+ class MonoLegacyTlsProvider : MonoTlsProviderImpl
+ {
+ static readonly Guid id = new Guid ("809e77d5-56cc-4da8-b9f0-45e65ba9cceb");
+
+ public override Guid ID {
+ get { return id; }
+ }
+
+ public override string Name {
+ get { return "legacy"; }
+ }
+
+ public MonoTlsProvider Provider {
+ get { return this; }
+ }
+
+ 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 XSslProtocols SupportedProtocols {
+ get { return XSslProtocols.Ssl3 | XSslProtocols.Tls; }
+ }
+
+ protected override IMonoSslStream CreateSslStreamImpl (
+ Stream innerStream, bool leaveInnerStreamOpen,
+ MonoTlsSettings settings)
+ {
+ return new LegacySslStream (innerStream, leaveInnerStreamOpen, this, settings);
+ }
+
+ protected override IMonoTlsContext CreateTlsContextImpl (
+ string hostname, bool serverMode, TlsProtocols protocolFlags,
+ X509Certificate serverCertificate, X509CertificateCollection clientCertificates,
+ bool remoteCertRequired, MonoEncryptionPolicy encryptionPolicy,
+ MonoTlsSettings settings)
+ {
+ throw new NotSupportedException ();
+ }
+ }
+}
+#endif
+
--- /dev/null
+// Copyright 2015 Xamarin Inc. All rights reserved.
+#if SECURITY_DEP
+using System;
+using MSI = Mono.Security.Interface;
+
+namespace Mono.Net.Security
+{
+ static partial class MonoTlsProviderFactory
+ {
+ static MSI.MonoTlsProvider CreateDefaultProviderImpl ()
+ {
+ MSI.MonoTlsProvider provider = null;
+ if (MSI.MonoTlsProviderFactory._PrivateFactoryDelegate != null)
+ provider = MSI.MonoTlsProviderFactory._PrivateFactoryDelegate ();
+ return provider;
+ }
+ }
+}
+#endif
--- /dev/null
+// Copyright 2015 Xamarin Inc. All rights reserved.
+#if SECURITY_DEP
+using System;
+using MSI = Mono.Security.Interface;
+#if HAVE_BTLS
+using Mono.Btls;
+#endif
+
+namespace Mono.Net.Security
+{
+ static partial class MonoTlsProviderFactory
+ {
+ static MSI.MonoTlsProvider CreateDefaultProviderImpl ()
+ {
+ MSI.MonoTlsProvider provider = null;
+ var type = Environment.GetEnvironmentVariable ("XA_TLS_PROVIDER");
+ switch (type) {
+ case null:
+ case "default":
+ case "legacy":
+ return new Private.MonoLegacyTlsProvider ();
+ case "btls":
+#if HAVE_BTLS
+ if (!MonoBtlsProvider.IsSupported ())
+ throw new NotSupportedException ("BTLS in not supported!");
+ return new MonoBtlsProvider ();
+#else
+ throw new NotSupportedException ("BTLS in not supported!");
+#endif
+ default:
+ throw new NotSupportedException (string.Format ("Invalid TLS Provider: `{0}'.", provider));
+ }
+ }
+ }
+}
+#endif
}
}
-#if MONO_FEATURE_NEW_SYSTEM_SOURCE || (!MONOTOUCH && !XAMMAC)
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
* NewSystemSource needs to compile MonoTlsProviderFactory.cs, IMonoTlsProvider.cs,
* MonoTlsProviderWrapper.cs and CallbackHelpers.cs from this directory and only these.
*/
- var userProvider = MSI.MonoTlsProviderFactory.GetProvider ();
- return new Private.MonoTlsProviderWrapper (userProvider);
+ provider = MSI.MonoTlsProviderFactory.GetProvider ();
#else
- return CreateDefaultProviderImpl ();
+ provider = CreateDefaultProviderImpl ();
#endif
-#else
- return null;
+ if (provider != null)
+ return new Private.MonoTlsProviderWrapper (provider);
#endif
+ return null;
}
-#endif
static object locker = new object ();
static IMonoTlsProvider defaultProvider;
return null;
try {
- return (MSI.MonoTlsProvider)Activator.CreateInstance (type);
+ return (MSI.MonoTlsProvider)Activator.CreateInstance (type, true);
} catch (Exception ex) {
throw new NotSupportedException (string.Format ("Unable to instantiate TLS Provider `{0}'.", type), ex);
}
if (providerRegistration != null)
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");
- providerRegistration.Add ("boringtls", "Xamarin.BoringTls.BoringTlsProvider, Xamarin.BoringTls, Version=4.0.0.0, Culture=neutral, PublicKeyToken=672c06b0b8f05406");
+#if HAVE_BTLS
+ if (Mono.Btls.MonoBtlsProvider.IsSupported ())
+ providerRegistration.Add ("btls", "Mono.Btls.MonoBtlsProvider");
+#endif
X509Helper2.Initialize ();
}
}
#if !MOBILE
- static IMonoTlsProvider TryDynamicLoad ()
+ static MSI.MonoTlsProvider TryDynamicLoad ()
{
var variable = Environment.GetEnvironmentVariable ("MONO_TLS_PROVIDER");
if (variable == null)
if (string.Equals (variable, "default", StringComparison.OrdinalIgnoreCase))
return null;
- var provider = LookupProvider (variable, true);
-
- return new Private.MonoTlsProviderWrapper (provider);
+ return LookupProvider (variable, true);
}
-#endif
- static IMonoTlsProvider CreateDefaultProviderImpl ()
+ static MSI.MonoTlsProvider CreateDefaultProviderImpl ()
{
-#if !MOBILE
var provider = TryDynamicLoad ();
if (provider != null)
return provider;
-#endif
- return new Private.MonoDefaultTlsProvider ();
+ return new Private.MonoLegacyTlsProvider ();
}
+#endif
#region Mono.Security visible API
+++ /dev/null
-// Copyright 2015 Xamarin Inc. All rights reserved.
-
-using System;
-using MSI = Mono.Security.Interface;
-
-namespace Mono.Net.Security
-{
- static partial class MonoTlsProviderFactory
- {
- static IMonoTlsProvider CreateDefaultProvider ()
- {
- #if SECURITY_DEP
- MSI.MonoTlsProvider provider = null;
- if (MSI.MonoTlsProviderFactory._PrivateFactoryDelegate != null)
- provider = MSI.MonoTlsProviderFactory._PrivateFactoryDelegate ();
- if (provider != null)
- return new Private.MonoTlsProviderWrapper (provider);
- #endif
- return null;
- }
- }
-}
try {
sslStream.AuthenticateAsClient (
- request.Address.Host, request.ClientCertificates,
+ request.Host, request.ClientCertificates,
(SslProtocols)ServicePointManager.SecurityProtocol,
ServicePointManager.CheckCertificateRevocationList);
protected ProcessModuleCollectionBase InnerList {
get { return this; }
}
+
+ public System.Collections.IEnumerator GetEnumerator ()
+ {
+ return ((System.Collections.IEnumerable)InnerList).GetEnumerator ();
+ }
}
#endif
base.Add (thread);
return Count - 1;
}
+
+ public System.Collections.IEnumerator GetEnumerator ()
+ {
+ return ((System.Collections.IEnumerable)InnerList).GetEnumerator ();
+ }
}
#endif
namespace System.IO
{
- public class FileSystemWatcher
+ public class FileSystemWatcher : IDisposable
{
public FileSystemWatcher () { throw new NotImplementedException (); }
public FileSystemWatcher (string path) { throw new NotImplementedException (); }
protected void OnRenamed (RenamedEventArgs e) { throw new NotImplementedException (); }
public WaitForChangedResult WaitForChanged (WatcherChangeTypes changeType) { throw new NotImplementedException (); }
public WaitForChangedResult WaitForChanged (WatcherChangeTypes changeType, int timeout) { throw new NotImplementedException (); }
+
+ public virtual void Dispose ()
+ {
+ }
+
+ protected virtual void Dispose (bool disposing)
+ {
+ }
}
}
\ No newline at end of file
impl = provider.CreateSslStream (innerStream, leaveInnerStreamOpen, settings);
}
+ [MonoLimitation ("encryptionPolicy is ignored")]
+ public SslStream (Stream innerStream, bool leaveInnerStreamOpen, RemoteCertificateValidationCallback userCertificateValidationCallback, LocalCertificateSelectionCallback userCertificateSelectionCallback, EncryptionPolicy encryptionPolicy)
+ : this (innerStream, leaveInnerStreamOpen, userCertificateValidationCallback, userCertificateSelectionCallback)
+ {
+ }
+
internal SslStream (Stream innerStream, bool leaveInnerStreamOpen, IMonoSslStream impl)
: base (innerStream, leaveInnerStreamOpen)
{
return true;
}
+ public static bool ConnectAsync (SocketType socketType, ProtocolType protocolType, SocketAsyncEventArgs e)
+ {
+ var sock = new Socket (e.RemoteEndPoint.AddressFamily, socketType, protocolType);
+ return sock.ConnectAsync (e);
+ }
+
+ public static void CancelConnectAsync (SocketAsyncEventArgs e)
+ {
+ if (e == null)
+ throw new ArgumentNullException("e");
+
+ if (e.in_progress != 0 && e.LastOperation == SocketAsyncOperation.Connect)
+ e.current_socket.Close();
+ }
+
static AsyncCallback ConnectAsyncCallback = new AsyncCallback (ares => {
SocketAsyncEventArgs e = (SocketAsyncEventArgs) ((SocketAsyncResult) ares).AsyncState;
set { remote_ep = value; }
}
-#if !NET_2_1
public IPPacketInformation ReceiveMessageFromPacketInfo {
get;
private set;
set;
}
+#if !NET_2_1
public TransmitFileOptions SendPacketsFlags {
get;
set;
BufferList = null;
RemoteEndPoint = null;
UserToken = null;
-#if !NET_2_1
SendPacketsElements = null;
-#endif
}
public void Dispose ()
public void Close ()
{
- ((IDisposable) this).Dispose ();
+ Dispose ();
}
public void Connect (IPEndPoint remoteEP)
return client.BeginConnect (host, port, requestCallback, state);
}
- void IDisposable.Dispose ()
+ public void Dispose ()
{
Dispose (true);
GC.SuppressFinalize (this);
socket.Bind (localEP);
}
-#region Close
public void Close ()
{
- ((IDisposable) this).Dispose ();
+ Dispose ();
}
-#endregion
#region Connect
void DoConnect (IPEndPoint endPoint)
#endregion
#region Disposing
- void IDisposable.Dispose ()
+ public void Dispose ()
{
Dispose (true);
GC.SuppressFinalize (this);
{
throw new NotImplementedException ();
}
+
+ public bool Contains (string searchServiceName)
+ {
+ throw new NotImplementedException ();
+ }
}
}
get;
}
+ internal abstract X509CertificateImplCollection IntermediateCertificates {
+ get;
+ }
+
public abstract string GetNameInfo (X509NameType nameType, bool forIssuer);
public abstract void Import (byte[] rawData, string password, X509KeyStorageFlags keyStorageFlags);
X500DistinguishedName issuer_name;
X500DistinguishedName subject_name;
Oid signature_algorithm;
+ X509CertificateImplCollection intermediateCerts;
MX.X509Certificate _cert;
return IntPtr.Zero;
}
- internal X509Certificate2ImplMono (MX.X509Certificate cert)
+ X509Certificate2ImplMono (MX.X509Certificate cert)
{
this._cert = cert;
}
+ X509Certificate2ImplMono (X509Certificate2ImplMono other)
+ {
+ _cert = other._cert;
+ if (other.intermediateCerts != null)
+ intermediateCerts = other.intermediateCerts.Clone ();
+ }
+
public override X509CertificateImpl Clone ()
{
ThrowIfContextInvalid ();
- return new X509Certificate2ImplMono (_cert);
+ return new X509Certificate2ImplMono (this);
}
- #region Implemented X509CertificateImpl members
+#region Implemented X509CertificateImpl members
public override string GetIssuerName (bool legacyV1Mode)
{
}
}
- #endregion
+#endregion
// constructors
cert.RSA = (keypair as RSA);
cert.DSA = (keypair as DSA);
}
+ if (pfx.Certificates.Count > 1) {
+ intermediateCerts = new X509CertificateImplCollection ();
+ foreach (var c in pfx.Certificates) {
+ if (c == cert)
+ continue;
+ var impl = new X509Certificate2ImplMono (c);
+ intermediateCerts.Add (impl, true);
+ }
+ }
return cert;
}
}
issuer_name = null;
subject_name = null;
signature_algorithm = null;
+ if (intermediateCerts != null) {
+ intermediateCerts.Dispose ();
+ intermediateCerts = null;
+ }
}
public override string ToString ()
return GetCertContentType (data);
}
+ internal override X509CertificateImplCollection IntermediateCertificates {
+ get { return intermediateCerts; }
+ }
+
// internal stuff because X509Certificate2 isn't complete enough
// (maybe X509Certificate3 will be better?)
--- /dev/null
+//
+// X509CertificateImplCollection.cs
+//
+// Authors:
+// Martin Baulig <martin.baulig@xamarin.com>
+//
+// Copyright (C) 2016 Xamarin, Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if SECURITY_DEP
+using System.Collections.Generic;
+
+namespace System.Security.Cryptography.X509Certificates
+{
+ internal class X509CertificateImplCollection : IDisposable
+ {
+ List<X509CertificateImpl> list;
+
+ public X509CertificateImplCollection ()
+ {
+ list = new List<X509CertificateImpl> ();
+ }
+
+ X509CertificateImplCollection (X509CertificateImplCollection other)
+ {
+ list = new List<X509CertificateImpl> ();
+ foreach (var impl in other.list)
+ list.Add (impl.Clone ());
+ }
+
+ public int Count {
+ get {
+ return list.Count;
+ }
+ }
+
+ public X509CertificateImpl this[int index] {
+ get {
+ return list[index];
+ }
+ }
+
+ public void Add (X509CertificateImpl impl, bool takeOwnership)
+ {
+ if (!takeOwnership)
+ impl = impl.Clone ();
+ list.Add (impl);
+ }
+
+ public X509CertificateImplCollection Clone ()
+ {
+ return new X509CertificateImplCollection (this);
+ }
+
+ public void Dispose ()
+ {
+ Dispose (true);
+ GC.SuppressFinalize (this);
+ }
+
+ protected virtual void Dispose (bool disposing)
+ {
+ foreach (var impl in list) {
+ try {
+ impl.Dispose ();
+ } catch {
+ ;
+ }
+ }
+ list.Clear ();
+ }
+
+ ~X509CertificateImplCollection ()
+ {
+ Dispose (false);
+ }
+ }
+}
+#endif
using MX = Mono.Security.X509;
#endif
+using Microsoft.Win32.SafeHandles;
using System.Collections;
using System.Text;
get { return Impl.ChainStatus; }
}
+ public SafeX509ChainHandle SafeHandle {
+ get { throw new NotImplementedException (); }
+ }
+
// methods
[MonoTODO ("Not totally RFC3280 compliant, but neither is MS implementation...")]
CtlNotSignatureValid = 262144,
CtlNotValidForUsage = 524288,
OfflineRevocation = 16777216,
- NoIssuanceChainPolicy = 33554432
+ NoIssuanceChainPolicy = 33554432,
+ ExplicitDistrust = 67108864,
+ HasNotSupportedCriticalExtension = 134217728,
+ HasWeakSignature = 1048576,
}
}
namespace System.Security.Cryptography.X509Certificates {
- public sealed class X509Store {
+ public sealed class X509Store : IDisposable {
private string _name;
private StoreLocation _location;
list.Clear ();
}
+ public void Dispose ()
+ {
+ Close ();
+ }
+
public void Open (OpenFlags flags)
{
if (String.IsNullOrEmpty (_name))
System.Security.Cryptography.X509Certificates/X509Certificate2Impl.cs
System.Security.Cryptography.X509Certificates/X509Certificate2ImplMono.cs
System.Security.Cryptography.X509Certificates/X509CertificateCollection.cs
+System.Security.Cryptography.X509Certificates/X509CertificateImplCollection.cs
System.Security.Cryptography.X509Certificates/X509Chain.cs
System.Security.Cryptography.X509Certificates/X509ChainElementCollection.cs
System.Security.Cryptography.X509Certificates/X509ChainElement.cs
System/IOSelector.cs
+Mono.Net.Security/AsyncProtocolRequest.cs
Mono.Net.Security/CallbackHelpers.cs
Mono.Net.Security/ChainValidationHelper.cs
Mono.Net.Security/IMonoTlsProvider.cs
Mono.Net.Security/IMonoSslStream.cs
Mono.Net.Security/LegacySslStream.cs
-Mono.Net.Security/MonoDefaultTlsProvider.cs
+Mono.Net.Security/MobileAuthenticatedStream.cs
+Mono.Net.Security/MobileTlsContext.cs
+Mono.Net.Security/MonoLegacyTlsProvider.cs
Mono.Net.Security/MonoSslStreamImpl.cs
Mono.Net.Security/MonoSslStreamWrapper.cs
Mono.Net.Security/MonoTlsProviderFactory.cs
System.Security.Cryptography.X509Certificates/X509Certificate2Impl.cs
System.Security.Cryptography.X509Certificates/X509Certificate2ImplMono.cs
System.Security.Cryptography.X509Certificates/X509CertificateCollection.cs
+System.Security.Cryptography.X509Certificates/X509CertificateImplCollection.cs
System.Security.Cryptography.X509Certificates/X509Chain.cs
System.Security.Cryptography.X509Certificates/X509ChainElement.cs
System.Security.Cryptography.X509Certificates/X509ChainElementCollection.cs
System.Windows.Input/ICommand.cs
Microsoft.Win32.SafeHandles/SafeX509ChainHandle.cs
+Mono.Net.Security/AsyncProtocolRequest.cs
Mono.Net.Security/CallbackHelpers.cs
Mono.Net.Security/ChainValidationHelper.cs
Mono.Net.Security/IMonoTlsProvider.cs
Mono.Net.Security/IMonoSslStream.cs
Mono.Net.Security/LegacySslStream.cs
-Mono.Net.Security/MonoDefaultTlsProvider.cs
+Mono.Net.Security/MobileAuthenticatedStream.cs
+Mono.Net.Security/MobileTlsContext.cs
+Mono.Net.Security/MonoLegacyTlsProvider.cs
Mono.Net.Security/MonoSslStreamImpl.cs
Mono.Net.Security/MonoSslStreamWrapper.cs
Mono.Net.Security/MonoTlsProviderFactory.cs
#include mobile_System.dll.sources
System/AndroidPlatform.cs
-
+Mono.Net.Security/MonoTlsProviderFactory.Droid.cs
#include mobile_System.dll.sources
MonoTouch/MonoPInvokeCallbackAttribute.cs
Assembly/AssemblyInfoEx.cs
-Mono.Net.Security/MonoTlsProviderFactoryExt.cs
-Mono.Security.Interface/MonoTlsProviderFactoryExt.cs
+Mono.Net.Security/MonoTlsProviderFactory.Apple.cs
+../Mono.Security/Mono.Security.Interface/MonoTlsProviderFactory.Apple.cs
#include mobile_System.dll.sources
Assembly/AssemblyInfoEx.cs
-Mono.Net.Security/MonoTlsProviderFactoryExt.cs
-Mono.Security.Interface/MonoTlsProviderFactoryExt.cs
+Mono.Net.Security/MonoTlsProviderFactory.Apple.cs
+../Mono.Security/Mono.Security.Interface/MonoTlsProviderFactory.Apple.cs
throw new PlatformNotSupportedException ();
}
+ public RegistryKey CreateSubKey (String subkey, bool writable)
+ {
+ throw new PlatformNotSupportedException ();
+ }
+
+ public RegistryKey CreateSubKey (String subkey, bool writable, RegistryOptions options)
+ {
+ throw new PlatformNotSupportedException ();
+ }
+
+ public void DeleteSubKey (string subkey)
+ {
+ }
+
+ public void DeleteSubKey (string subkey, bool throwOnMissingSubKey)
+ {
+ }
+
+ public void DeleteSubKeyTree (string subkey)
+ {
+ }
+
+ public void DeleteSubKeyTree (string subkey, bool throwOnMissingSubKey)
+ {
+ }
+
+ public void DeleteValue (string name)
+ {
+ }
+
+ public void DeleteValue (string name, bool throwOnMissingValue)
+ {
+ }
+
+ public void Flush()
+ {
+ }
+
+ public static RegistryKey FromHandle (SafeRegistryHandle handle)
+ {
+ throw new PlatformNotSupportedException ();
+ }
+
+ public static RegistryKey FromHandle (SafeRegistryHandle handle, RegistryView view)
+ {
+ throw new PlatformNotSupportedException ();
+ }
+
+ public string[] GetSubKeyNames ()
+ {
+ throw new PlatformNotSupportedException ();
+ }
+
+ public object GetValue (string name)
+ {
+ throw new PlatformNotSupportedException ();
+ }
+
public object GetValue (string name, object defaultValue)
{
throw new PlatformNotSupportedException ();
}
- public static object GetValue (string keyName, string valueName, object defaultValue)
+ public object GetValue (string name, object defaultValue, RegistryValueOptions options)
+ {
+ throw new PlatformNotSupportedException ();
+ }
+
+ public RegistryValueKind GetValueKind (string name)
+ {
+ throw new PlatformNotSupportedException ();
+ }
+
+ public string[] GetValueNames ()
+ {
+ throw new PlatformNotSupportedException ();
+ }
+
+ public static RegistryKey OpenBaseKey (RegistryHive hKey, RegistryView view)
+ {
+ throw new PlatformNotSupportedException ();
+ }
+
+ public RegistryKey OpenSubKey (string name)
{
throw new PlatformNotSupportedException ();
}
throw new PlatformNotSupportedException ();
}
+ public RegistryKey OpenSubKey (string name, RegistryRights rights)
+ {
+ throw new PlatformNotSupportedException ();
+ }
+
public void SetValue (string name, object value)
{
}
{
}
- // TODO: Finish full contract API
+ public SafeRegistryHandle Handle {
+ get { throw new PlatformNotSupportedException (); }
+ }
+
+ public string Name {
+ get { throw new PlatformNotSupportedException (); }
+ }
+
+ public int SubKeyCount {
+ get { throw new PlatformNotSupportedException (); }
+ }
+
+ public int ValueCount {
+ get { throw new PlatformNotSupportedException (); }
+ }
+
+ public RegistryView View {
+ get { throw new PlatformNotSupportedException (); }
+ }
}
#else
/// <summary>
return CreateSubKey (subkey, permissionCheck, registryOptions);
}
-
+ [ComVisible(false)]
+ public RegistryKey CreateSubKey (string subkey, bool writable)
+ {
+ return CreateSubKey (subkey, writable ? RegistryKeyPermissionCheck.ReadWriteSubTree : RegistryKeyPermissionCheck.ReadSubTree);
+ }
+
+ [ComVisible(false)]
+ public RegistryKey CreateSubKey (string subkey, bool writable, RegistryOptions options)
+ {
+ return CreateSubKey (subkey, writable ? RegistryKeyPermissionCheck.ReadWriteSubTree : RegistryKeyPermissionCheck.ReadSubTree, options);
+ }
+
/// <summary>
/// Delete the specified subkey.
/// </summary>
{
return OpenSubKey (name, permissionCheck == RegistryKeyPermissionCheck.ReadWriteSubTree);
}
-
+
+ [ComVisible (false)]
+ [MonoLimitation ("rights are ignored in Mono")]
+ public RegistryKey OpenSubKey (string name, RegistryRights rights)
+ {
+ return OpenSubKey (name);
+ }
+
[ComVisible (false)]
[MonoLimitation ("rights are ignored in Mono")]
public RegistryKey OpenSubKey (string name, RegistryKeyPermissionCheck permissionCheck, RegistryRights rights)
get; private set;
}
+ public EventActivityOptions ActivityOptions { get; set; }
public EventLevel Level { get; set; }
public EventKeywords Keywords { get; set; }
public EventOpcode Opcode { get; set; }
public EventChannel Channel { get; set; }
public string Message { get; set; }
public EventTask Task { get; set; }
+ public EventTags Tags { get; set; }
+ public byte Version { get; set; }
}
}
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System.Collections.Generic;
namespace System.Diagnostics.Tracing
{
{
}
+ ~EventSource ()
+ {
+ Dispose (false);
+ }
+
public Exception ConstructionException
{
get { return null; }
public void Dispose ()
{
Dispose (true);
+ GC.SuppressFinalize (this);
}
public string GetTrait (string key)
{
}
+ public void Write (string eventName, EventSourceOptions options)
+ {
+ }
+
public void Write<T> (string eventName, T data)
{
}
{
WriteEvent (eventId, new object[] { arg1, arg2, arg3 } );
}
+
+ protected unsafe void WriteEventCore (int eventId, int eventDataCount, EventData* data)
+ {
+ }
+
+ protected unsafe void WriteEventWithRelatedActivityId (int eventId, Guid relatedActivityId, params object[] args)
+ {
+ }
+
+ protected unsafe void WriteEventWithRelatedActivityIdCore (int eventId, Guid* relatedActivityId, int eventDataCount, EventSource.EventData* data)
+ {
+ }
+
+#if NETSTANDARD
+ [MonoTODO]
+ public event EventHandler<EventCommandEventArgs> EventCommandExecuted
+ {
+ add { throw new NotImplementedException (); }
+ remove { throw new NotImplementedException (); }
+ }
+#endif
+
+ [MonoTODO]
+ public static string GenerateManifest (Type eventSourceType, string assemblyPathToIncludeInManifest)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static string GenerateManifest (Type eventSourceType, string assemblyPathToIncludeInManifest, EventManifestOptions flags)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static Guid GetGuid (Type eventSourceType)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static string GetName (Type eventSourceType)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static IEnumerable<EventSource> GetSources ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static void SendCommand (EventSource eventSource, EventCommand command, IDictionary<string, string> commandArguments)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static void SetCurrentThreadActivityId (Guid activityId)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static void SetCurrentThreadActivityId (Guid activityId, out Guid oldActivityThatWillContinue)
+ {
+ throw new NotImplementedException ();
+ }
}
}
#endif
}
+ [MonoTODO]
+ public static bool AreComObjectsAvailableForCleanup ()
+ {
+ return false;
+ }
+
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern static IntPtr AllocCoTaskMem (int cb);
#endif
}
+ [MonoTODO]
+ public static IntPtr GetComInterfaceForObject (object o, Type T, CustomQueryInterfaceMode mode)
+ {
+ throw new NotImplementedException ();
+ }
+
public static IntPtr GetComInterfaceForObject<T, TInterface> (T o) {
return GetComInterfaceForObject ((object)o, typeof (T));
}
{
public sealed class AuthorizationRuleCollection : ReadOnlyCollectionBase
{
+ public AuthorizationRuleCollection ()
+ {
+ }
+
internal AuthorizationRuleCollection (AuthorizationRule [] rules)
{
InnerList.AddRange (rules);
}
+ public void AddRule (AuthorizationRule rule)
+ {
+ InnerList.Add (rule);
+ }
+
public AuthorizationRule this [int index] {
get { return (AuthorizationRule) InnerList [index]; }
}
if (!preserveInheritance && SystemAcl != null)
SystemAcl.RemoveInheritedAces ();
}
-
+
+ public void AddDiscretionaryAcl (byte revision, int trusted)
+ {
+ DiscretionaryAcl = new DiscretionaryAcl (IsContainer, IsDS, revision, trusted);
+ flags |= ControlFlags.DiscretionaryAclPresent;
+ }
+
+ public void AddSystemAcl(byte revision, int trusted)
+ {
+ SystemAcl = new SystemAcl (IsContainer, IsDS, revision, trusted);
+ flags |= ControlFlags.SystemAclPresent;
+ }
+
void CheckAclConsistency (CommonAcl acl)
{
if (IsContainer != acl.IsContainer)
inheritanceFlags, propagationFlags, AuditFlags.None,
objectFlags, objectType, inheritedObjectType);
}
-
+
+ public void AddAccess (AccessControlType accessType, SecurityIdentifier sid, ObjectAccessRule rule)
+ {
+ AddAccess (accessType, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
+ }
+
[MonoTODO]
public bool RemoveAccess (AccessControlType accessType,
SecurityIdentifier sid,
{
throw new NotImplementedException ();
}
-
+
+ public bool RemoveAccess (AccessControlType accessType, SecurityIdentifier sid, ObjectAccessRule rule)
+ {
+ return RemoveAccess (accessType, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
+ }
+
public void RemoveAccessSpecific (AccessControlType accessType,
SecurityIdentifier sid,
int accessMask,
inheritanceFlags, propagationFlags, AuditFlags.None,
objectFlags, objectType, inheritedObjectType);
}
-
+
+ public void RemoveAccessSpecific (AccessControlType accessType, SecurityIdentifier sid, ObjectAccessRule rule)
+ {
+ RemoveAccessSpecific (accessType, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
+ }
+
public void SetAccess (AccessControlType accessType,
SecurityIdentifier sid,
int accessMask,
inheritanceFlags, propagationFlags, AuditFlags.None,
objectFlags, objectType, inheritedObjectType);
}
-
+
+ public void SetAccess (AccessControlType accessType, SecurityIdentifier sid, ObjectAccessRule rule)
+ {
+ SetAccess (accessType, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
+ }
+
internal override void ApplyCanonicalSortToExplicitAces ()
{
int explicitCount = GetCanonicalExplicitAceCount ();
{
public abstract class ObjectSecurity
{
- internal ObjectSecurity (CommonSecurityDescriptor securityDescriptor)
+ protected ObjectSecurity ()
+ {
+ }
+
+ protected ObjectSecurity (CommonSecurityDescriptor securityDescriptor)
{
if (securityDescriptor == null)
throw new ArgumentNullException ("securityDescriptor");
inheritanceFlags, propagationFlags, auditFlags,
objectFlags, objectType, inheritedObjectType);
}
-
+
+ public void AddAudit (SecurityIdentifier sid, ObjectAuditRule rule)
+ {
+ AddAudit (rule.AuditFlags, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
+ }
+
[MonoTODO]
public bool RemoveAudit (AuditFlags auditFlags,
SecurityIdentifier sid,
{
throw new NotImplementedException ();
}
-
+
+ public bool RemoveAudit (SecurityIdentifier sid, ObjectAuditRule rule)
+ {
+ return RemoveAudit (rule.AuditFlags, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
+ }
+
public void RemoveAuditSpecific (AuditFlags auditFlags,
SecurityIdentifier sid,
int accessMask,
objectFlags, objectType, inheritedObjectType);
}
-
+
+ public void RemoveAuditSpecific (SecurityIdentifier sid, ObjectAuditRule rule)
+ {
+ RemoveAuditSpecific (rule.AuditFlags, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
+ }
+
public void SetAudit (AuditFlags auditFlags,
SecurityIdentifier sid,
int accessMask,
inheritanceFlags, propagationFlags, auditFlags,
objectFlags, objectType, inheritedObjectType);
}
-
+
+ public void SetAudit (SecurityIdentifier sid, ObjectAuditRule rule)
+ {
+ SetAudit (rule.AuditFlags, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
+ }
+
internal override void ApplyCanonicalSortToExplicitAces ()
{
int explicitCount = GetCanonicalExplicitAceCount ();
return new WindowsImpersonationContext (userToken);
}
+ [SecuritySafeCritical]
+ public static void RunImpersonated (SafeAccessTokenHandle safeAccessTokenHandle, Action action)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [SecuritySafeCritical]
+ public static T RunImpersonated<T> (SafeAccessTokenHandle safeAccessTokenHandle, Func<T> func)
+ {
+ throw new NotImplementedException ();
+ }
+
// properties
sealed override
public string AuthenticationType {
if (exit)
Environment.Exit (58);
}
+#else
+ // largely inspired by https://github.com/dotnet/corefx/blob/be8d2ce3964968cec9322a64211e37682085db70/src/System.Console/src/System/ConsolePal.WinRT.cs, because it's a similar platform where a console might not be available
+
+ // provide simply color tracking that allows round-tripping
+ internal const ConsoleColor UnknownColor = (ConsoleColor)(-1);
+ private static ConsoleColor s_trackedForegroundColor = UnknownColor;
+ private static ConsoleColor s_trackedBackgroundColor = UnknownColor;
+
+ public static ConsoleColor ForegroundColor
+ {
+ get
+ {
+ return s_trackedForegroundColor;
+ }
+ set
+ {
+ lock (Console.Out) // synchronize with other writers
+ {
+ s_trackedForegroundColor = value;
+ }
+ }
+ }
+
+ public static ConsoleColor BackgroundColor
+ {
+ get
+ {
+ return s_trackedBackgroundColor;
+ }
+ set
+ {
+ lock (Console.Out) // synchronize with other writers
+ {
+ s_trackedBackgroundColor = value;
+ }
+ }
+ }
+
+ public static int BufferWidth
+ {
+ get { throw new PlatformNotSupportedException (); }
+ set { throw new PlatformNotSupportedException (); }
+ }
+
+ public static int BufferHeight
+ {
+ get { throw new PlatformNotSupportedException (); }
+ set { throw new PlatformNotSupportedException (); }
+ }
+
+ public static bool CapsLock { get { throw new PlatformNotSupportedException (); } }
+
+ public static int CursorLeft
+ {
+ get { throw new PlatformNotSupportedException (); }
+ set { throw new PlatformNotSupportedException (); }
+ }
+
+ public static int CursorTop
+ {
+ get { throw new PlatformNotSupportedException (); }
+ set { throw new PlatformNotSupportedException (); }
+ }
+
+ public static int CursorSize
+ {
+ get { return 100; }
+ set { throw new PlatformNotSupportedException(); }
+ }
+
+ public static bool CursorVisible
+ {
+ get { throw new PlatformNotSupportedException (); }
+ set { throw new PlatformNotSupportedException (); }
+ }
+
+ public static bool KeyAvailable { get { throw new PlatformNotSupportedException (); } }
+
+ public static int LargestWindowWidth
+ {
+ get { throw new PlatformNotSupportedException (); }
+ set { throw new PlatformNotSupportedException (); }
+ }
+
+ public static int LargestWindowHeight
+ {
+ get { throw new PlatformNotSupportedException (); }
+ set { throw new PlatformNotSupportedException (); }
+ }
+
+ public static bool NumberLock { get { throw new PlatformNotSupportedException (); } }
+
+ public static string Title
+ {
+ get { throw new PlatformNotSupportedException (); }
+ set { throw new PlatformNotSupportedException (); }
+ }
+
+ public static bool TreatControlCAsInput
+ {
+ get { throw new PlatformNotSupportedException (); }
+ set { throw new PlatformNotSupportedException (); }
+ }
+
+ public static int WindowHeight
+ {
+ get { throw new PlatformNotSupportedException (); }
+ set { throw new PlatformNotSupportedException (); }
+ }
+
+ public static int WindowLeft
+ {
+ get { return 0; }
+ set { throw new PlatformNotSupportedException (); }
+ }
+
+ public static int WindowTop
+ {
+ get { return 0; }
+ set { throw new PlatformNotSupportedException (); }
+ }
+
+ public static int WindowWidth
+ {
+ get { throw new PlatformNotSupportedException (); }
+ set { throw new PlatformNotSupportedException (); }
+ }
+
+ public static bool IsErrorRedirected { get { throw new PlatformNotSupportedException (); } }
+
+ public static bool IsInputRedirected { get { throw new PlatformNotSupportedException (); } }
+
+ public static bool IsOutputRedirected { get { throw new PlatformNotSupportedException (); } }
+
+ public static void Beep () { throw new PlatformNotSupportedException (); }
+
+ public static void Beep (int frequency, int duration) { throw new PlatformNotSupportedException (); }
+
+ public static void Clear () { throw new PlatformNotSupportedException (); }
+
+ public static void MoveBufferArea (int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight, int targetLeft, int targetTop) { throw new PlatformNotSupportedException(); }
+
+ public static void MoveBufferArea (int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight, int targetLeft, int targetTop, char sourceChar, ConsoleColor sourceForeColor, ConsoleColor sourceBackColor) { throw new PlatformNotSupportedException(); }
+
+
+ public static ConsoleKeyInfo ReadKey ()
+ {
+ return ReadKey (false);
+ }
+
+ public static ConsoleKeyInfo ReadKey (bool intercept) { throw new PlatformNotSupportedException (); }
+
+ public static void ResetColor ()
+ {
+ lock (Console.Out) // synchronize with other writers
+ {
+ s_trackedForegroundColor = UnknownColor;
+ s_trackedBackgroundColor = UnknownColor;
+ }
+ }
+
+ public static void SetBufferSize (int width, int height) { throw new PlatformNotSupportedException (); }
+
+ public static void SetCursorPosition (int left, int top) { throw new PlatformNotSupportedException (); }
+
+ public static void SetWindowPosition (int left, int top) { throw new PlatformNotSupportedException (); }
+
+ public static void SetWindowSize (int width, int height) { throw new PlatformNotSupportedException (); }
+
+ public static event ConsoleCancelEventHandler CancelKeyPress {
+ add {
+ throw new PlatformNotSupportedException ();
+ }
+ remove {
+ throw new PlatformNotSupportedException ();
+ }
+ }
#endif
}
}
return LambdaCompiler.Compile(this, debugInfoGenerator);
}
+#if NETSTANDARD
+ public Delegate Compile(bool preferInterpretation) {
+ // TODO: add logic for preferInterpretation
+ return Compile();
+ }
+#endif
+
#if FEATURE_REFEMIT
/// <summary>
/// Compiles the lambda into a method definition.
return (TDelegate)(object)LambdaCompiler.Compile(this, debugInfoGenerator);
}
+#if NETSTANDARD
+ public new TDelegate Compile(bool preferInterpretation) {
+ // TODO: add logic for preferInterpretation
+ return Compile();
+ }
+#endif
+
/// <summary>
/// Creates a new expression that is like this one, but using the
/// supplied children. If all of the children are the same, it will
return LambdaCompiler.Compile(this, debugInfoGenerator);
}
+#if NETSTANDARD
+ public Delegate Compile(bool preferInterpretation) {
+ // TODO: add logic for preferInterpretation
+ return Compile();
+ }
+#endif
+
/// <summary>
/// Compiles the lambda into a method definition.
/// </summary>
return (TDelegate)(object)LambdaCompiler.Compile(this, debugInfoGenerator);
}
+#if NETSTANDARD
+ public new TDelegate Compile(bool preferInterpretation) {
+ // TODO: add logic for preferInterpretation
+ return Compile();
+ }
+#endif
+
/// <summary>
/// Creates a new expression that is like this one, but using the
/// supplied children. If all of the children are the same, it will
foreach (TSource element in second) yield return element;
}
+#if NETSTANDARD
+ public static IEnumerable<TSource> Append<TSource>(this IEnumerable<TSource> source, TSource element)
+ {
+ if (source == null) throw Error.ArgumentNull("source");
+ return AppendIterator<TSource>(source, element);
+ }
+
+ private static IEnumerable<TSource> AppendIterator<TSource>(IEnumerable<TSource> source, TSource element)
+ {
+ foreach (TSource e1 in source) yield return e1;
+ yield return element;
+ }
+
+ public static IEnumerable<TSource> Prepend<TSource>(this IEnumerable<TSource> source, TSource element)
+ {
+ if (source == null) throw Error.ArgumentNull("source");
+ return PrependIterator<TSource>(source, element);
+ }
+
+ private static IEnumerable<TSource> PrependIterator<TSource>(IEnumerable<TSource> source, TSource element)
+ {
+ yield return element;
+ foreach (TSource e1 in source) yield return e1;
+ }
+#endif
+
public static IEnumerable<TResult> Zip<TFirst, TSecond, TResult>(this IEnumerable<TFirst> first, IEnumerable<TSecond> second, Func<TFirst, TSecond, TResult> resultSelector) {
if (first == null) throw Error.ArgumentNull("first");
if (second == null) throw Error.ArgumentNull("second");
return s_sha512;
}
}
+
+#if NETSTANDARD
+ public static CngAlgorithm ECDiffieHellman {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public static CngAlgorithm ECDsa {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+#endif
}
}
[System.Security.Permissions.HostProtection(MayLeakOnAbort = true)]
public sealed class CngKey : IDisposable {
#if MONO
+ public CngAlgorithmGroup AlgorithmGroup {
+ [SecuritySafeCritical]
+ [Pure]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public CngAlgorithm Algorithm {
+ [SecuritySafeCritical]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public CngExportPolicies ExportPolicy {
+ [SecuritySafeCritical]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public SafeNCryptKeyHandle Handle {
+ [System.Security.SecurityCritical]
+ [SecurityPermission(SecurityAction.Demand, UnmanagedCode = true)]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool IsEphemeral {
+ [SecuritySafeCritical]
+ [Pure]
+ get {
+ throw new NotImplementedException ();
+ }
+
+ [System.Security.SecurityCritical]
+ private set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool IsMachineKey {
+ [SecuritySafeCritical]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string KeyName {
+ [SecuritySafeCritical]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int KeySize {
+ [SecuritySafeCritical]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public CngKeyUsages KeyUsage {
+ [SecuritySafeCritical]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public IntPtr ParentWindowHandle {
+ [SecuritySafeCritical]
+ get {
+ throw new NotImplementedException ();
+ }
+
+ [SecuritySafeCritical]
+ [SecurityPermission(SecurityAction.Demand, UnmanagedCode = true)]
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public CngProvider Provider {
+ [SecuritySafeCritical]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public SafeNCryptProviderHandle ProviderHandle {
+ [System.Security.SecurityCritical]
+ [SecurityPermission(SecurityAction.Demand, UnmanagedCode = true)]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string UniqueName {
+ [SecuritySafeCritical]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public CngUIPolicy UIPolicy {
+ [SecuritySafeCritical]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public static CngKey Create(CngAlgorithm algorithm) {
+ throw new NotImplementedException ();
+ }
+
+ public static CngKey Create(CngAlgorithm algorithm, string keyName) {
+ throw new NotImplementedException ();
+ }
+
+ [SecuritySafeCritical]
+ public static CngKey Create(CngAlgorithm algorithm, string keyName, CngKeyCreationParameters creationParameters) {
+ throw new NotImplementedException ();
+ }
+
+ [SecuritySafeCritical]
+ public void Delete() {
+ throw new NotImplementedException ();
+ }
+
+ [SecuritySafeCritical]
+ [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Justification = "Reviewed")]
public void Dispose() {
+ throw new NotImplementedException ();
+ }
+
+ public static bool Exists(string keyName) {
+ throw new NotImplementedException ();
+ }
+
+ public static bool Exists(string keyName, CngProvider provider) {
+ throw new NotImplementedException ();
+ }
+
+ [SecuritySafeCritical]
+ [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Justification = "Reviewed")]
+ public static bool Exists(string keyName, CngProvider provider, CngKeyOpenOptions options) {
+ throw new NotImplementedException ();
+ }
+
+ public static CngKey Import(byte[] keyBlob, CngKeyBlobFormat format) {
+ throw new NotImplementedException ();
+ }
+
+ [SecuritySafeCritical]
+ public static CngKey Import(byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) {
+ throw new NotImplementedException ();
+ }
+
+ [SecuritySafeCritical]
+ public byte[] Export(CngKeyBlobFormat format) {
+ throw new NotImplementedException ();
+ }
+
+ [SecuritySafeCritical]
+ [SecurityPermission(SecurityAction.Demand, UnmanagedCode = true)]
+ public CngProperty GetProperty(string name, CngPropertyOptions options) {
+ throw new NotImplementedException ();
+ }
+
+ [SecuritySafeCritical]
+ [SecurityPermission(SecurityAction.Demand, UnmanagedCode = true)]
+ public bool HasProperty(string name, CngPropertyOptions options) {
+ throw new NotImplementedException ();
+ }
+
+ public static CngKey Open(string keyName) {
+ throw new NotImplementedException ();
+ }
+
+ public static CngKey Open(string keyName, CngProvider provider) {
+ throw new NotImplementedException ();
+ }
+
+ [SecuritySafeCritical]
+ public static CngKey Open(string keyName, CngProvider provider, CngKeyOpenOptions openOptions) {
+ throw new NotImplementedException ();
+ }
+
+ [System.Security.SecurityCritical]
+ [SecurityPermission(SecurityAction.Demand, UnmanagedCode = true)]
+ public static CngKey Open(SafeNCryptKeyHandle keyHandle, CngKeyHandleOpenOptions keyHandleOpenOptions) {
+ throw new NotImplementedException ();
+ }
+
+ [SecuritySafeCritical]
+ [SecurityPermission(SecurityAction.Demand, UnmanagedCode = true)]
+ public void SetProperty(CngProperty property) {
+ throw new NotImplementedException ();
}
#else
private SafeNCryptKeyHandle m_keyHandle;
}
}
+#if NETSTANDARD
+ public static CngKeyBlobFormat EccFullPrivateBlob {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public static CngKeyBlobFormat EccFullPublicBlob {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+#endif
+
public static CngKeyBlobFormat GenericPrivateBlob {
get {
Contract.Ensures(Contract.Result<CngKeyBlobFormat>() != null);
return CryptoConfig.CreateFromName(algorithm) as ECDsa;
}
+#if NETSTANDARD
+ public static ECDsa Create (ECCurve curve)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static ECDsa Create (ECParameters parameters)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual ECParameters ExportExplicitParameters (bool includePrivateParameters)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual ECParameters ExportParameters (bool includePrivateParameters)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void GenerateKey (ECCurve curve)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void ImportParameters (ECParameters parameters)
+ {
+ throw new NotImplementedException ();
+ }
+#endif
+
//
// Signature operations
//
[System.Security.Permissions.HostProtection(MayLeakOnAbort = true)]
public sealed class ECDsaCng : ECDsa {
#if MONO
+ public ECDsaCng() : this(521) {
+ }
+
+ public ECDsaCng(int keySize) {
+ throw new NotImplementedException ();
+ }
+
+ [SecuritySafeCritical]
+ public ECDsaCng(CngKey key) {
+ throw new NotImplementedException ();
+ }
+
+#if NETSTANDARD
+ public ECDsaCng(ECCurve curve) {
+ throw new NotImplementedException ();
+ }
+#endif
+
+ public CngKey Key {
+ get {
+ throw new NotImplementedException ();
+ }
+
+ private set {
+ throw new NotImplementedException ();
+ }
+ }
+
public override byte[] SignHash(byte[] hash) {
throw new NotImplementedException();
}
public sealed class RSACng : RSA
{
#if MONO
+ public RSACng() : this(2048) { }
+
+ public RSACng(int keySize)
+ {
+ throw new NotImplementedException ();
+ }
+
+#if NETSTANDARD
+ public RSACng(CngKey key)
+ {
+ throw new NotImplementedException ();
+ }
+#endif
+
+ public CngKey Key
+ {
+ [SecuritySafeCritical]
+ get
+ {
+ throw new NotImplementedException ();
+ }
+
+ private set
+ {
+ throw new NotImplementedException ();
+ }
+ }
+
public override RSAParameters ExportParameters(bool includePrivateParameters)
{
throw new NotImplementedException();
}
#endif
+#if NETSTANDARD
+ public string this[string name] {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+#endif
+
#if !FEATURE_PAL || MONO
private bool AllowHttpRequestHeader {
get {
}
}
}
-
+
+#if NETSTANDARD
+ protected IDictionary Caps
+ {
+ get
+ {
+ var dict = new Dictionary<int, int>();
+
+ foreach (int key in caps.Keys)
+ {
+ dict.Add (key, (int)caps[key]);
+ }
+
+ return dict;
+ }
+ set
+ {
+ if (value == null)
+ throw new ArgumentNullException("value");
+
+
+ caps = new Hashtable (value.Count);
+ foreach (DictionaryEntry entry in value)
+ {
+ caps[(int)entry.Key] = (int)entry.Value;
+ }
+ }
+ }
+
+ protected IDictionary CapNames
+ {
+ get
+ {
+ var dict = new Dictionary<string, int>();
+
+ foreach (string key in capnames.Keys)
+ {
+ dict.Add (key, (int)capnames[key]);
+ }
+
+ return dict;
+ }
+ set
+ {
+ if (value == null)
+ throw new ArgumentNullException("value");
+
+ capnames = new Hashtable (value.Count);
+ foreach (DictionaryEntry entry in value)
+ {
+ capnames[(string)entry.Key] = (int)entry.Value;
+ }
+ }
+ }
+#endif
+
/// <devdoc>
/// <para>
/// Returns the options passed into the constructor
}
}
+#if NETSTANDARD
+ public static string TargetFrameworkName
+ {
+ get
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ public static object GetData (string name)
+ {
+ throw new NotImplementedException();
+ }
+#endif
+
#region Switch APIs
#if !MONO
static AppContext()
method.Name = "~" + name;
}
- // TODO: Better check
- if (t != type && list.Any (l => l.DeclaringType != method.DeclaringType && l.Name == method.Name && l.Parameters.Count == method.Parameters.Count))
+ if (t != type && list.Any (l => l.DeclaringType != method.DeclaringType && l.Name == method.Name && l.Parameters.Count == method.Parameters.Count &&
+ l.Parameters.SequenceEqual (method.Parameters, new ParameterComparer ())))
continue;
list.Add (method);
if (!fullAPI)
break;
- if (!t.IsInterface || t.IsEnum)
+ if (t.IsInterface || t.IsEnum)
break;
if (t.BaseType == null || t.BaseType.FullName == "System.Object")
return list.ToArray ();
}
+ sealed class ParameterComparer : IEqualityComparer<ParameterDefinition>
+ {
+ public bool Equals (ParameterDefinition x, ParameterDefinition y)
+ {
+ return x.ParameterType.Name == y.ParameterType.Name;
+ }
+
+ public int GetHashCode (ParameterDefinition obj)
+ {
+ return obj.ParameterType.Name.GetHashCode ();
+ }
+ }
+
static bool IsFinalizer (MethodDefinition method)
{
if (method.Name != "Finalize")
ParameterDefinition info = infos [i];
- string modifier;
- if ((info.Attributes & ParameterAttributes.In) != 0)
- modifier = "in";
- else if ((info.Attributes & ParameterAttributes.Out) != 0)
- modifier = "out";
- else
- modifier = string.Empty;
+ if (info.ParameterType.IsByReference) {
+ string modifier;
+ if ((info.Attributes & (ParameterAttributes.Out | ParameterAttributes.In)) == ParameterAttributes.Out)
+ modifier = "out";
+ else
+ modifier = "ref";
- if (modifier.Length > 0) {
signature.Append (modifier);
signature.Append (" ");
}
<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
<PropertyGroup>\r
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
- <ProductVersion>8.0.30703</ProductVersion>\r
- <SchemaVersion>2.0</SchemaVersion>\r
- <ProjectGuid>{6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}</ProjectGuid>\r
+ <ProjectGuid>{804E854F-E8F5-4E2B-807A-4FAF4BE99C03}</ProjectGuid>\r
<OutputType>Exe</OutputType>\r
<RootNamespace>mono_api_info</RootNamespace>\r
<AssemblyName>mono-api-info</AssemblyName>\r
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>\r
- <FileAlignment>512</FileAlignment>\r
- <FileUpgradeFlags>\r
- </FileUpgradeFlags>\r
- <UpgradeBackupLocation>\r
- </UpgradeBackupLocation>\r
- <OldToolsVersion>3.5</OldToolsVersion>\r
- <PublishUrl>publish\</PublishUrl>\r
- <Install>true</Install>\r
- <InstallFrom>Disk</InstallFrom>\r
- <UpdateEnabled>false</UpdateEnabled>\r
- <UpdateMode>Foreground</UpdateMode>\r
- <UpdateInterval>7</UpdateInterval>\r
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>\r
- <UpdatePeriodically>false</UpdatePeriodically>\r
- <UpdateRequired>false</UpdateRequired>\r
- <MapFileExtensions>true</MapFileExtensions>\r
- <ApplicationRevision>0</ApplicationRevision>\r
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>\r
- <IsWebBootstrapper>false</IsWebBootstrapper>\r
- <UseApplicationTrust>false</UseApplicationTrust>\r
- <BootstrapperEnabled>true</BootstrapperEnabled>\r
- <TargetFrameworkProfile />\r
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
+ <ProductVersion>8.0.30703</ProductVersion>\r
+ <SchemaVersion>2.0</SchemaVersion>\r
</PropertyGroup>\r
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
<DebugSymbols>true</DebugSymbols>\r
<Reference Include="System" />\r
<Reference Include="System.Core" />\r
<Reference Include="System.Xml" />\r
+ <Reference Include="Mono.Cecil">\r
+ <HintPath>..\..\class\lib\net_4_x\Mono.Cecil.dll</HintPath>\r
+ </Reference>\r
</ItemGroup>\r
<ItemGroup>\r
<Compile Include="AssemblyResolver.cs" />\r
<Link>Options.cs</Link>\r
</Compile>\r
</ItemGroup>\r
- <ItemGroup>\r
- <BootstrapperPackage Include="Microsoft.Net.Client.3.5">\r
- <Visible>False</Visible>\r
- <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>\r
- <Install>false</Install>\r
- </BootstrapperPackage>\r
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">\r
- <Visible>False</Visible>\r
- <ProductName>.NET Framework 3.5 SP1</ProductName>\r
- <Install>true</Install>\r
- </BootstrapperPackage>\r
- </ItemGroup>\r
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\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="AfterBuild">\r
</Target>\r
-->\r
- <ItemGroup>\r
- <ProjectReference Include="..\..\..\external\cecil\Mono.Cecil.csproj">\r
- <Project>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</Project>\r
- <Name>Mono.Cecil</Name>\r
- </ProjectReference>\r
- </ItemGroup>\r
</Project>
\ No newline at end of file
/* Rd := (Rm * Rs)[31:0]; 32 x 32 -> 32 */
#define ARM_MUL_COND(p, rd, rm, rs, cond) \
ARM_EMIT(p, ARM_DEF_MUL_COND(ARMOP_MUL, rd, rm, rs, 0, 0, cond))
+#define ARM_UMULL_COND(p, rdhi, rdlo, rm, rs, cond) \
+ ARM_EMIT(p, ARM_DEF_MUL_COND(ARMOP_UMULL, rdhi, rm, rs, rdlo, 0, cond))
+#define ARM_SMULL_COND(p, rdhi, rdlo, rm, rs, cond) \
+ ARM_EMIT(p, ARM_DEF_MUL_COND(ARMOP_SMULL, rdhi, rm, rs, rdlo, 0, cond))
#define ARM_MUL(p, rd, rm, rs) \
ARM_MUL_COND(p, rd, rm, rs, ARMCOND_AL)
+#define ARM_UMULL(p, rdhi, rdlo, rm, rs) \
+ ARM_UMULL_COND(p, rdhi, rdlo, rm, rs, ARMCOND_AL)
+#define ARM_SMULL(p, rdhi, rdlo, rm, rs) \
+ ARM_SMULL_COND(p, rdhi, rdlo, rm, rs, ARMCOND_AL)
#define ARM_MULS_COND(p, rd, rm, rs, cond) \
ARM_EMIT(p, ARM_DEF_MUL_COND(ARMOP_MUL, rd, rm, rs, 0, 1, cond))
#define ARM_MULS(p, rd, rm, rs) \
ARM_MULS_COND(p, rd, rm, rs, ARMCOND_AL)
#define ARM_MUL_REG_REG(p, rd, rm, rs) ARM_MUL(p, rd, rm, rs)
#define ARM_MULS_REG_REG(p, rd, rm, rs) ARM_MULS(p, rd, rm, rs)
+#define ARM_UMULL_REG_REG(p, rdhi, rdlo, rm, rs) ARM_UMULL(p, rdhi, rdlo, rm, rs)
+#define ARM_SMULL_REG_REG(p, rdhi, rdlo, rm, rs) ARM_SMULL(p, rdhi, rdlo, rm, rs)
/* inline */
#define ARM_IASM_MUL_COND(rd, rm, rs, cond) \
return mono_bitset_mem_new (mem, max_size, MONO_BITSET_DONT_FREE);
}
+struct magic_unsigned {
+ guint32 magic_number;
+ gboolean addition;
+ int shift;
+};
+
+struct magic_signed {
+ gint32 magic_number;
+ int shift;
+};
+
+/* http://www.hackersdelight.org/hdcodetxt/magicu.c.txt */
+static struct magic_unsigned
+compute_magic_unsigned (guint32 divisor) {
+ guint32 nc, delta, q1, r1, q2, r2;
+ struct magic_unsigned magu;
+ gboolean gt = FALSE;
+ int p;
+
+ magu.addition = 0;
+ nc = -1 - (-divisor) % divisor;
+ p = 31;
+ q1 = 0x80000000 / nc;
+ r1 = 0x80000000 - q1 * nc;
+ q2 = 0x7FFFFFFF / divisor;
+ r2 = 0x7FFFFFFF - q2 * divisor;
+ do {
+ p = p + 1;
+ if (q1 >= 0x80000000)
+ gt = TRUE;
+ if (r1 >= nc - r1) {
+ q1 = 2 * q1 + 1;
+ r1 = 2 * r1 - nc;
+ } else {
+ q1 = 2 * q1;
+ r1 = 2 * r1;
+ }
+ if (r2 + 1 >= divisor - r2) {
+ if (q2 >= 0x7FFFFFFF)
+ magu.addition = 1;
+ q2 = 2 * q2 + 1;
+ r2 = 2 * r2 + 1 - divisor;
+ } else {
+ if (q2 >= 0x80000000)
+ magu.addition = 1;
+ q2 = 2 * q2;
+ r2 = 2 * r2 + 1;
+ }
+ delta = divisor - 1 - r2;
+ } while (!gt && (q1 < delta || (q1 == delta && r1 == 0)));
+
+ magu.magic_number = q2 + 1;
+ magu.shift = p - 32;
+ return magu;
+}
+
+/* http://www.hackersdelight.org/hdcodetxt/magic.c.txt */
+static struct magic_signed
+compute_magic_signed (gint32 divisor) {
+ int p;
+ guint32 ad, anc, delta, q1, r1, q2, r2, t;
+ const guint32 two31 = 0x80000000;
+ struct magic_signed mag;
+
+ ad = abs (divisor);
+ t = two31 + ((unsigned)divisor >> 31);
+ anc = t - 1 - t % ad;
+ p = 31;
+ q1 = two31 / anc;
+ r1 = two31 - q1 * anc;
+ q2 = two31 / ad;
+ r2 = two31 - q2 * ad;
+ do {
+ p++;
+ q1 *= 2;
+ r1 *= 2;
+ if (r1 >= anc) {
+ q1++;
+ r1 -= anc;
+ }
+
+ q2 *= 2;
+ r2 *= 2;
+
+ if (r2 >= ad) {
+ q2++;
+ r2 -= ad;
+ }
+
+ delta = ad - r2;
+ } while (q1 < delta || (q1 == delta && r1 == 0));
+
+ mag.magic_number = q2 + 1;
+ if (divisor < 0)
+ mag.magic_number = -mag.magic_number;
+ mag.shift = p - 32;
+ return mag;
+}
+
+static gboolean
+mono_strength_reduction_division (MonoCompile *cfg, MonoInst *ins)
+{
+ gboolean allocated_vregs = FALSE;
+ /*
+ * We don't use it on 32bit systems because on those
+ * platforms we emulate long multiplication, driving the
+ * performance back down.
+ */
+ switch (ins->opcode) {
+ case OP_IDIV_UN_IMM: {
+ guint32 tmp_regl;
+#if SIZEOF_REGISTER == 8
+ guint32 dividend_reg;
+#else
+ guint32 tmp_regi;
+#endif
+ struct magic_unsigned mag;
+ int power2 = mono_is_power_of_two (ins->inst_imm);
+
+ /* The decomposition doesn't handle exception throwing */
+ if (ins->inst_imm == 0)
+ break;
+
+ if (power2 >= 0) {
+ ins->opcode = OP_ISHR_UN_IMM;
+ ins->sreg2 = -1;
+ ins->inst_imm = power2;
+ break;
+ }
+ allocated_vregs = TRUE;
+ /*
+ * Replacement of unsigned division with multiplication,
+ * shifts and additions Hacker's Delight, chapter 10-10.
+ */
+ mag = compute_magic_unsigned (ins->inst_imm);
+ tmp_regl = alloc_lreg (cfg);
+#if SIZEOF_REGISTER == 8
+ dividend_reg = alloc_lreg (cfg);
+ MONO_EMIT_NEW_I8CONST (cfg, tmp_regl, mag.magic_number);
+ MONO_EMIT_NEW_UNALU (cfg, OP_ZEXT_I4, dividend_reg, ins->sreg1);
+ MONO_EMIT_NEW_BIALU (cfg, OP_LMUL, tmp_regl, dividend_reg, tmp_regl);
+ if (mag.addition) {
+ MONO_EMIT_NEW_BIALU_IMM (cfg, OP_LSHR_UN_IMM, tmp_regl, tmp_regl, 32);
+ MONO_EMIT_NEW_BIALU (cfg, OP_LADD, tmp_regl, tmp_regl, dividend_reg);
+ MONO_EMIT_NEW_BIALU_IMM (cfg, OP_LSHR_UN_IMM, ins->dreg, tmp_regl, mag.shift);
+ } else {
+ MONO_EMIT_NEW_BIALU_IMM (cfg, OP_LSHR_UN_IMM, ins->dreg, tmp_regl, 32 + mag.shift);
+ }
+#else
+ tmp_regi = alloc_ireg (cfg);
+ MONO_EMIT_NEW_ICONST (cfg, tmp_regi, mag.magic_number);
+ MONO_EMIT_NEW_BIALU (cfg, OP_BIGMUL_UN, tmp_regl, ins->sreg1, tmp_regi);
+ /* Long shifts below will be decomposed during cprop */
+ if (mag.addition) {
+ MONO_EMIT_NEW_BIALU_IMM (cfg, OP_LSHR_UN_IMM, tmp_regl, tmp_regl, 32);
+ MONO_EMIT_NEW_BIALU (cfg, OP_IADDCC, MONO_LVREG_LS (tmp_regl), MONO_LVREG_LS (tmp_regl), ins->sreg1);
+ /* MONO_LVREG_MS (tmp_reg) is 0, save in it the carry */
+ MONO_EMIT_NEW_BIALU (cfg, OP_IADC, MONO_LVREG_MS (tmp_regl), MONO_LVREG_MS (tmp_regl), MONO_LVREG_MS (tmp_regl));
+ MONO_EMIT_NEW_BIALU_IMM (cfg, OP_LSHR_UN_IMM, tmp_regl, tmp_regl, mag.shift);
+ } else {
+ MONO_EMIT_NEW_BIALU_IMM (cfg, OP_LSHR_UN_IMM, tmp_regl, tmp_regl, 32 + mag.shift);
+ }
+ MONO_EMIT_NEW_UNALU (cfg, OP_MOVE, ins->dreg, MONO_LVREG_LS (tmp_regl));
+#endif
+ mono_jit_stats.optimized_divisions++;
+ break;
+ }
+ case OP_IDIV_IMM: {
+ guint32 tmp_regl;
+#if SIZEOF_REGISTER == 8
+ guint32 dividend_reg;
+#else
+ guint32 tmp_regi;
+#endif
+ struct magic_signed mag;
+ int power2 = mono_is_power_of_two (ins->inst_imm);
+ /* The decomposition doesn't handle exception throwing */
+ /* Optimization with MUL does not apply for -1, 0 and 1 divisors */
+ if (ins->inst_imm == 0 || ins->inst_imm == -1) {
+ break;
+ } else if (ins->inst_imm == 1) {
+ ins->opcode = OP_MOVE;
+ ins->inst_imm = 0;
+ break;
+ }
+ allocated_vregs = TRUE;
+ if (power2 == 1) {
+ guint32 r1 = alloc_ireg (cfg);
+ MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ISHR_UN_IMM, r1, ins->sreg1, 31);
+ MONO_EMIT_NEW_BIALU (cfg, OP_IADD, r1, r1, ins->sreg1);
+ MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ISHR_IMM, ins->dreg, r1, 1);
+ break;
+ } else if (power2 > 0 && power2 < 31) {
+ guint32 r1 = alloc_ireg (cfg);
+ MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ISHR_IMM, r1, ins->sreg1, 31);
+ MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ISHR_UN_IMM, r1, r1, (32 - power2));
+ MONO_EMIT_NEW_BIALU (cfg, OP_IADD, r1, r1, ins->sreg1);
+ MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ISHR_IMM, ins->dreg, r1, power2);
+ break;
+ }
+
+ /*
+ * Replacement of signed division with multiplication,
+ * shifts and additions Hacker's Delight, chapter 10-6.
+ */
+ mag = compute_magic_signed (ins->inst_imm);
+ tmp_regl = alloc_lreg (cfg);
+#if SIZEOF_REGISTER == 8
+ dividend_reg = alloc_lreg (cfg);
+ MONO_EMIT_NEW_I8CONST (cfg, tmp_regl, mag.magic_number);
+ MONO_EMIT_NEW_UNALU (cfg, OP_SEXT_I4, dividend_reg, ins->sreg1);
+ MONO_EMIT_NEW_BIALU (cfg, OP_LMUL, tmp_regl, dividend_reg, tmp_regl);
+ if ((ins->inst_imm > 0 && mag.magic_number < 0) || (ins->inst_imm < 0 && mag.magic_number > 0)) {
+ MONO_EMIT_NEW_BIALU_IMM (cfg, OP_LSHR_IMM, tmp_regl, tmp_regl, 32);
+ if (ins->inst_imm > 0 && mag.magic_number < 0) {
+ MONO_EMIT_NEW_BIALU (cfg, OP_LADD, tmp_regl, tmp_regl, dividend_reg);
+ } else if (ins->inst_imm < 0 && mag.magic_number > 0) {
+ MONO_EMIT_NEW_BIALU (cfg, OP_LSUB, tmp_regl, tmp_regl, dividend_reg);
+ }
+ MONO_EMIT_NEW_BIALU_IMM (cfg, OP_LSHR_IMM, tmp_regl, tmp_regl, mag.shift);
+ } else {
+ MONO_EMIT_NEW_BIALU_IMM (cfg, OP_LSHR_IMM, tmp_regl, tmp_regl, 32 + mag.shift);
+ }
+ MONO_EMIT_NEW_BIALU_IMM (cfg, OP_LSHR_UN_IMM, ins->dreg, tmp_regl, SIZEOF_REGISTER * 8 - 1);
+ MONO_EMIT_NEW_BIALU (cfg, OP_LADD, ins->dreg, ins->dreg, tmp_regl);
+#else
+ tmp_regi = alloc_ireg (cfg);
+ MONO_EMIT_NEW_ICONST (cfg, tmp_regi, mag.magic_number);
+ MONO_EMIT_NEW_BIALU (cfg, OP_BIGMUL, tmp_regl, ins->sreg1, tmp_regi);
+ if ((ins->inst_imm > 0 && mag.magic_number < 0) || (ins->inst_imm < 0 && mag.magic_number > 0)) {
+ if (ins->inst_imm > 0 && mag.magic_number < 0) {
+ /* Opposite sign, cannot overflow */
+ MONO_EMIT_NEW_BIALU (cfg, OP_IADD, tmp_regi, MONO_LVREG_MS (tmp_regl), ins->sreg1);
+ } else if (ins->inst_imm < 0 && mag.magic_number > 0) {
+ /* Same sign, cannot overflow */
+ MONO_EMIT_NEW_BIALU (cfg, OP_ISUB, tmp_regi, MONO_LVREG_MS (tmp_regl), ins->sreg1);
+ }
+ MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ISHR_IMM, tmp_regi, tmp_regi, mag.shift);
+ } else {
+ MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ISHR_IMM, tmp_regi, MONO_LVREG_MS (tmp_regl), mag.shift);
+ }
+ MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ISHR_UN_IMM, ins->dreg, tmp_regi, SIZEOF_REGISTER * 8 - 1);
+ MONO_EMIT_NEW_BIALU (cfg, OP_IADD, ins->dreg, ins->dreg, tmp_regi);
+#endif
+ mono_jit_stats.optimized_divisions++;
+ break;
+ }
+ }
+ return allocated_vregs;
+}
+
/*
* Replaces ins with optimized opcodes.
*
}
}
break;
- case OP_IREM_UN_IMM:
- case OP_IDIV_UN_IMM: {
- int c = ins->inst_imm;
- int power2 = mono_is_power_of_two (c);
+ case OP_IREM_UN_IMM: {
+ int power2 = mono_is_power_of_two (ins->inst_imm);
if (power2 >= 0) {
- if (ins->opcode == OP_IREM_UN_IMM) {
- ins->opcode = OP_IAND_IMM;
- ins->sreg2 = -1;
- ins->inst_imm = (1 << power2) - 1;
- } else if (ins->opcode == OP_IDIV_UN_IMM) {
- ins->opcode = OP_ISHR_UN_IMM;
- ins->sreg2 = -1;
- ins->inst_imm = power2;
- }
+ ins->opcode = OP_IAND_IMM;
+ ins->sreg2 = -1;
+ ins->inst_imm = (1 << power2) - 1;
}
break;
}
+ case OP_IDIV_UN_IMM:
case OP_IDIV_IMM: {
- int c = ins->inst_imm;
- int power2 = mono_is_power_of_two (c);
-
- if (power2 == 1) {
- int r1 = mono_alloc_ireg (cfg);
-
- MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ISHR_UN_IMM, r1, ins->sreg1, 31);
- MONO_EMIT_NEW_BIALU (cfg, OP_IADD, r1, r1, ins->sreg1);
- MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ISHR_IMM, ins->dreg, r1, 1);
-
- allocated_vregs = TRUE;
- } else if (power2 > 0 && power2 < 31) {
- int r1 = mono_alloc_ireg (cfg);
-
- MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ISHR_IMM, r1, ins->sreg1, 31);
- MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ISHR_UN_IMM, r1, r1, (32 - power2));
- MONO_EMIT_NEW_BIALU (cfg, OP_IADD, r1, r1, ins->sreg1);
- MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ISHR_IMM, ins->dreg, r1, power2);
-
- allocated_vregs = TRUE;
- }
+ allocated_vregs = mono_strength_reduction_division (cfg, ins);
break;
}
#if SIZEOF_REGISTER == 8
ARM_DMB (code, ARM_DMB_SY);
break;
}
- /*case OP_BIGMUL:
- ppc_mullw (code, ppc_r4, ins->sreg1, ins->sreg2);
- ppc_mulhw (code, ppc_r3, ins->sreg1, ins->sreg2);
+ case OP_BIGMUL:
+ ARM_SMULL_REG_REG (code, ins->backend.reg3, ins->dreg, ins->sreg1, ins->sreg2);
break;
case OP_BIGMUL_UN:
- ppc_mullw (code, ppc_r4, ins->sreg1, ins->sreg2);
- ppc_mulhwu (code, ppc_r3, ins->sreg1, ins->sreg2);
- break;*/
+ ARM_UMULL_REG_REG (code, ins->backend.reg3, ins->dreg, ins->sreg1, ins->sreg2);
+ break;
case OP_STOREI1_MEMBASE_IMM:
code = mono_arm_emit_load_imm (code, ARMREG_LR, ins->inst_imm & 0xFF);
g_assert (arm_is_imm12 (ins->inst_offset));
mono_counters_register ("Aliases eliminated", MONO_COUNTER_JIT | MONO_COUNTER_INT, &mono_jit_stats.alias_removed);
mono_counters_register ("Aliased loads eliminated", MONO_COUNTER_JIT | MONO_COUNTER_INT, &mono_jit_stats.loads_eliminated);
mono_counters_register ("Aliased stores eliminated", MONO_COUNTER_JIT | MONO_COUNTER_INT, &mono_jit_stats.stores_eliminated);
+ mono_counters_register ("Optimized immediate divisions", MONO_COUNTER_JIT | MONO_COUNTER_INT, &mono_jit_stats.optimized_divisions);
}
static void runtime_invoke_info_free (gpointer value);
gint32 alias_removed;
gint32 loads_eliminated;
gint32 stores_eliminated;
+ gint32 optimized_divisions;
int methods_with_llvm;
int methods_without_llvm;
char *max_ratio_method;
long.cs \
jit-ulong.cs \
jit-float.cs \
+ constant-division.cs \
pop.cs \
time.cs \
pointer.cs \
--- /dev/null
+using System;
+using System.Reflection;
+using System.Reflection.Emit;
+
+namespace Test {
+ public class T {
+ private delegate TReturn OneParameter<TReturn, TParameter0> (TParameter0 p0);
+
+ private static Type[] SDivisionArgs = {typeof(int)};
+ private static Type[] UDivisionArgs = {typeof(uint)};
+
+ public static int Main (string[] args) {
+ if (TestSDivision (2000, 10) != 0)
+ return -1;
+
+ if (TestUDivision (2000, 10) != 0)
+ return -1;
+
+ return 0;
+ }
+
+ private static int TestSDivision (int divisions, int invokes)
+ {
+ int i, j;
+ Random rand = new Random ();
+ for (i = 0; i < divisions; i++) {
+ int divisor = rand.Next (Int32.MinValue, Int32.MaxValue);
+
+ if (divisor == 0 || divisor == -1)
+ continue;
+
+ DynamicMethod SDivision = new DynamicMethod(
+ String.Format ("SDivision{0}", i),
+ typeof(int),
+ SDivisionArgs,
+ typeof(T).Module);
+
+ ILGenerator il = SDivision.GetILGenerator();
+ il.Emit(OpCodes.Ldarg_0);
+ il.Emit(OpCodes.Ldc_I4, divisor);
+ il.Emit(OpCodes.Div);
+ il.Emit(OpCodes.Ret);
+
+ OneParameter<int, int> invokeSDivision =
+ (OneParameter<int, int>)
+ SDivision.CreateDelegate(typeof(OneParameter<int, int>));
+
+ for (j = 0; j < invokes; j++) {
+ int dividend = rand.Next (Int32.MinValue, Int32.MaxValue);
+ int result, expected;
+
+ result = invokeSDivision (dividend);
+ expected = dividend / divisor;
+
+ if (result != expected) {
+ Console.WriteLine("{0} / {1} = {2} != {3})", dividend, divisor, expected, result);
+ return -1;
+ }
+ }
+ }
+
+ return 0;
+ }
+
+ private static int TestUDivision (int divisions, int invokes)
+ {
+ int i, j;
+ Random rand = new Random ();
+ for (i = 0; i < divisions; i++) {
+ uint divisor = (uint)rand.Next (Int32.MinValue, Int32.MaxValue);
+
+ if (divisor == 0)
+ continue;
+
+ DynamicMethod UDivision = new DynamicMethod(
+ String.Format ("UDivision{0}", i),
+ typeof(uint),
+ UDivisionArgs,
+ typeof(T).Module);
+
+ ILGenerator il = UDivision.GetILGenerator();
+ il.Emit(OpCodes.Ldarg_0);
+ il.Emit(OpCodes.Ldc_I4, divisor);
+ il.Emit(OpCodes.Div_Un);
+ il.Emit(OpCodes.Ret);
+
+ OneParameter<uint, uint> invokeUDivision =
+ (OneParameter<uint, uint>)
+ UDivision.CreateDelegate(typeof(OneParameter<uint, uint>));
+
+ for (j = 0; j < invokes; j++) {
+ uint dividend = (uint)rand.Next (Int32.MinValue, Int32.MaxValue);
+ uint result, expected;
+
+ result = invokeUDivision (dividend);
+ expected = dividend / divisor;
+
+ if (result != expected) {
+ Console.WriteLine("{0} / {1} = {2} != {3})", dividend, divisor, expected, result);
+ return -1;
+ }
+ }
+ }
+ return 0;
+ }
+ }
+}
return res;
}
+ class Worker {
+ volatile bool stop = false;
+ public void Stop () {
+ stop = true;
+ }
+
+ public void Work () {
+ while (!stop) {
+ for (int i = 0; i < 100; i++) {
+ var a = new double[80000];
+ Thread.Sleep (0);
+ }
+ GC.Collect ();
+ }
+ }
+ }
+
+ public static int test_43_thread_attach_detach_contested () {
+ // Test plan: we want to create a race between the GC
+ // and native threads detaching. When a native thread
+ // calls a managed delegate, it's attached to the
+ // runtime by the wrapper. It is detached when the
+ // thread is destroyed and the TLS key destructor for
+ // MonoThreadInfo runs. That destructor wants to take
+ // the GC lock. So we create a lot of native threads
+ // while at the same time running a worker that
+ // allocates garbage and invokes the collector.
+ var w = new Worker ();
+ Thread t = new Thread(new ThreadStart (w.Work));
+ t.Start ();
+
+ for (int count = 0; count < 500; count++) {
+ int res = mono_test_marshal_thread_attach (delegate (int i) {
+ Thread.Sleep (0);
+ return i + 1;
+ });
+ }
+ Thread.Sleep (1000);
+ w.Stop ();
+ t.Join ();
+ return 43;
+
+ }
/*
* Appdomain save/restore
*/
mono_threads_transition_state_poll (MonoThreadInfo *info)
{
int raw_state, cur_state, suspend_count;
- g_assert (info == mono_thread_info_current ());
+ g_assert (mono_thread_info_is_current (info));
retry_state_change:
UNWRAP_THREAD_STATE (raw_state, cur_state, suspend_count, info);
info = (MonoThreadInfo *) arg;
g_assert (info);
+ g_assert (mono_thread_info_is_current (info));
+ g_assert (mono_thread_info_is_live (info));
small_id = info->small_id;
return FALSE;
}
+#ifndef HOST_WIN32
+static void
+thread_info_key_dtor (void *arg)
+{
+ /* Put the MonoThreadInfo back for the duration of the
+ * unregister code. In some circumstances the thread needs to
+ * take the GC lock which may block which requires a coop
+ * state transition. */
+ mono_native_tls_set_value (thread_info_key, arg);
+ unregister_thread (arg);
+ mono_native_tls_set_value (thread_info_key, NULL);
+}
+#endif
+
void
mono_threads_init (MonoThreadInfoCallbacks *callbacks, size_t info_size)
{
res = mono_native_tls_alloc (&thread_info_key, NULL);
res = mono_native_tls_alloc (&thread_exited_key, NULL);
#else
- res = mono_native_tls_alloc (&thread_info_key, (void *) unregister_thread);
+ res = mono_native_tls_alloc (&thread_info_key, (void *) thread_info_key_dtor);
res = mono_native_tls_alloc (&thread_exited_key, (void *) thread_exited_dtor);
#endif
mono_thread_info_suspend_lock_with_info (MonoThreadInfo *info)
{
g_assert (info);
+ g_assert (mono_thread_info_is_current (info));
+ g_assert (mono_thread_info_is_live (info));
MONO_ENTER_GC_SAFE_WITH_INFO(info);