From 74dab7e2c588f192fa0029d99488600a68b05b61 Mon Sep 17 00:00:00 2001 From: Martin Baulig Date: Sun, 8 Feb 2015 07:14:53 +0100 Subject: [PATCH] More build stuff. --- .gitignore | 1 + ...no.Security.Instrumentation.Console.csproj | 16 +- ....Security.Instrumentation.Framework.csproj | 2 +- ...Mono.Security.Instrumentation.Tests.csproj | 12 +- Mono.Security.NewTls/MartinsPlayground.sln | 10 - .../MartinsPlayground.userprefs | 2 +- .../Mono.Security.NewTls.csproj | 11 +- Mono.Security.Providers/DotNet/Makefile | 10 - .../Mono.Security.Providers.DotNet.csproj | 54 ---- ...Mono.Security.Providers.DotNet.dll.sources | 6 - .../DotNetSslStreamImpl.cs | 290 ------------------ .../DotNetTlsProvider.cs | 124 -------- .../DotNet/Properties/AssemblyInfo.cs | 46 --- Mono.Security.Providers/Makefile | 48 --- .../Mono.Security.Providers.sln | 38 --- .../NewMonoSource/Makefile | 12 - ...no.Security.Providers.NewMonoSource.csproj | 137 --------- ...curity.Providers.NewMonoSource.dll.sources | 31 -- .../NewMonoSource/Properties/AssemblyInfo.cs | 47 --- .../Mono.Security.Providers.NewTls.csproj | 11 +- new-tls.snk | Bin 0 -> 596 bytes 21 files changed, 19 insertions(+), 889 deletions(-) delete mode 100644 Mono.Security.Providers/DotNet/Makefile delete mode 100644 Mono.Security.Providers/DotNet/Mono.Security.Providers.DotNet.csproj delete mode 100644 Mono.Security.Providers/DotNet/Mono.Security.Providers.DotNet.dll.sources delete mode 100644 Mono.Security.Providers/DotNet/Mono.Security.Providers.DotNet/DotNetSslStreamImpl.cs delete mode 100644 Mono.Security.Providers/DotNet/Mono.Security.Providers.DotNet/DotNetTlsProvider.cs delete mode 100644 Mono.Security.Providers/DotNet/Properties/AssemblyInfo.cs delete mode 100644 Mono.Security.Providers/Makefile delete mode 100644 Mono.Security.Providers/Mono.Security.Providers.sln delete mode 100644 Mono.Security.Providers/NewMonoSource/Makefile delete mode 100644 Mono.Security.Providers/NewMonoSource/Mono.Security.Providers.NewMonoSource.csproj delete mode 100644 Mono.Security.Providers/NewMonoSource/Mono.Security.Providers.NewMonoSource.dll.sources delete mode 100644 Mono.Security.Providers/NewMonoSource/Properties/AssemblyInfo.cs create mode 100644 new-tls.snk diff --git a/.gitignore b/.gitignore index 4769169..6588b53 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ packages bin obj .DS_Store +*.userprefs diff --git a/MartinsPlayground/Instrumentation/Console/Mono.Security.Instrumentation.Console.csproj b/MartinsPlayground/Instrumentation/Console/Mono.Security.Instrumentation.Console.csproj index a27001b..837f9fd 100644 --- a/MartinsPlayground/Instrumentation/Console/Mono.Security.Instrumentation.Console.csproj +++ b/MartinsPlayground/Instrumentation/Console/Mono.Security.Instrumentation.Console.csproj @@ -94,18 +94,18 @@ NewMonoSource - - {4B5EDBC8-F8EA-48E4-AA87-A3FC52202F01} - Mono.Security.Providers.NewTls - - - {C577448D-707B-4DDD-83DC-9CB758FC6DE5} - Mono.Security.NewTls - {9367EC89-6A38-42BA-9607-0DC288E4BC3A} nunit-console + + {4B5EDBC8-F8EA-48E4-AA87-A3FC52202F01} + Mono.Security.Providers.NewTls + + + {C577448D-707B-4DDD-83DC-9CB758FC6DE5} + Mono.Security.NewTls + diff --git a/MartinsPlayground/Instrumentation/Framework/Mono.Security.Instrumentation.Framework.csproj b/MartinsPlayground/Instrumentation/Framework/Mono.Security.Instrumentation.Framework.csproj index 9611ae6..a36714c 100644 --- a/MartinsPlayground/Instrumentation/Framework/Mono.Security.Instrumentation.Framework.csproj +++ b/MartinsPlayground/Instrumentation/Framework/Mono.Security.Instrumentation.Framework.csproj @@ -90,7 +90,7 @@ - + {C577448D-707B-4DDD-83DC-9CB758FC6DE5} Mono.Security.NewTls diff --git a/MartinsPlayground/Instrumentation/Tests/Mono.Security.Instrumentation.Tests.csproj b/MartinsPlayground/Instrumentation/Tests/Mono.Security.Instrumentation.Tests.csproj index 50fa94d..5f239c9 100644 --- a/MartinsPlayground/Instrumentation/Tests/Mono.Security.Instrumentation.Tests.csproj +++ b/MartinsPlayground/Instrumentation/Tests/Mono.Security.Instrumentation.Tests.csproj @@ -33,19 +33,19 @@ - ..\..\..\..\Mono.Security.NewTls\packages\NUnitTestAdapter.1.2\lib\nunit.core.dll + ..\..\..\Mono.Security.NewTls\packages\NUnitTestAdapter.1.2\lib\nunit.core.dll - ..\..\..\..\Mono.Security.NewTls\packages\NUnitTestAdapter.1.2\lib\nunit.core.interfaces.dll + ..\..\..\Mono.Security.NewTls\packages\NUnitTestAdapter.1.2\lib\nunit.core.interfaces.dll - ..\..\..\..\Mono.Security.NewTls\packages\NUnitTestAdapter.1.2\lib\nunit.util.dll + ..\..\..\Mono.Security.NewTls\packages\NUnitTestAdapter.1.2\lib\nunit.util.dll - ..\..\..\..\Mono.Security.NewTls\packages\NUnitTestAdapter.1.2\lib\NUnit.VisualStudio.TestAdapter.dll + ..\..\..\Mono.Security.NewTls\packages\NUnitTestAdapter.1.2\lib\NUnit.VisualStudio.TestAdapter.dll - ..\..\..\..\Mono.Security.NewTls\packages\NUnit.2.6.4\lib\nunit.framework.dll + ..\..\..\Mono.Security.NewTls\packages\NUnit.2.6.4\lib\nunit.framework.dll @@ -86,7 +86,7 @@ {43272ABC-8798-4B6F-A8CA-D7F082DBB440} Mono.Security.Instrumentation.Framework - + {C577448D-707B-4DDD-83DC-9CB758FC6DE5} Mono.Security.NewTls diff --git a/Mono.Security.NewTls/MartinsPlayground.sln b/Mono.Security.NewTls/MartinsPlayground.sln index 477123f..8ed4b76 100644 --- a/Mono.Security.NewTls/MartinsPlayground.sln +++ b/Mono.Security.NewTls/MartinsPlayground.sln @@ -13,8 +13,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Security.Instrumentati EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Security.Providers.NewTls", "..\Mono.Security.Providers\NewTls\Mono.Security.Providers.NewTls.csproj", "{4B5EDBC8-F8EA-48E4-AA87-A3FC52202F01}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Security.Providers.DotNet", "..\Mono.Security.Providers\DotNet\Mono.Security.Providers.DotNet.csproj", "{3C7B65E9-AB8D-4BB4-A22E-8BCF086AD6F9}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunit-console", "..\MartinsPlayground\Instrumentation\nunit-console\nunit-console.csproj", "{9367EC89-6A38-42BA-9607-0DC288E4BC3A}" EndProject Global @@ -25,14 +23,6 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3C7B65E9-AB8D-4BB4-A22E-8BCF086AD6F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3C7B65E9-AB8D-4BB4-A22E-8BCF086AD6F9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3C7B65E9-AB8D-4BB4-A22E-8BCF086AD6F9}.Debug|x86.ActiveCfg = Debug|Any CPU - {3C7B65E9-AB8D-4BB4-A22E-8BCF086AD6F9}.Debug|x86.Build.0 = Debug|Any CPU - {3C7B65E9-AB8D-4BB4-A22E-8BCF086AD6F9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3C7B65E9-AB8D-4BB4-A22E-8BCF086AD6F9}.Release|Any CPU.Build.0 = Release|Any CPU - {3C7B65E9-AB8D-4BB4-A22E-8BCF086AD6F9}.Release|x86.ActiveCfg = Release|Any CPU - {3C7B65E9-AB8D-4BB4-A22E-8BCF086AD6F9}.Release|x86.Build.0 = Release|Any CPU {43272ABC-8798-4B6F-A8CA-D7F082DBB440}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {43272ABC-8798-4B6F-A8CA-D7F082DBB440}.Debug|Any CPU.Build.0 = Debug|Any CPU {43272ABC-8798-4B6F-A8CA-D7F082DBB440}.Debug|x86.ActiveCfg = Debug|Any CPU diff --git a/Mono.Security.NewTls/MartinsPlayground.userprefs b/Mono.Security.NewTls/MartinsPlayground.userprefs index d8b4f7e..1ddc42a 100644 --- a/Mono.Security.NewTls/MartinsPlayground.userprefs +++ b/Mono.Security.NewTls/MartinsPlayground.userprefs @@ -1,4 +1,4 @@ - + diff --git a/Mono.Security.NewTls/Mono.Security.NewTls.csproj b/Mono.Security.NewTls/Mono.Security.NewTls.csproj index 4f20366..2093c26 100644 --- a/Mono.Security.NewTls/Mono.Security.NewTls.csproj +++ b/Mono.Security.NewTls/Mono.Security.NewTls.csproj @@ -8,7 +8,7 @@ Mono.Security.NewTls Mono.Security.NewTls true - ..\mono.snk + ..\new-tls.snk v4.5 @@ -166,15 +166,6 @@ common\Consts.cs - - common\Locale.cs - - - common\MonoTODOAttribute.cs - - - common\SR.cs - diff --git a/Mono.Security.Providers/DotNet/Makefile b/Mono.Security.Providers/DotNet/Makefile deleted file mode 100644 index d860d6b..0000000 --- a/Mono.Security.Providers/DotNet/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -thisdir = class/Mono.Security.Providers/DotNet -SUBDIRS = -include ../../../build/rules.make - -LIBRARY = Mono.Security.Providers.DotNet.dll -LIB_MCS_FLAGS = -r:System.dll -r:Mono.Security -unsafe -nowarn:1030 -keyfile:../../mono.pub -delaysign -TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:169,219,618,672 - -include ../../../build/library.make - diff --git a/Mono.Security.Providers/DotNet/Mono.Security.Providers.DotNet.csproj b/Mono.Security.Providers/DotNet/Mono.Security.Providers.DotNet.csproj deleted file mode 100644 index 843ddb0..0000000 --- a/Mono.Security.Providers/DotNet/Mono.Security.Providers.DotNet.csproj +++ /dev/null @@ -1,54 +0,0 @@ - - - - Debug - AnyCPU - {3C7B65E9-AB8D-4BB4-A22E-8BCF086AD6F9} - Library - Mono.Security.Providers.DotNet - Mono.Security.Providers.DotNet - true - ..\..\mono.snk - v4.5 - - - true - full - false - ..\bin\Debug - DEBUG;NET_4_5 - prompt - 4 - false - - - true - ..\bin\Release - prompt - 4 - false - NET_4_5 - - - - - - - - - - common\Consts.cs - - - common\Locale.cs - - - common\MonoTODOAttribute.cs - - - common\SR.cs - - - - - \ No newline at end of file diff --git a/Mono.Security.Providers/DotNet/Mono.Security.Providers.DotNet.dll.sources b/Mono.Security.Providers/DotNet/Mono.Security.Providers.DotNet.dll.sources deleted file mode 100644 index 054355e..0000000 --- a/Mono.Security.Providers/DotNet/Mono.Security.Providers.DotNet.dll.sources +++ /dev/null @@ -1,6 +0,0 @@ -./Properties/AssemblyInfo.cs -../common/Consts.cs -../../../build/common/Locale.cs - -./Mono.Security.Providers.DotNet/DotNetTlsProvider.cs -./Mono.Security.Providers.DotNet/DotNetSslStreamImpl.cs diff --git a/Mono.Security.Providers/DotNet/Mono.Security.Providers.DotNet/DotNetSslStreamImpl.cs b/Mono.Security.Providers/DotNet/Mono.Security.Providers.DotNet/DotNetSslStreamImpl.cs deleted file mode 100644 index 15e780f..0000000 --- a/Mono.Security.Providers/DotNet/Mono.Security.Providers.DotNet/DotNetSslStreamImpl.cs +++ /dev/null @@ -1,290 +0,0 @@ -// -// DotNetSslStreamImpl.cs -// -// Author: -// Martin Baulig -// -// Copyright (c) 2015 Xamarin, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; -using System.IO; -using System.Net; -using System.Net.Security; -using System.Threading.Tasks; -using System.Security.Authentication; -using System.Security.Cryptography.X509Certificates; -using System.Security.Principal; -using System.Security.Cryptography; -using Mono.Security.Interface; - -namespace Mono.Security.Providers.DotNet -{ - class DotNetSslStreamImpl : MonoSslStream - { - SslStream impl; - - internal SslStream Impl { - get { - CheckDisposed (); - return impl; - } - } - - public DotNetSslStreamImpl ( - Stream innerStream, bool leaveInnerStreamOpen, - RemoteCertificateValidationCallback userCertificateValidationCallback, - LocalCertificateSelectionCallback userCertificateSelectionCallback) - { - impl = new SslStream ( - innerStream, leaveInnerStreamOpen, - userCertificateValidationCallback, - userCertificateSelectionCallback); - } - - public override void AuthenticateAsClient (string targetHost) - { - Impl.AuthenticateAsClient (targetHost); - } - - public override void AuthenticateAsClient (string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation) - { - Impl.AuthenticateAsClient (targetHost, clientCertificates, enabledSslProtocols, checkCertificateRevocation); - } - - public override IAsyncResult BeginAuthenticateAsClient (string targetHost, AsyncCallback asyncCallback, object asyncState) - { - return Impl.BeginAuthenticateAsClient (targetHost, asyncCallback, asyncState); - } - - public override IAsyncResult BeginAuthenticateAsClient (string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState) - { - return Impl.BeginAuthenticateAsClient (targetHost, clientCertificates, enabledSslProtocols, checkCertificateRevocation, asyncCallback, asyncState); - } - - public override void EndAuthenticateAsClient (IAsyncResult asyncResult) - { - Impl.EndAuthenticateAsClient (asyncResult); - } - - public override void AuthenticateAsServer (X509Certificate serverCertificate) - { - Impl.AuthenticateAsServer (serverCertificate); - } - - public override void AuthenticateAsServer (X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation) - { - Impl.AuthenticateAsServer (serverCertificate, clientCertificateRequired, enabledSslProtocols, checkCertificateRevocation); - } - - public override IAsyncResult BeginAuthenticateAsServer (X509Certificate serverCertificate, AsyncCallback asyncCallback, object asyncState) - { - return Impl.BeginAuthenticateAsServer (serverCertificate, asyncCallback, asyncState); - } - - public override IAsyncResult BeginAuthenticateAsServer (X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState) - { - return Impl.BeginAuthenticateAsServer (serverCertificate, clientCertificateRequired, enabledSslProtocols, checkCertificateRevocation, asyncCallback, asyncState); - } - - public override void EndAuthenticateAsServer (IAsyncResult asyncResult) - { - Impl.EndAuthenticateAsServer (asyncResult); - } - - public override Task AuthenticateAsClientAsync (string targetHost) - { - return Impl.AuthenticateAsClientAsync (targetHost); - } - - public override Task AuthenticateAsClientAsync (string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation) - { - return Impl.AuthenticateAsClientAsync (targetHost, clientCertificates, enabledSslProtocols, checkCertificateRevocation); - } - - public override Task AuthenticateAsServerAsync (X509Certificate serverCertificate) - { - return Impl.AuthenticateAsServerAsync (serverCertificate); - } - - public override Task AuthenticateAsServerAsync (X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation) - { - return Impl.AuthenticateAsServerAsync (serverCertificate, clientCertificateRequired, enabledSslProtocols, checkCertificateRevocation); - } - - public override void Flush () - { - Impl.Flush (); - } - - public override int Read (byte[] buffer, int offset, int count) - { - return Impl.Read (buffer, offset, count); - } - - public override void Write (byte[] buffer) - { - Impl.Write (buffer); - } - - public override void Write (byte[] buffer, int offset, int count) - { - Impl.Write (buffer, offset, count); - } - - public override IAsyncResult BeginRead (byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState) - { - return Impl.BeginRead (buffer, offset, count, asyncCallback, asyncState); - } - - public override int EndRead (IAsyncResult asyncResult) - { - return Impl.EndRead (asyncResult); - } - - public override IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState) - { - return Impl.BeginWrite (buffer, offset, count, asyncCallback, asyncState); - } - - public override void EndWrite (IAsyncResult asyncResult) - { - Impl.EndWrite (asyncResult); - } - - public override TransportContext TransportContext { - get { throw new NotSupportedException (); } - } - - public override bool IsAuthenticated { - get { return Impl.IsAuthenticated; } - } - - public override bool IsMutuallyAuthenticated { - get { return Impl.IsMutuallyAuthenticated; } - } - - public override bool IsEncrypted { - get { return Impl.IsEncrypted; } - } - - public override bool IsSigned { - get { return Impl.IsSigned; } - } - - public override bool IsServer { - get { return Impl.IsServer; } - } - - public override CipherAlgorithmType CipherAlgorithm { - get { return Impl.CipherAlgorithm; } - } - - public override int CipherStrength { - get { return Impl.CipherStrength; } - } - - public override HashAlgorithmType HashAlgorithm { - get { return Impl.HashAlgorithm; } - } - - public override int HashStrength { - get { return Impl.HashStrength; } - } - - public override ExchangeAlgorithmType KeyExchangeAlgorithm { - get { return Impl.KeyExchangeAlgorithm; } - } - - public override int KeyExchangeStrength { - get { return KeyExchangeStrength; } - } - - public override bool CanRead { - get { return Impl.CanRead; } - } - - public override bool CanTimeout { - get { return Impl.CanTimeout; } - } - - public override bool CanWrite { - get { return Impl.CanWrite; } - } - - public override long Length { - get { return Impl.Length; } - } - - public override long Position { - get { return Impl.Position; } - } - - public override void SetLength (long value) - { - Impl.SetLength (value); - } - - public override AuthenticatedStream AuthenticatedStream { - get { return Impl; } - } - - public override int ReadTimeout { - get { return Impl.ReadTimeout; } - set { Impl.ReadTimeout = value; } - } - - public override int WriteTimeout { - get { return Impl.WriteTimeout; } - set { Impl.WriteTimeout = value; } - } - - public override bool CheckCertRevocationStatus { - get { return Impl.CheckCertRevocationStatus; } - } - - public override X509Certificate LocalCertificate { - get { return Impl.LocalCertificate; } - } - - public override X509Certificate RemoteCertificate { - get { return Impl.RemoteCertificate; } - } - - public override SslProtocols SslProtocol { - get { return Impl.SslProtocol; } - } - - void CheckDisposed () - { - if (impl == null) - throw new ObjectDisposedException ("MonoSslStream"); - } - - protected override void Dispose (bool disposing) - { - if (impl != null && disposing) { - impl.Dispose (); - impl = null; - } - } - } -} - diff --git a/Mono.Security.Providers/DotNet/Mono.Security.Providers.DotNet/DotNetTlsProvider.cs b/Mono.Security.Providers/DotNet/Mono.Security.Providers.DotNet/DotNetTlsProvider.cs deleted file mode 100644 index 709ee58..0000000 --- a/Mono.Security.Providers/DotNet/Mono.Security.Providers.DotNet/DotNetTlsProvider.cs +++ /dev/null @@ -1,124 +0,0 @@ -// -// MonoDefaultTlsProvider.cs -// -// Author: -// Martin Baulig -// -// Copyright (c) 2015 Xamarin, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -using System; -using System.IO; -using System.Net; -using System.Net.Security; -using System.Security.Cryptography.X509Certificates; -using Mono.Security.Interface; - -namespace Mono.Security.Providers.DotNet -{ - /* - * This provider only uses the public .NET APIs from System.dll. - * - * It is primarily intended for testing. - */ - public class DotNetTlsProvider : MonoTlsProvider - { - public override bool SupportsHttps { - get { return false; } - } - - public override bool SupportsSslStream { - get { return true; } - } - - public override bool SupportsMonoExtensions { - get { return false; } - } - - public override bool SupportsTlsContext { - get { return false; } - } - - public override bool IsHttpsStream (Stream stream) - { - return false; - } - -#pragma warning disable 618 - - public override IMonoHttpsStream GetHttpsStream (Stream stream) - { - throw new InvalidOperationException (); - } - - public override IMonoHttpsStream CreateHttpsClientStream ( - Stream innerStream, HttpWebRequest request, byte[] buffer) - { - throw new NotSupportedException ("Web API is not supported."); - } - -#pragma warning restore 618 - - public override MonoSslStream CreateSslStream ( - Stream innerStream, bool leaveInnerStreamOpen, - MonoRemoteCertificateValidationCallback userCertificateValidationCallback, - MonoLocalCertificateSelectionCallback userCertificateSelectionCallback, - MonoTlsSettings settings = null) - { - if (settings != null) - throw new NotSupportedException ("Mono-specific API Extensions not available."); - - var sslStream = new DotNetSslStreamImpl ( - innerStream, leaveInnerStreamOpen, - ConvertCallback (userCertificateValidationCallback), - ConvertCallback (userCertificateSelectionCallback)); - return sslStream; - } - - public override IMonoTlsContext CreateTlsContext ( - string hostname, bool serverMode, TlsProtocols protocolFlags, - X509Certificate serverCertificate, X509CertificateCollection clientCertificates, - bool remoteCertRequired, bool checkCertName, bool checkCertRevocationStatus, - MonoEncryptionPolicy encryptionPolicy, - MonoRemoteCertificateValidationCallback userCertificateValidationCallback, - MonoLocalCertificateSelectionCallback userCertificateSelectionCallback, - MonoTlsSettings settings) - { - throw new NotSupportedException (); - } - - internal static RemoteCertificateValidationCallback ConvertCallback (MonoRemoteCertificateValidationCallback callback) - { - if (callback == null) - return null; - - return (s, c, ch, e) => callback (null, c, ch, e); - } - - internal static LocalCertificateSelectionCallback ConvertCallback (MonoLocalCertificateSelectionCallback callback) - { - if (callback == null) - return null; - - return (s, t, lc, rc, ai) => callback (t, lc, rc, ai); - } - - } -} - diff --git a/Mono.Security.Providers/DotNet/Properties/AssemblyInfo.cs b/Mono.Security.Providers/DotNet/Properties/AssemblyInfo.cs deleted file mode 100644 index aae1f1c..0000000 --- a/Mono.Security.Providers/DotNet/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,46 +0,0 @@ -// -// AssemblyInfo.cs -// -// Author: -// Martin Baulig -// -// 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.dll")] -[assembly: AssemblyProduct ("MONO CLI")] -[assembly: AssemblyTitle ("Mono.Security.Providers.dll")] -[assembly: CLSCompliant (true)] -[assembly: ComVisible (false)] -[assembly: NeutralResourcesLanguage ("en-US")] - diff --git a/Mono.Security.Providers/Makefile b/Mono.Security.Providers/Makefile deleted file mode 100644 index 8842f8e..0000000 --- a/Mono.Security.Providers/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -MCS_BUILD_DIR = ../../build - -thisdir = class/Mono.Security.Providers - -PROVIDERS = DotNet NewMonoSource - -mobile_static_SUBDIRS = $(PROVIDERS) - -net_4_5_SUBDIRS = $(PROVIDERS) - -monodroid_SUBDIRS = $(net_4_5_SUBDIRS) - -xammac_SUBDIRS = $(net_4_5_SUBDIRS) - -PROFILE_SUBDIRS = $(PROVIDERS) - -#OVERRIDE_TARGET_ALL = yes - -# -# The output directory for the facade assemblies -# -target_dir = $(topdir)/class/lib/$(PROFILE)/Mono.Security.Providers - -# -# Contains the expanded version of the target dll for each profile -# -target_libraries = $(patsubst %,$(target_dir)/%.dll,$(SUBDIRS)) - -# -# To build each target, go into the subdirectory -# -$(target_dir)/%.dll: - (cd `basename $@ .dll`; $(MAKE)) - -#all.override: $(target_libraries) - -include $(MCS_BUILD_DIR)/rules.make - -dist-local: dist-default - -SUBDIRS = $(PROFILE) - -doc-update-local: - @echo "not doing docs" - -doc-update-recursive: - @echo "not doing docs" - diff --git a/Mono.Security.Providers/Mono.Security.Providers.sln b/Mono.Security.Providers/Mono.Security.Providers.sln deleted file mode 100644 index 084a4a0..0000000 --- a/Mono.Security.Providers/Mono.Security.Providers.sln +++ /dev/null @@ -1,38 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Security.Providers.DotNet", "DotNet\Mono.Security.Providers.DotNet.csproj", "{3C7B65E9-AB8D-4BB4-A22E-8BCF086AD6F9}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Security.Providers.NewMonoSource", "NewMonoSource\Mono.Security.Providers.NewMonoSource.csproj", "{4A392AE3-7D5C-463E-AECF-AEEC3AD439CB}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - Debug|x86 = Debug|x86 - Release|x86 = Release|x86 - Test|Any CPU = Test|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3C7B65E9-AB8D-4BB4-A22E-8BCF086AD6F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3C7B65E9-AB8D-4BB4-A22E-8BCF086AD6F9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3C7B65E9-AB8D-4BB4-A22E-8BCF086AD6F9}.Debug|x86.ActiveCfg = Debug|Any CPU - {3C7B65E9-AB8D-4BB4-A22E-8BCF086AD6F9}.Debug|x86.Build.0 = Debug|Any CPU - {3C7B65E9-AB8D-4BB4-A22E-8BCF086AD6F9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3C7B65E9-AB8D-4BB4-A22E-8BCF086AD6F9}.Release|Any CPU.Build.0 = Release|Any CPU - {3C7B65E9-AB8D-4BB4-A22E-8BCF086AD6F9}.Release|x86.ActiveCfg = Release|Any CPU - {3C7B65E9-AB8D-4BB4-A22E-8BCF086AD6F9}.Release|x86.Build.0 = Release|Any CPU - {3C7B65E9-AB8D-4BB4-A22E-8BCF086AD6F9}.Test|Any CPU.ActiveCfg = Debug|Any CPU - {3C7B65E9-AB8D-4BB4-A22E-8BCF086AD6F9}.Test|Any CPU.Build.0 = Debug|Any CPU - {4A392AE3-7D5C-463E-AECF-AEEC3AD439CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4A392AE3-7D5C-463E-AECF-AEEC3AD439CB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4A392AE3-7D5C-463E-AECF-AEEC3AD439CB}.Debug|x86.ActiveCfg = Debug|x86 - {4A392AE3-7D5C-463E-AECF-AEEC3AD439CB}.Debug|x86.Build.0 = Debug|x86 - {4A392AE3-7D5C-463E-AECF-AEEC3AD439CB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4A392AE3-7D5C-463E-AECF-AEEC3AD439CB}.Release|Any CPU.Build.0 = Release|Any CPU - {4A392AE3-7D5C-463E-AECF-AEEC3AD439CB}.Release|x86.ActiveCfg = Release|x86 - {4A392AE3-7D5C-463E-AECF-AEEC3AD439CB}.Release|x86.Build.0 = Release|x86 - {4A392AE3-7D5C-463E-AECF-AEEC3AD439CB}.Test|Any CPU.ActiveCfg = Test|Any CPU - {4A392AE3-7D5C-463E-AECF-AEEC3AD439CB}.Test|Any CPU.Build.0 = Test|Any CPU - EndGlobalSection -EndGlobal diff --git a/Mono.Security.Providers/NewMonoSource/Makefile b/Mono.Security.Providers/NewMonoSource/Makefile deleted file mode 100644 index 40713a6..0000000 --- a/Mono.Security.Providers/NewMonoSource/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -thisdir = class/Mono.Security.Providers/NewMonoSource -SUBDIRS = -include ../../../build/rules.make - -LIBRARY = Mono.Security.Providers.NewMonoSource.dll -LIB_MCS_FLAGS = -r:System.dll -d:SECURITY_DEP -d:MONO_SECURITY_ALIAS -r:MonoSecurity=Mono.Security \ - -unsafe -nowarn:1030 -keyfile:../../mono.pub -delaysign \ - -d:MONO -d:FEATURE_PAL -d:MONO_FEATURE_NEW_TLS -d:NEW_MONO_SOURCE -d:DISABLE_CAS_USE -TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:169,219,618,672 - -include ../../../build/library.make - diff --git a/Mono.Security.Providers/NewMonoSource/Mono.Security.Providers.NewMonoSource.csproj b/Mono.Security.Providers/NewMonoSource/Mono.Security.Providers.NewMonoSource.csproj deleted file mode 100644 index f1680da..0000000 --- a/Mono.Security.Providers/NewMonoSource/Mono.Security.Providers.NewMonoSource.csproj +++ /dev/null @@ -1,137 +0,0 @@ - - - - Debug - AnyCPU - {4A392AE3-7D5C-463E-AECF-AEEC3AD439CB} - Library - Mono.Security.Providers.NewMonoSource - v4.5 - Mono.Security.Providers.NewMonoSource - true - ..\..\mono.snk - - - 436,649,169 - bin\Debug - 4 - false - DEBUG;MONO;FEATURE_PAL;MONO_SECURITY_ALIAS;MONO_FEATURE_NEW_TLS;NEW_MONO_SOURCE;SECURITY_DEP;DISABLE_CAS_USE;NET_4_5 - true - true - - - 436,649,169 - bin\Release - 4 - false - MONO;FEATURE_PAL;MONO_SECURITY_ALIAS;MONO_FEATURE_NEW_TLS;NEW_MONO_SOURCE;SECURITY_DEP;DISABLE_CAS_USE;NET_4_5 - true - - - - - MonoSecurity - - - - - referencesource\Net\Logging.cs - - - referencesource\Net\_SslSessionsCache.cs - - - referencesource\Net\_LazyAsyncResult.cs - - - referencesource\Net\_LoggingObject.cs - - - referencesource\Net\_NTAuthentication.cs - - - referencesource\Net\_SecureChannel.cs - - - referencesource\Net\SecureProtocols\SslStream.cs - - - referencesource\Net\SecureProtocols\_SslState.cs - - - referencesource\Net\SecureProtocols\_SslStream.cs - - - referencesource\Net\SecureProtocols\_FixedSizeReader.cs - - - referencesource\Net\SecureProtocols\_HelperAsyncResults.cs - - - referencesource\corlib\NDP_Common\PinnableBufferCache.cs - - - System\SR.cs - - - System\SR2.cs - - - common\SR.cs - - - common\Consts.cs - - - ReferenceSources\Internal.cs - - - ReferenceSources\SSPIWrapper.cs - - - ReferenceSources\SSPISafeHandles.cs - - - ReferenceSources\SslStream.cs - - - ReferenceSources\_SslState.cs - - - ReferenceSources\_SecureChannel.cs - - - ReferenceSources\SSPIConfiguration.cs - - - - Mono.Net.Security\IMonoSslStream.cs - - - Mono.Net.Security\IMonoTlsProvider.cs - - - Mono.Net.Security\MonoTlsProviderWrapper.cs - - - Mono.Net.Security\CallbackHelpers.cs - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Mono.Security.Providers/NewMonoSource/Mono.Security.Providers.NewMonoSource.dll.sources b/Mono.Security.Providers/NewMonoSource/Mono.Security.Providers.NewMonoSource.dll.sources deleted file mode 100644 index 7a70e08..0000000 --- a/Mono.Security.Providers/NewMonoSource/Mono.Security.Providers.NewMonoSource.dll.sources +++ /dev/null @@ -1,31 +0,0 @@ -./Properties/AssemblyInfo.cs -../common/Consts.cs -../../../build/common/SR.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/_SecureChannel.cs -../../System/ReferenceSources/SSPIConfiguration.cs -../../System/Mono.Net.Security/CallbackHelpers.cs -../../System/Mono.Net.Security/IMonoSslStream.cs -../../System/Mono.Net.Security/IMonoTlsProvider.cs -../../System/Mono.Net.Security/MonoTlsProviderWrapper.cs diff --git a/Mono.Security.Providers/NewMonoSource/Properties/AssemblyInfo.cs b/Mono.Security.Providers/NewMonoSource/Properties/AssemblyInfo.cs deleted file mode 100644 index 9530806..0000000 --- a/Mono.Security.Providers/NewMonoSource/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,47 +0,0 @@ -// -// AssemblyInfo.cs -// -// Author: -// Martin Baulig -// -// 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.NewMonoSource.dll")] -[assembly: AssemblyProduct ("MONO CLI")] -[assembly: AssemblyTitle ("Mono.Security.Providers.NewMonoSource.dll")] -[assembly: CLSCompliant (true)] -[assembly: ComVisible (false)] -[assembly: NeutralResourcesLanguage ("en-US")] - -[assembly: InternalsVisibleTo ("Mono.Security.Providers.NewTls, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")] diff --git a/Mono.Security.Providers/NewTls/Mono.Security.Providers.NewTls.csproj b/Mono.Security.Providers/NewTls/Mono.Security.Providers.NewTls.csproj index 53c8588..b3afb38 100644 --- a/Mono.Security.Providers/NewTls/Mono.Security.Providers.NewTls.csproj +++ b/Mono.Security.Providers/NewTls/Mono.Security.Providers.NewTls.csproj @@ -8,7 +8,7 @@ Mono.Security.Providers.NewTls Mono.Security.Providers.NewTls true - ..\..\mono.snk + ..\..\new-tls.snk v4.5 @@ -32,15 +32,6 @@ false - - common\Locale.cs - - - common\MonoTODOAttribute.cs - - - common\SR.cs - Mono.Security.Providers.NewTls\MonoNewTlsStream.cs diff --git a/new-tls.snk b/new-tls.snk new file mode 100644 index 0000000000000000000000000000000000000000..b941a6567f2c7645a32500d0cdc34d44e0eb79cf GIT binary patch literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONaL00003Gi_?^L1IjyR;yQ-f&P%CcJbfrNH>qk zPEJG*MOJrWB;wZ$7@2L6^I|9UIsLRlK;U*!@kLrln<=N}A)1ecka>6i8;f}Jtt2U&Ei(@u-+SQ^PLZaI z4$RR$*`3HgSxjXC7OTgO?*6eZzTnE0{<%{Z!Vfm-N8!flShfLhs2VAaLFig{4)u;+ zg`G2($89CFG#ryO15Ofjy660h+7yUb72E7qKFQGF^et_X1wj#Rl4Z}Xl!B>XZs(u3 z^mcZZ25c)ER=pU1&d)zI>EH*~ihOdnPJ2(5tE{KA$>b)}s*%M`Wu@)=XuK~}n9d^8 zbaUlo1l??TNw!9{)T-uO7$hX?)Ec^MABYp;?;jZfb6$LBr2ad4d2gVikp41SIJ-Fnv|)p8^KD&n{@f3;LZyxG)eiHU z5`n{>FSUDN>L)PMO-&8aTe*&Ng*tPvvQ`QrqNND1QV>BX$M`HQwfp<6kqKo*n1{jc iO+=V@LmUw_OS^?lk7$qMW8~hdhS1jNo*Z;$A1z;%MITB4 literal 0 HcmV?d00001