Imported Upstream version 4.3.2.467

Former-commit-id: 9c2cb47f45fa221e661ab616387c9cda183f283d
This commit is contained in:
Xamarin Public Jenkins
2016-02-22 11:00:01 -05:00
parent f302175246
commit f3e3aab35a
4097 changed files with 122406 additions and 82300 deletions

View File

@@ -0,0 +1,21 @@
thisdir = class/Mono.Security.Providers.NewSystemSource
SUBDIRS =
include ../../build/rules.make
ifdef MOBILE_PROFILE
EXTERN_ALIAS_FLAGS = -r:Mono.Security
else
EXTERN_ALIAS_FLAGS = -d:MONO_SECURITY_ALIAS -r:MonoSecurity=Mono.Security
endif
LIBRARY = Mono.Security.Providers.NewSystemSource.dll
LIB_REFS = System
LIB_MCS_FLAGS = -d:SECURITY_DEP $(EXTERN_ALIAS_FLAGS) \
-unsafe -nowarn:1030 -keyfile:../mono.pub -delaysign -d:MONO -d:FEATURE_PAL -d:MONO_FEATURE_NEW_TLS \
-d:MONO_FEATURE_NEW_SYSTEM_SOURCE -d:DISABLE_CAS_USE
EXTRA_DISTFILES = README.md
include ../../build/library.make
$(the_lib): ../Mono.Security/Makefile

View File

@@ -0,0 +1,33 @@
./Properties/AssemblyInfo.cs
../../build/common/SR.cs
../../build/common/Consts.cs
../../build/common/Locale.cs
../../../external/referencesource/System/net/System/Net/Logging.cs
../../../external/referencesource/System/net/System/Net/_SslSessionsCache.cs
../../../external/referencesource/System/net/System/Net/_LazyAsyncResult.cs
../../../external/referencesource/System/net/System/Net/_LoggingObject.cs
../../../external/referencesource/System/net/System/Net/_NTAuthentication.cs
../../../external/referencesource/System/net/System/Net/_SecureChannel.cs
../../../external/referencesource/System/net/System/Net/SecureProtocols/SslStream.cs
../../../external/referencesource/System/net/System/Net/SecureProtocols/_SslState.cs
../../../external/referencesource/System/net/System/Net/SecureProtocols/_SslStream.cs
../../../external/referencesource/System/net/System/Net/SecureProtocols/_FixedSizeReader.cs
../../../external/referencesource/System/net/System/Net/SecureProtocols/_HelperAsyncResults.cs
../../../external/referencesource/mscorlib/InternalApis/NDP_Common/inc/PinnableBufferCache.cs
../System/ReferenceSources/SR.cs
../System/ReferenceSources/SR2.cs
../System/ReferenceSources/Internal.cs
../System/ReferenceSources/SSPIWrapper.cs
../System/ReferenceSources/SSPISafeHandles.cs
../System/ReferenceSources/SslStream.cs
../System/ReferenceSources/_SslState.cs
../System/ReferenceSources/_SslStream.cs
../System/ReferenceSources/_SecureChannel.cs
../System/ReferenceSources/SSPIConfiguration.cs
../System/Mono.Net.Security/CallbackHelpers.cs
../System/Mono.Net.Security/IMonoTlsProvider.cs
../System/Mono.Net.Security/MonoTlsProviderFactory.cs
../System/Mono.Net.Security/MonoTlsProviderWrapper.cs

View File

@@ -0,0 +1,48 @@
//
// AssemblyInfo.cs
//
// Author:
// Martin Baulig <martin.baulig@xamarin.com>
//
// Copyright (c) 2015 Xamarin, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using System.Reflection;
using System.Resources;
using System.Security;
using System.Security.Permissions;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about the system assembly
[assembly: AssemblyVersion (Consts.FxVersion)]
[assembly: AssemblyCompany ("MONO development team")]
[assembly: AssemblyCopyright ("(c) 2015 Xamarin")]
[assembly: AssemblyDescription ("Mono.Security.Providers.NewSystemSource.dll")]
[assembly: AssemblyProduct ("MONO CLI")]
[assembly: AssemblyTitle ("Mono.Security.Providers.NewSystemSource.dll")]
[assembly: CLSCompliant (true)]
[assembly: ComVisible (false)]
[assembly: NeutralResourcesLanguage ("en-US")]
[assembly: InternalsVisibleTo ("Mono.Security.Providers.NewTls, PublicKey=002400000480000094000000060200000024000052534131000400001100000003336d6aed41624ca156ab579881fe90a576f1dfec48378fc94e4e440f4556776224e2d70c18996d91f36227f539fdb44340e07651f1455a489b29a7e6219a8f85e52b0f8588b4f8a857746a8468d37b556223d1452f3fcbaf0f269cdf1900ceb68f69485dc5887750d19571030c732331e00387d9b813a9ad52891087301793")]
[assembly: InternalsVisibleTo ("Mono.Security.Providers.NewTls, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]

View File

@@ -0,0 +1,95 @@
Mono.Security.Interface / Mono.Security.Providers
=================================================
This is not a public API yet, but will eventually become public.
Mono.Security.Interface
-----------------------
`Mono.Security.Interface` provides an abstraction layer for the TLS
APIs that are currently being used by Mono's class libraries.
The main API entry points are `MonoTlsProviderFactory.GetProvider()`
and `MonoTlsProviderFactory.InstallProvider()`.
Mono.Net.Security
-----------------
`Mono.Net.Security` provides the internal implementation and lives
inside `System.dll` as private and internal APIs. `Mono.Security.dll`
uses reflection to access these.
On Mobile, the `Mono.Security.Interface` APIs are included as public
APIs in `System.dll`.
Mono.Security.Providers
-----------------------
Implementations of the `Mono.Security.Interface.MonoTlsProvider` class
to provide TLS functionality.
The default provider is inside `System.dll` - it will be used automatically
if you don't explicitly install a custom provider, so simply call
`MonoTlsProviderFactory.GetProvider()` to use it.
* DotNet:
Provides the default `SslStream` implementation from `System.dll`, only using
public .NET types.
* NewSystemSource:
Compiles several referencesource files which would normally live inside
`System.dll` if we compiled it with their `SslStream` implementation.
This allows to keep the code in `System.dll` as-is, while still providing the
new `SslStream`, which will be required by the new TLS code.
`System.dll` needs to make its internals visible and we're using several compiler /
external alias tricks in here to make this work.
In this configuration, `MONO_SYSTEM_ALIAS`, `MONO_FEATURE_NEW_TLS` and
`MONO_FEATURE_NEW_SYSTEM_SOURCE` (defining conditional for this configuration)
are defined. We do not define `MONO_X509_ALIAS here`.
The `Mono.Security.Providers.DotNet` and `Mono.Security.Providers.NewSystemSource` directory is currently
enabled in the top-level `Makefile`, but the resulting binaries should only be used to test the new TLS
code and not shipped as stable APIs.
Pending changes
---------------
This code is not actually being used in `System.dll` yet. I have some
local changes which will switch the existing code in `WebClient`,
`SmptClient` and `FtpWebRequest` over, but these need to be carefully
tested.
At the moment, this work branch only provides new code and build
changes, which shuffle some stuff around. There are also several
new files which are conditional and not actually being built by
default.
Build Configurations
--------------------
* Normal build:
Builds everything as before with some new APIs added, but without
modifying any existing functionality.
* Build with the `newtls` profile:
Builds `System.dll` with the new `SslStream` implementation from the
referencesource. This is currently a "build then throw away" profile
and not enabled from the top-level Makefile. The resulting `System.dll`
won't actually work at runtime since it's missing the new TLS code;
building it helps find problems and ensures that it will actually
be possible to build this once we deploy it.
* Mono.Security.Providers:
The new TLS code requires the newly built `System` and `Mono.Security.Providers.NewSystemSource`
from this branch installed in the system. It is recommended to install it
into a custom prefix and set that as custom runtime in Xamarin Studio.
Last changed March 07th, 2015,
Martin Baulig <martin.baulig@xamarin.com>