From b95516a3dd0d69b65b0d594f30d4c035fe0e0eb6 Mon Sep 17 00:00:00 2001 From: "Xamarin Public Jenkins (auto-signing)" Date: Tue, 23 Aug 2016 13:20:38 +0000 Subject: [PATCH] Imported Upstream version 4.6.0.150 Former-commit-id: 73e3bb1e96dd09dc931c1dfe559d2c7f7b8b02c7 --- .../AssemblyInfo.cs | 2 +- .../Facades/System.AppContext/AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 2 +- .../System.Collections/AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 2 +- .../System.Data.Common/AssemblyInfo.cs | 2 +- .../System.Data.SqlClient/AssemblyInfo.cs | 2 +- .../System.Diagnostics.Debug/AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 41 - .../Makefile | 23 - ...Diagnostics.PerformanceCounter.dll.sources | 3 - .../TypeForwarders.cs | 28 - .../AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 2 +- .../StackFrameExtensions.cs | 12 + .../AssemblyInfo.cs | 2 +- .../System.Drawing.Primitives/AssemblyInfo.cs | 2 +- .../System.Dynamic.Runtime/AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 2 +- .../System.Globalization/AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 2 +- .../System.IO.FileSystem/AssemblyInfo.cs | 2 +- .../System.IO.IsolatedStorage/AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 2 +- mcs/class/Facades/System.IO/AssemblyInfo.cs | 2 +- .../System.Linq.Expressions/AssemblyInfo.cs | 2 +- mcs/class/Facades/System.Linq/AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 41 - .../Makefile | 23 - ...tem.Net.Http.WebRequestHandler.dll.sources | 3 - .../TypeForwarders.cs | 25 - .../AssemblyInfo.cs | 2 +- .../System.Net.Primitives/AssemblyInfo.cs | 2 +- .../System.Net.Requests/AssemblyInfo.cs | 2 +- .../System.Net.Sockets/AssemblyInfo.cs | 2 +- .../System.ObjectModel/AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 2 +- .../Facades/System.Reflection/AssemblyInfo.cs | 2 +- .../System.Runtime.Extensions/AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 2 +- .../Facades/System.Runtime/AssemblyInfo.cs | 2 +- .../System.Security.Claims/AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 41 - .../Makefile | 23 - ...curity.Cryptography.Algorithms.dll.sources | 6 - .../TypeForwarders.cs | 46 - .../AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 41 - .../ECDsaOpenSsl.cs | 45 - .../Makefile | 23 - .../RSAOpenSsl.cs | 55 -- .../SafeEvpPKeyHandle.cs | 50 - ....Security.Cryptography.OpenSsl.dll.sources | 4 - .../AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 2 +- .../System.ServiceModel.Http/AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 2 +- .../System.ServiceModel.Primitives/Makefile | 6 +- ...System.ServiceModel.Primitives.dll.sources | 7 - .../TypeForwarders.cs | 19 +- ...ificateInitiatorClientCredential_mobile.cs | 72 -- ...ificateRecipientClientCredential_mobile.cs | 117 --- .../X509CertificateValidationMode_mobile.cs | 45 - .../X509CertificateValidator_mobile.cs | 43 - ...ServiceCertificateAuthentication_mobile.cs | 95 -- .../AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 2 +- .../System.Text.Encoding/AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 2 +- .../System.Threading.Tasks/AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 2 +- .../Facades/System.Threading/AssemblyInfo.cs | 2 +- .../System.Xml.ReaderWriter/AssemblyInfo.cs | 2 +- .../System.Xml.XDocument/AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 2 +- .../Facades/System.Xml.XPath/AssemblyInfo.cs | 2 +- .../System.Xml.XmlDocument/AssemblyInfo.cs | 2 +- .../System.Xml.XmlSerializer/AssemblyInfo.cs | 2 +- mcs/class/Facades/subdirs.make | 11 +- mcs/class/Makefile | 1 + .../Microsoft.Build.BuildEngine/Project.cs | 6 + .../MemoryMappedFile.cs | 37 + .../System.IO.Pipes/NamedPipeClientStream.cs | 26 + .../System.IO.Pipes/NamedPipeServerStream.cs | 13 + .../System.Core/System.IO.Pipes/PipeStream.cs | 2 +- .../System.Security.Cryptography}/ECCurve.cs | 6 +- .../ECParameters.cs | 6 +- .../System.Security.Cryptography}/ECPoint.cs | 6 +- .../IncrementalHash.cs | 6 +- .../common_System.Core.dll.sources | 5 + .../SqlDataRecord.cs | 287 +++++- .../Microsoft.SqlServer.Server/SqlMetaData.cs | 76 ++ .../System.Data.SqlClient/SqlBulkCopy.cs | 26 + .../System.Data.SqlClient/SqlCommand.cs | 38 + .../System.Data.SqlClient/SqlConnection.cs | 18 + .../System.Data.SqlClient/SqlException.cs | 5 + .../System.Data.SqlClient/SqlParameter.cs | 3 + .../Assembly/AssemblyInfo.cs | 2 + mcs/class/System.IdentityModel/Makefile | 11 +- .../X509CertificateValidator.cs | 2 - .../mobile_System.IdentityModel.dll.sources | 6 + ...le_static_System.IdentityModel.dll.sources | 1 + ...monodroid_System.IdentityModel.dll.sources | 1 + ...monotouch_System.IdentityModel.dll.sources | 1 + ...otouch_tv_System.IdentityModel.dll.sources | 1 + ...uch_watch_System.IdentityModel.dll.sources | 1 + ... net_4_x_System.IdentityModel.dll.sources} | 0 .../xammac_System.IdentityModel.dll.sources | 1 + ...c_net_4_5_System.IdentityModel.dll.sources | 1 + .../System.Net.Http/HttpClientHandler.cs | 73 ++ mcs/class/System.ServiceModel/Dummy_2_1.cs | 88 +- mcs/class/System.ServiceModel/Dummy_XM_4_5.cs | 88 +- mcs/class/System.ServiceModel/Makefile | 4 +- .../SecurityBindingElement.cs | 104 +- .../SslStreamSecurityBindingElement.cs | 7 + .../ClientCredentials.cs | 32 +- ...509CertificateInitiatorClientCredential.cs | 10 +- ...509CertificateRecipientClientCredential.cs | 19 + .../X509ServiceCertificateAuthentication.cs | 2 +- .../EndpointAddressBuilder.cs | 2 +- .../MessageSecurityOverTcp.cs | 2 +- .../TcpTransportSecurity.cs | 8 + .../mobile_System.ServiceModel.dll.sources | 6 + ...ac_net_4_5_System.ServiceModel.dll.sources | 1 + .../Mono.Net.Security/AsyncProtocolRequest.cs | 264 +++++ .../MobileAuthenticatedStream.cs | 925 ++++++++++++++++++ .../Mono.Net.Security/MobileTlsContext.cs | 204 ++++ ...lsProvider.cs => MonoLegacyTlsProvider.cs} | 4 +- ...Ext.cs => MonoTlsProviderFactory.Apple.cs} | 11 +- .../MonoTlsProviderFactory.Droid.cs | 36 + .../MonoTlsProviderFactory.cs | 37 +- .../System/Mono.Net.Security/MonoTlsStream.cs | 2 +- .../MonoTlsProviderFactoryExt.cs | 9 - .../ProcessModuleCollection.cs | 5 + .../ProcessThreadCollection.cs | 5 + .../System.IO/FileSystemWatcher_mobile.cs | 10 +- .../System/System.Net.Security/SslStream.cs | 6 + .../Socket.cs.REMOVED.git-id | 2 +- .../SocketAsyncEventArgs.cs | 4 +- .../System/System.Net.Sockets/TcpClient.cs | 4 +- .../System/System.Net.Sockets/UdpClient.cs | 6 +- mcs/class/System/System.Net/ServicePoint.cs | 30 +- .../ServiceNameCollection.cs | 5 + .../X509Certificate2Impl.cs | 4 + .../X509Certificate2ImplMono.cs | 33 +- .../X509CertificateImplCollection.cs | 97 ++ .../X509Chain.cs | 5 + .../X509ChainStatusFlags.cs | 5 +- .../X509Store.cs | 7 +- mcs/class/System/System.dll.sources | 6 +- mcs/class/System/Test/System/UriTest.cs | 7 + mcs/class/System/mobile_System.dll.sources | 6 +- mcs/class/System/monodroid_System.dll.sources | 2 +- mcs/class/System/monotouch_System.dll.sources | 4 +- mcs/class/System/xammac_System.dll.sources | 4 +- .../corlib/Microsoft.Win32/RegistryKey.cs | 127 ++- .../EventAttribute.cs | 3 + .../System.Diagnostics.Tracing/EventSource.cs | 80 ++ .../corlib/System.Diagnostics/StackTrace.cs | 94 +- .../System.Runtime.InteropServices/Marshal.cs | 12 + .../AuthorizationRuleCollection.cs | 9 + .../CommonSecurityDescriptor.cs | 14 +- .../DiscretionaryAcl.cs | 28 +- .../ObjectSecurity.cs | 6 +- .../SystemAcl.cs | 28 +- .../WindowsIdentity.cs | 12 + mcs/class/corlib/System/Console.cs | 177 ++++ .../CustomAttributeBuilderTest.cs | 63 ++ .../Ast/LambdaExpression.cs | 14 + .../monolite/System.Core.dll.REMOVED.git-id | 2 +- .../lib/monolite/System.dll.REMOVED.git-id | 2 +- .../lib/monolite/basic.exe.REMOVED.git-id | 2 +- .../lib/monolite/mscorlib.dll.REMOVED.git-id | 2 +- .../Scripting/Ast/LambdaExpression.cs | 14 + .../System/Linq/Enumerable.cs.REMOVED.git-id | 2 +- .../Security/Cryptography/CngAlgorithm.cs | 14 + .../System/Security/Cryptography/CngKey.cs | 199 ++++ .../Security/Cryptography/CngKeyBlobFormat.cs | 14 + .../System/Security/Cryptography/ECDsa.cs | 32 + .../System/Security/Cryptography/ECDsaCng.cs | 28 + .../System/Security/Cryptography/RsaCng.cs | 28 + .../System/net/System/_UncName.cs | 7 - .../system/text/regularexpressions/Regex.cs | 57 +- .../mscorlib/system/AppContext/AppContext.cs | 15 + mcs/mcs/assembly.cs | 36 +- mcs/mcs/async.cs | 10 +- mcs/mcs/class.cs.REMOVED.git-id | 2 +- mcs/mcs/doc.cs | 2 +- mcs/mcs/ecore.cs.REMOVED.git-id | 2 +- mcs/mcs/expression.cs.REMOVED.git-id | 2 +- mcs/mcs/generic.cs | 2 +- mcs/mcs/ikvm.cs | 23 +- mcs/mcs/import.cs | 4 +- mcs/mcs/membercache.cs | 6 +- mcs/mcs/namespace.cs | 40 +- mcs/mcs/statement.cs.REMOVED.git-id | 2 +- mcs/tests/Makefile | 4 + mcs/tests/dlls/test-939-1/test-939-lib.cs | 9 + mcs/tests/dlls/test-939-1/test-939-ref.cs | 10 + mcs/tests/dlls/test-939-2/test-939-lib.cs | 5 + mcs/tests/dlls/test-939-common.cs | 9 + mcs/tests/test-939.cs | 14 + mcs/tests/test-async-87.cs | 55 ++ mcs/tests/test-static-using-12.cs | 24 + mcs/tests/ver-il-net_4_x.xml.REMOVED.git-id | 2 +- mcs/tools/mkbundle/mkbundle.cs | 58 +- mcs/tools/mono-symbolicate/StackFrameData.cs | 39 +- .../mono-symbolicate/StackTraceMetadata.cs | 36 - mcs/tools/mono-symbolicate/SymbolManager.cs | 10 +- .../mono-symbolicate.exe.sources | 1 - mcs/tools/mono-symbolicate/symbolicate.cs | 95 +- mono/metadata/reflection.c.REMOVED.git-id | 2 +- mono/mini/Makefile.am | 2 +- mono/mini/Makefile.am.in | 2 +- mono/mini/Makefile.in.REMOVED.git-id | 2 +- mono/mini/version.h | 2 +- mono/tests/pinvoke3.cs | 43 + mono/utils/mono-threads-state-machine.c | 2 +- mono/utils/mono-threads.c | 20 +- po/mcs/de.gmo | Bin 5406 -> 5406 bytes po/mcs/de.po.REMOVED.git-id | 2 +- po/mcs/es.gmo | Bin 16329 -> 16329 bytes po/mcs/es.po.REMOVED.git-id | 2 +- po/mcs/ja.gmo | Bin 20863 -> 20863 bytes po/mcs/ja.po.REMOVED.git-id | 2 +- po/mcs/mcs.pot | 108 +- po/mcs/pt_BR.gmo | Bin 73161 -> 73161 bytes po/mcs/pt_BR.po.REMOVED.git-id | 2 +- 239 files changed, 4096 insertions(+), 1544 deletions(-) delete mode 100644 mcs/class/Facades/System.Diagnostics.PerformanceCounter/AssemblyInfo.cs delete mode 100644 mcs/class/Facades/System.Diagnostics.PerformanceCounter/Makefile delete mode 100644 mcs/class/Facades/System.Diagnostics.PerformanceCounter/System.Diagnostics.PerformanceCounter.dll.sources delete mode 100644 mcs/class/Facades/System.Diagnostics.PerformanceCounter/TypeForwarders.cs delete mode 100644 mcs/class/Facades/System.Net.Http.WebRequestHandler/AssemblyInfo.cs delete mode 100644 mcs/class/Facades/System.Net.Http.WebRequestHandler/Makefile delete mode 100644 mcs/class/Facades/System.Net.Http.WebRequestHandler/System.Net.Http.WebRequestHandler.dll.sources delete mode 100644 mcs/class/Facades/System.Net.Http.WebRequestHandler/TypeForwarders.cs delete mode 100644 mcs/class/Facades/System.Security.Cryptography.Algorithms/AssemblyInfo.cs delete mode 100644 mcs/class/Facades/System.Security.Cryptography.Algorithms/Makefile delete mode 100644 mcs/class/Facades/System.Security.Cryptography.Algorithms/System.Security.Cryptography.Algorithms.dll.sources delete mode 100644 mcs/class/Facades/System.Security.Cryptography.Algorithms/TypeForwarders.cs delete mode 100644 mcs/class/Facades/System.Security.Cryptography.OpenSsl/AssemblyInfo.cs delete mode 100644 mcs/class/Facades/System.Security.Cryptography.OpenSsl/ECDsaOpenSsl.cs delete mode 100644 mcs/class/Facades/System.Security.Cryptography.OpenSsl/Makefile delete mode 100644 mcs/class/Facades/System.Security.Cryptography.OpenSsl/RSAOpenSsl.cs delete mode 100644 mcs/class/Facades/System.Security.Cryptography.OpenSsl/SafeEvpPKeyHandle.cs delete mode 100644 mcs/class/Facades/System.Security.Cryptography.OpenSsl/System.Security.Cryptography.OpenSsl.dll.sources delete mode 100644 mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateInitiatorClientCredential_mobile.cs delete mode 100644 mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateRecipientClientCredential_mobile.cs delete mode 100644 mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateValidationMode_mobile.cs delete mode 100644 mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateValidator_mobile.cs delete mode 100644 mcs/class/Facades/System.ServiceModel.Primitives/X509ServiceCertificateAuthentication_mobile.cs rename mcs/class/{Facades/System.Security.Cryptography.Algorithms => System.Core/System.Security.Cryptography}/ECCurve.cs (99%) rename mcs/class/{Facades/System.Security.Cryptography.Algorithms => System.Core/System.Security.Cryptography}/ECParameters.cs (98%) rename mcs/class/{Facades/System.Security.Cryptography.Algorithms => System.Core/System.Security.Cryptography}/ECPoint.cs (98%) rename mcs/class/{Facades/System.Security.Cryptography.Algorithms => System.Core/System.Security.Cryptography}/IncrementalHash.cs (98%) create mode 100644 mcs/class/System.IdentityModel/mobile_System.IdentityModel.dll.sources create mode 100644 mcs/class/System.IdentityModel/mobile_static_System.IdentityModel.dll.sources create mode 100644 mcs/class/System.IdentityModel/monodroid_System.IdentityModel.dll.sources create mode 100644 mcs/class/System.IdentityModel/monotouch_System.IdentityModel.dll.sources create mode 100644 mcs/class/System.IdentityModel/monotouch_tv_System.IdentityModel.dll.sources create mode 100644 mcs/class/System.IdentityModel/monotouch_watch_System.IdentityModel.dll.sources rename mcs/class/System.IdentityModel/{System.IdentityModel.dll.sources => net_4_x_System.IdentityModel.dll.sources} (100%) create mode 100644 mcs/class/System.IdentityModel/xammac_System.IdentityModel.dll.sources create mode 100644 mcs/class/System.IdentityModel/xammac_net_4_5_System.IdentityModel.dll.sources create mode 100644 mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs create mode 100644 mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs create mode 100644 mcs/class/System/Mono.Net.Security/MobileTlsContext.cs rename mcs/class/System/Mono.Net.Security/{MonoDefaultTlsProvider.cs => MonoLegacyTlsProvider.cs} (97%) rename mcs/class/System/Mono.Net.Security/{MonoTlsProviderFactoryExt.cs => MonoTlsProviderFactory.Apple.cs} (67%) create mode 100644 mcs/class/System/Mono.Net.Security/MonoTlsProviderFactory.Droid.cs delete mode 100644 mcs/class/System/Mono.Security.Interface/MonoTlsProviderFactoryExt.cs create mode 100644 mcs/class/System/System.Security.Cryptography.X509Certificates/X509CertificateImplCollection.cs create mode 100644 mcs/tests/dlls/test-939-1/test-939-lib.cs create mode 100644 mcs/tests/dlls/test-939-1/test-939-ref.cs create mode 100644 mcs/tests/dlls/test-939-2/test-939-lib.cs create mode 100644 mcs/tests/dlls/test-939-common.cs create mode 100644 mcs/tests/test-939.cs create mode 100644 mcs/tests/test-async-87.cs create mode 100644 mcs/tests/test-static-using-12.cs delete mode 100644 mcs/tools/mono-symbolicate/StackTraceMetadata.cs diff --git a/mcs/class/Facades/Microsoft.Win32.Primitives/AssemblyInfo.cs b/mcs/class/Facades/Microsoft.Win32.Primitives/AssemblyInfo.cs index d532b594d0..1a8f5f3639 100644 --- a/mcs/class/Facades/Microsoft.Win32.Primitives/AssemblyInfo.cs +++ b/mcs/class/Facades/Microsoft.Win32.Primitives/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.AppContext/AssemblyInfo.cs b/mcs/class/Facades/System.AppContext/AssemblyInfo.cs index d7f216e529..cb5e8dddf4 100644 --- a/mcs/class/Facades/System.AppContext/AssemblyInfo.cs +++ b/mcs/class/Facades/System.AppContext/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Collections.Concurrent/AssemblyInfo.cs b/mcs/class/Facades/System.Collections.Concurrent/AssemblyInfo.cs index b14058779a..62428f4889 100644 --- a/mcs/class/Facades/System.Collections.Concurrent/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Collections.Concurrent/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Collections/AssemblyInfo.cs b/mcs/class/Facades/System.Collections/AssemblyInfo.cs index e3f037ff8e..bf3b05e922 100644 --- a/mcs/class/Facades/System.Collections/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Collections/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.ComponentModel.Annotations/AssemblyInfo.cs b/mcs/class/Facades/System.ComponentModel.Annotations/AssemblyInfo.cs index 3ea660a30b..ef0c419a2d 100644 --- a/mcs/class/Facades/System.ComponentModel.Annotations/AssemblyInfo.cs +++ b/mcs/class/Facades/System.ComponentModel.Annotations/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.ComponentModel.EventBasedAsync/AssemblyInfo.cs b/mcs/class/Facades/System.ComponentModel.EventBasedAsync/AssemblyInfo.cs index 02d9d9307f..e35600650b 100644 --- a/mcs/class/Facades/System.ComponentModel.EventBasedAsync/AssemblyInfo.cs +++ b/mcs/class/Facades/System.ComponentModel.EventBasedAsync/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.ComponentModel.Primitives/AssemblyInfo.cs b/mcs/class/Facades/System.ComponentModel.Primitives/AssemblyInfo.cs index 4b1c3bcd47..7a73d9b9a9 100644 --- a/mcs/class/Facades/System.ComponentModel.Primitives/AssemblyInfo.cs +++ b/mcs/class/Facades/System.ComponentModel.Primitives/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.ComponentModel.TypeConverter/AssemblyInfo.cs b/mcs/class/Facades/System.ComponentModel.TypeConverter/AssemblyInfo.cs index 63868e4ced..40ca189053 100644 --- a/mcs/class/Facades/System.ComponentModel.TypeConverter/AssemblyInfo.cs +++ b/mcs/class/Facades/System.ComponentModel.TypeConverter/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Data.Common/AssemblyInfo.cs b/mcs/class/Facades/System.Data.Common/AssemblyInfo.cs index 1a9838800a..3379971637 100644 --- a/mcs/class/Facades/System.Data.Common/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Data.Common/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Data.SqlClient/AssemblyInfo.cs b/mcs/class/Facades/System.Data.SqlClient/AssemblyInfo.cs index ca9dc4b0ac..95aeb6c229 100644 --- a/mcs/class/Facades/System.Data.SqlClient/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Data.SqlClient/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Diagnostics.Debug/AssemblyInfo.cs b/mcs/class/Facades/System.Diagnostics.Debug/AssemblyInfo.cs index a7cbf21727..b13006f5a5 100644 --- a/mcs/class/Facades/System.Diagnostics.Debug/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Diagnostics.Debug/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Diagnostics.PerformanceCounter/AssemblyInfo.cs b/mcs/class/Facades/System.Diagnostics.PerformanceCounter/AssemblyInfo.cs deleted file mode 100644 index b995757b1b..0000000000 --- a/mcs/class/Facades/System.Diagnostics.PerformanceCounter/AssemblyInfo.cs +++ /dev/null @@ -1,41 +0,0 @@ -// -// 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] - - diff --git a/mcs/class/Facades/System.Diagnostics.PerformanceCounter/Makefile b/mcs/class/Facades/System.Diagnostics.PerformanceCounter/Makefile deleted file mode 100644 index beda860688..0000000000 --- a/mcs/class/Facades/System.Diagnostics.PerformanceCounter/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -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 - - diff --git a/mcs/class/Facades/System.Diagnostics.PerformanceCounter/System.Diagnostics.PerformanceCounter.dll.sources b/mcs/class/Facades/System.Diagnostics.PerformanceCounter/System.Diagnostics.PerformanceCounter.dll.sources deleted file mode 100644 index 8e33d4ddea..0000000000 --- a/mcs/class/Facades/System.Diagnostics.PerformanceCounter/System.Diagnostics.PerformanceCounter.dll.sources +++ /dev/null @@ -1,3 +0,0 @@ -TypeForwarders.cs -AssemblyInfo.cs - diff --git a/mcs/class/Facades/System.Diagnostics.PerformanceCounter/TypeForwarders.cs b/mcs/class/Facades/System.Diagnostics.PerformanceCounter/TypeForwarders.cs deleted file mode 100644 index 12bef0d994..0000000000 --- a/mcs/class/Facades/System.Diagnostics.PerformanceCounter/TypeForwarders.cs +++ /dev/null @@ -1,28 +0,0 @@ -// -// 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))] - - diff --git a/mcs/class/Facades/System.Diagnostics.Process/AssemblyInfo.cs b/mcs/class/Facades/System.Diagnostics.Process/AssemblyInfo.cs index d5aafde47a..df4fbcedeb 100644 --- a/mcs/class/Facades/System.Diagnostics.Process/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Diagnostics.Process/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Diagnostics.StackTrace/AssemblyInfo.cs b/mcs/class/Facades/System.Diagnostics.StackTrace/AssemblyInfo.cs index ae2f9e0243..6e220091dd 100644 --- a/mcs/class/Facades/System.Diagnostics.StackTrace/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Diagnostics.StackTrace/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Diagnostics.StackTrace/StackFrameExtensions.cs b/mcs/class/Facades/System.Diagnostics.StackTrace/StackFrameExtensions.cs index 1fb375f6fa..7f6a474ab6 100644 --- a/mcs/class/Facades/System.Diagnostics.StackTrace/StackFrameExtensions.cs +++ b/mcs/class/Facades/System.Diagnostics.StackTrace/StackFrameExtensions.cs @@ -34,6 +34,18 @@ namespace System.Diagnostics { 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) { diff --git a/mcs/class/Facades/System.Diagnostics.Tracing/AssemblyInfo.cs b/mcs/class/Facades/System.Diagnostics.Tracing/AssemblyInfo.cs index f13ffdd5bb..8a44f5c464 100644 --- a/mcs/class/Facades/System.Diagnostics.Tracing/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Diagnostics.Tracing/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Drawing.Primitives/AssemblyInfo.cs b/mcs/class/Facades/System.Drawing.Primitives/AssemblyInfo.cs index fd9a20bfef..626ecde842 100644 --- a/mcs/class/Facades/System.Drawing.Primitives/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Drawing.Primitives/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Dynamic.Runtime/AssemblyInfo.cs b/mcs/class/Facades/System.Dynamic.Runtime/AssemblyInfo.cs index e64d545b78..316522d2a6 100644 --- a/mcs/class/Facades/System.Dynamic.Runtime/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Dynamic.Runtime/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Globalization.Calendars/AssemblyInfo.cs b/mcs/class/Facades/System.Globalization.Calendars/AssemblyInfo.cs index 153def5e43..161b841ea1 100644 --- a/mcs/class/Facades/System.Globalization.Calendars/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Globalization.Calendars/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Globalization.Extensions/AssemblyInfo.cs b/mcs/class/Facades/System.Globalization.Extensions/AssemblyInfo.cs index 56f7889596..6c41c6e4f3 100644 --- a/mcs/class/Facades/System.Globalization.Extensions/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Globalization.Extensions/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Globalization/AssemblyInfo.cs b/mcs/class/Facades/System.Globalization/AssemblyInfo.cs index 9db0473f4f..84c06894f1 100644 --- a/mcs/class/Facades/System.Globalization/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Globalization/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.IO.Compression.ZipFile/AssemblyInfo.cs b/mcs/class/Facades/System.IO.Compression.ZipFile/AssemblyInfo.cs index 76004988b8..8631ba251a 100644 --- a/mcs/class/Facades/System.IO.Compression.ZipFile/AssemblyInfo.cs +++ b/mcs/class/Facades/System.IO.Compression.ZipFile/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.IO.FileSystem.Primitives/AssemblyInfo.cs b/mcs/class/Facades/System.IO.FileSystem.Primitives/AssemblyInfo.cs index ce31ea4d28..9239b2432e 100644 --- a/mcs/class/Facades/System.IO.FileSystem.Primitives/AssemblyInfo.cs +++ b/mcs/class/Facades/System.IO.FileSystem.Primitives/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.IO.FileSystem/AssemblyInfo.cs b/mcs/class/Facades/System.IO.FileSystem/AssemblyInfo.cs index 6c8e983254..2ad36d313a 100644 --- a/mcs/class/Facades/System.IO.FileSystem/AssemblyInfo.cs +++ b/mcs/class/Facades/System.IO.FileSystem/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.IO.IsolatedStorage/AssemblyInfo.cs b/mcs/class/Facades/System.IO.IsolatedStorage/AssemblyInfo.cs index fd84746986..2ccf0e841b 100644 --- a/mcs/class/Facades/System.IO.IsolatedStorage/AssemblyInfo.cs +++ b/mcs/class/Facades/System.IO.IsolatedStorage/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.IO.UnmanagedMemoryStream/AssemblyInfo.cs b/mcs/class/Facades/System.IO.UnmanagedMemoryStream/AssemblyInfo.cs index 9f7e2b9d1d..3ddd97f50a 100644 --- a/mcs/class/Facades/System.IO.UnmanagedMemoryStream/AssemblyInfo.cs +++ b/mcs/class/Facades/System.IO.UnmanagedMemoryStream/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.IO/AssemblyInfo.cs b/mcs/class/Facades/System.IO/AssemblyInfo.cs index 6b5b23d878..4bfc1f5465 100644 --- a/mcs/class/Facades/System.IO/AssemblyInfo.cs +++ b/mcs/class/Facades/System.IO/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Linq.Expressions/AssemblyInfo.cs b/mcs/class/Facades/System.Linq.Expressions/AssemblyInfo.cs index de01cb447b..5169c56678 100644 --- a/mcs/class/Facades/System.Linq.Expressions/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Linq.Expressions/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Linq/AssemblyInfo.cs b/mcs/class/Facades/System.Linq/AssemblyInfo.cs index e654d85a44..0f16e3c07f 100644 --- a/mcs/class/Facades/System.Linq/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Linq/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Net.Http.WebRequestHandler/AssemblyInfo.cs b/mcs/class/Facades/System.Net.Http.WebRequestHandler/AssemblyInfo.cs deleted file mode 100644 index dc2e630521..0000000000 --- a/mcs/class/Facades/System.Net.Http.WebRequestHandler/AssemblyInfo.cs +++ /dev/null @@ -1,41 +0,0 @@ -// -// 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] - - diff --git a/mcs/class/Facades/System.Net.Http.WebRequestHandler/Makefile b/mcs/class/Facades/System.Net.Http.WebRequestHandler/Makefile deleted file mode 100644 index 7750bbae45..0000000000 --- a/mcs/class/Facades/System.Net.Http.WebRequestHandler/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -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 - - diff --git a/mcs/class/Facades/System.Net.Http.WebRequestHandler/System.Net.Http.WebRequestHandler.dll.sources b/mcs/class/Facades/System.Net.Http.WebRequestHandler/System.Net.Http.WebRequestHandler.dll.sources deleted file mode 100644 index 8e33d4ddea..0000000000 --- a/mcs/class/Facades/System.Net.Http.WebRequestHandler/System.Net.Http.WebRequestHandler.dll.sources +++ /dev/null @@ -1,3 +0,0 @@ -TypeForwarders.cs -AssemblyInfo.cs - diff --git a/mcs/class/Facades/System.Net.Http.WebRequestHandler/TypeForwarders.cs b/mcs/class/Facades/System.Net.Http.WebRequestHandler/TypeForwarders.cs deleted file mode 100644 index fb583abf50..0000000000 --- a/mcs/class/Facades/System.Net.Http.WebRequestHandler/TypeForwarders.cs +++ /dev/null @@ -1,25 +0,0 @@ -// -// 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))] - - diff --git a/mcs/class/Facades/System.Net.NetworkInformation/AssemblyInfo.cs b/mcs/class/Facades/System.Net.NetworkInformation/AssemblyInfo.cs index 4f5c9c1b6d..8bb82be686 100644 --- a/mcs/class/Facades/System.Net.NetworkInformation/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Net.NetworkInformation/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Net.Primitives/AssemblyInfo.cs b/mcs/class/Facades/System.Net.Primitives/AssemblyInfo.cs index 43418d0fb7..8479946f21 100644 --- a/mcs/class/Facades/System.Net.Primitives/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Net.Primitives/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Net.Requests/AssemblyInfo.cs b/mcs/class/Facades/System.Net.Requests/AssemblyInfo.cs index 771473695c..3216284498 100644 --- a/mcs/class/Facades/System.Net.Requests/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Net.Requests/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Net.Sockets/AssemblyInfo.cs b/mcs/class/Facades/System.Net.Sockets/AssemblyInfo.cs index 33d399e8f5..1ea7a8cca4 100644 --- a/mcs/class/Facades/System.Net.Sockets/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Net.Sockets/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.ObjectModel/AssemblyInfo.cs b/mcs/class/Facades/System.ObjectModel/AssemblyInfo.cs index 1eac48ac27..189175bb52 100644 --- a/mcs/class/Facades/System.ObjectModel/AssemblyInfo.cs +++ b/mcs/class/Facades/System.ObjectModel/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Reflection.TypeExtensions/AssemblyInfo.cs b/mcs/class/Facades/System.Reflection.TypeExtensions/AssemblyInfo.cs index f431e75d5d..120da41f2a 100644 --- a/mcs/class/Facades/System.Reflection.TypeExtensions/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Reflection.TypeExtensions/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Reflection/AssemblyInfo.cs b/mcs/class/Facades/System.Reflection/AssemblyInfo.cs index 36520e0b75..00f07f8d34 100644 --- a/mcs/class/Facades/System.Reflection/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Reflection/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Runtime.Extensions/AssemblyInfo.cs b/mcs/class/Facades/System.Runtime.Extensions/AssemblyInfo.cs index f3163e0d80..37f003529a 100644 --- a/mcs/class/Facades/System.Runtime.Extensions/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Runtime.Extensions/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Runtime.InteropServices/AssemblyInfo.cs b/mcs/class/Facades/System.Runtime.InteropServices/AssemblyInfo.cs index 25b7d0a053..9c17934bb4 100644 --- a/mcs/class/Facades/System.Runtime.InteropServices/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Runtime.InteropServices/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Runtime.Serialization.Primitives/AssemblyInfo.cs b/mcs/class/Facades/System.Runtime.Serialization.Primitives/AssemblyInfo.cs index c76790eaf0..09c00ba397 100644 --- a/mcs/class/Facades/System.Runtime.Serialization.Primitives/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Runtime.Serialization.Primitives/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Runtime.Serialization.Xml/AssemblyInfo.cs b/mcs/class/Facades/System.Runtime.Serialization.Xml/AssemblyInfo.cs index f88da3f3a5..e64a8fe344 100644 --- a/mcs/class/Facades/System.Runtime.Serialization.Xml/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Runtime.Serialization.Xml/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Runtime/AssemblyInfo.cs b/mcs/class/Facades/System.Runtime/AssemblyInfo.cs index 359e2334b7..1a9717ec41 100644 --- a/mcs/class/Facades/System.Runtime/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Runtime/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Security.Claims/AssemblyInfo.cs b/mcs/class/Facades/System.Security.Claims/AssemblyInfo.cs index ec3ca1a2f9..d697b73984 100644 --- a/mcs/class/Facades/System.Security.Claims/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Security.Claims/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Security.Cryptography.Algorithms/AssemblyInfo.cs b/mcs/class/Facades/System.Security.Cryptography.Algorithms/AssemblyInfo.cs deleted file mode 100644 index 76645c3810..0000000000 --- a/mcs/class/Facades/System.Security.Cryptography.Algorithms/AssemblyInfo.cs +++ /dev/null @@ -1,41 +0,0 @@ -// -// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly: AssemblyTitle ("System.Security.Cryptography.Algorithms.dll")] -[assembly: AssemblyDescription ("System.Security.Cryptography.Algorithms.dll")] -[assembly: AssemblyDefaultAlias ("System.Security.Cryptography.Algorithms.dll")] -[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: AssemblyInformationalVersion ("4.0.0.0")] -[assembly: AssemblyFileVersion ("4.0.0.0")] -[assembly: AssemblyDelaySign (true)] -[assembly: AssemblyKeyFile ("../../msfinal.pub")] - -[assembly: ReferenceAssembly] - - diff --git a/mcs/class/Facades/System.Security.Cryptography.Algorithms/Makefile b/mcs/class/Facades/System.Security.Cryptography.Algorithms/Makefile deleted file mode 100644 index 389a11cf6c..0000000000 --- a/mcs/class/Facades/System.Security.Cryptography.Algorithms/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -MCS_BUILD_DIR = ../../../build - -thisdir = class/Facades/System.Security.Cryptography.Algorithms -SUBDIRS = -include $(MCS_BUILD_DIR)/rules.make - -LIBRARY_SUBDIR = Facades -LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades - -LIBRARY = System.Security.Cryptography.Algorithms.dll - -KEY_FILE = ../../msfinal.pub -SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699 -LIB_REFS = System System.Core -LIB_MCS_FLAGS = $(SIGN_FLAGS) - -PLATFORM_DEBUG_FLAGS = - -NO_TEST = yes - -include $(MCS_BUILD_DIR)/library.make - - diff --git a/mcs/class/Facades/System.Security.Cryptography.Algorithms/System.Security.Cryptography.Algorithms.dll.sources b/mcs/class/Facades/System.Security.Cryptography.Algorithms/System.Security.Cryptography.Algorithms.dll.sources deleted file mode 100644 index dcb3ff9de8..0000000000 --- a/mcs/class/Facades/System.Security.Cryptography.Algorithms/System.Security.Cryptography.Algorithms.dll.sources +++ /dev/null @@ -1,6 +0,0 @@ -TypeForwarders.cs -AssemblyInfo.cs -ECCurve.cs -ECPoint.cs -ECParameters.cs -IncrementalHash.cs diff --git a/mcs/class/Facades/System.Security.Cryptography.Algorithms/TypeForwarders.cs b/mcs/class/Facades/System.Security.Cryptography.Algorithms/TypeForwarders.cs deleted file mode 100644 index 5a59369bd4..0000000000 --- a/mcs/class/Facades/System.Security.Cryptography.Algorithms/TypeForwarders.cs +++ /dev/null @@ -1,46 +0,0 @@ -// -// 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. -// - -[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Aes))] -[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.DeriveBytes))] -[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ECDsa))] -[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.HMACMD5))] -[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.HMACSHA1))] -[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.HMACSHA256))] -[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.HMACSHA384))] -[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.HMACSHA512))] -[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.MD5))] -[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RandomNumberGenerator))] -[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Rfc2898DeriveBytes))] -[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSA))] -[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSAEncryptionPadding))] -[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSAEncryptionPaddingMode))] -[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSAParameters))] -[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSASignaturePadding))] -[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSASignaturePaddingMode))] -[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.SHA1))] -[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.SHA256))] -[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.SHA384))] -[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.SHA512))] -[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.TripleDES))] - - diff --git a/mcs/class/Facades/System.Security.Cryptography.Cng/AssemblyInfo.cs b/mcs/class/Facades/System.Security.Cryptography.Cng/AssemblyInfo.cs index b902325fde..db3aaf3b25 100644 --- a/mcs/class/Facades/System.Security.Cryptography.Cng/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Security.Cryptography.Cng/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Security.Cryptography.OpenSsl/AssemblyInfo.cs b/mcs/class/Facades/System.Security.Cryptography.OpenSsl/AssemblyInfo.cs deleted file mode 100644 index 3560bf2357..0000000000 --- a/mcs/class/Facades/System.Security.Cryptography.OpenSsl/AssemblyInfo.cs +++ /dev/null @@ -1,41 +0,0 @@ -// -// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly: AssemblyTitle ("System.Security.Cryptography.OpenSsl.dll")] -[assembly: AssemblyDescription ("System.Security.Cryptography.OpenSsl.dll")] -[assembly: AssemblyDefaultAlias ("System.Security.Cryptography.OpenSsl.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] - - diff --git a/mcs/class/Facades/System.Security.Cryptography.OpenSsl/ECDsaOpenSsl.cs b/mcs/class/Facades/System.Security.Cryptography.OpenSsl/ECDsaOpenSsl.cs deleted file mode 100644 index 1a2771a4f3..0000000000 --- a/mcs/class/Facades/System.Security.Cryptography.OpenSsl/ECDsaOpenSsl.cs +++ /dev/null @@ -1,45 +0,0 @@ -// -// ECDsaOpenSsl.cs -// -// Authors: -// Marek Safar -// -// 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 ECDsaOpenSsl : ECDsa - { - public override byte[] SignHash (byte[] hash) - { - throw new NotImplementedException (); - } - - public override bool VerifyHash (byte[] hash, byte[] signature) - { - throw new NotImplementedException (); - } - - // TODO: Implement full contract API - } -} \ No newline at end of file diff --git a/mcs/class/Facades/System.Security.Cryptography.OpenSsl/Makefile b/mcs/class/Facades/System.Security.Cryptography.OpenSsl/Makefile deleted file mode 100644 index aa30bc935a..0000000000 --- a/mcs/class/Facades/System.Security.Cryptography.OpenSsl/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -MCS_BUILD_DIR = ../../../build - -thisdir = class/Facades/System.Security.Cryptography.OpenSsl -SUBDIRS = -include $(MCS_BUILD_DIR)/rules.make - -LIBRARY_SUBDIR = Facades -LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades - -LIBRARY = System.Security.Cryptography.OpenSsl.dll - -KEY_FILE = ../../msfinal.pub -SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699 -LIB_REFS = System.Core -LIB_MCS_FLAGS = $(SIGN_FLAGS) - -PLATFORM_DEBUG_FLAGS = - -NO_TEST = yes - -include $(MCS_BUILD_DIR)/library.make - - diff --git a/mcs/class/Facades/System.Security.Cryptography.OpenSsl/RSAOpenSsl.cs b/mcs/class/Facades/System.Security.Cryptography.OpenSsl/RSAOpenSsl.cs deleted file mode 100644 index 4bdcd80917..0000000000 --- a/mcs/class/Facades/System.Security.Cryptography.OpenSsl/RSAOpenSsl.cs +++ /dev/null @@ -1,55 +0,0 @@ -// -// RSAOpenSsl.cs -// -// Authors: -// Marek Safar -// -// 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 RSAOpenSsl : RSA - { - public override RSAParameters ExportParameters (bool includePrivateParameters) - { - throw new NotImplementedException (); - } - - public override void ImportParameters (RSAParameters parameters) - { - throw new NotImplementedException (); - } - - public override byte[] SignHash (byte[] hash, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding) - { - throw new NotImplementedException (); - } - - public override bool VerifyHash (byte[] hash, byte[] signature, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding) - { - throw new NotImplementedException (); - } - - // TODO: Implement full contract API - } -} \ No newline at end of file diff --git a/mcs/class/Facades/System.Security.Cryptography.OpenSsl/SafeEvpPKeyHandle.cs b/mcs/class/Facades/System.Security.Cryptography.OpenSsl/SafeEvpPKeyHandle.cs deleted file mode 100644 index 85fd74539b..0000000000 --- a/mcs/class/Facades/System.Security.Cryptography.OpenSsl/SafeEvpPKeyHandle.cs +++ /dev/null @@ -1,50 +0,0 @@ -// -// SafeEvpPKeyHandle.cs -// -// Authors: -// Marek Safar -// -// 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 SafeEvpPKeyHandle : System.Runtime.InteropServices.SafeHandle - { - public SafeEvpPKeyHandle (IntPtr handle, bool ownsHandle) - : base (handle, ownsHandle) - { - } - - public override bool IsInvalid { get { throw new NotImplementedException (); } } - - public SafeEvpPKeyHandle DuplicateHandle () - { - throw new NotImplementedException (); - } - - protected override bool ReleaseHandle () - { - return true; - } - } -} \ No newline at end of file diff --git a/mcs/class/Facades/System.Security.Cryptography.OpenSsl/System.Security.Cryptography.OpenSsl.dll.sources b/mcs/class/Facades/System.Security.Cryptography.OpenSsl/System.Security.Cryptography.OpenSsl.dll.sources deleted file mode 100644 index 9e2bb4b66f..0000000000 --- a/mcs/class/Facades/System.Security.Cryptography.OpenSsl/System.Security.Cryptography.OpenSsl.dll.sources +++ /dev/null @@ -1,4 +0,0 @@ -AssemblyInfo.cs -ECDsaOpenSsl.cs -RSAOpenSsl.cs -SafeEvpPKeyHandle.cs diff --git a/mcs/class/Facades/System.Security.Cryptography.X509Certificates/AssemblyInfo.cs b/mcs/class/Facades/System.Security.Cryptography.X509Certificates/AssemblyInfo.cs index 1f49a7b03b..011b275a61 100644 --- a/mcs/class/Facades/System.Security.Cryptography.X509Certificates/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Security.Cryptography.X509Certificates/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.ServiceModel.Duplex/AssemblyInfo.cs b/mcs/class/Facades/System.ServiceModel.Duplex/AssemblyInfo.cs index 2dc616e75c..38f58e9d15 100644 --- a/mcs/class/Facades/System.ServiceModel.Duplex/AssemblyInfo.cs +++ b/mcs/class/Facades/System.ServiceModel.Duplex/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.ServiceModel.Http/AssemblyInfo.cs b/mcs/class/Facades/System.ServiceModel.Http/AssemblyInfo.cs index 2dc616e75c..1d34f06340 100644 --- a/mcs/class/Facades/System.ServiceModel.Http/AssemblyInfo.cs +++ b/mcs/class/Facades/System.ServiceModel.Http/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.ServiceModel.NetTcp/AssemblyInfo.cs b/mcs/class/Facades/System.ServiceModel.NetTcp/AssemblyInfo.cs index 2dc616e75c..1d34f06340 100644 --- a/mcs/class/Facades/System.ServiceModel.NetTcp/AssemblyInfo.cs +++ b/mcs/class/Facades/System.ServiceModel.NetTcp/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.ServiceModel.Primitives/AssemblyInfo.cs b/mcs/class/Facades/System.ServiceModel.Primitives/AssemblyInfo.cs index 02bec1d5c4..c982bbe4f3 100644 --- a/mcs/class/Facades/System.ServiceModel.Primitives/AssemblyInfo.cs +++ b/mcs/class/Facades/System.ServiceModel.Primitives/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.ServiceModel.Primitives/Makefile b/mcs/class/Facades/System.ServiceModel.Primitives/Makefile index b89ba3525c..dde66a181c 100644 --- a/mcs/class/Facades/System.ServiceModel.Primitives/Makefile +++ b/mcs/class/Facades/System.ServiceModel.Primitives/Makefile @@ -11,11 +11,7 @@ LIBRARY = System.ServiceModel.Primitives.dll 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) diff --git a/mcs/class/Facades/System.ServiceModel.Primitives/System.ServiceModel.Primitives.dll.sources b/mcs/class/Facades/System.ServiceModel.Primitives/System.ServiceModel.Primitives.dll.sources index f43e364288..719628dc7c 100644 --- a/mcs/class/Facades/System.ServiceModel.Primitives/System.ServiceModel.Primitives.dll.sources +++ b/mcs/class/Facades/System.ServiceModel.Primitives/System.ServiceModel.Primitives.dll.sources @@ -1,9 +1,2 @@ TypeForwarders.cs AssemblyInfo.cs - -../../../build/common/MonoTODOAttribute.cs -X509ServiceCertificateAuthentication_mobile.cs -X509CertificateValidator_mobile.cs -X509CertificateValidationMode_mobile.cs -X509CertificateRecipientClientCredential_mobile.cs -X509CertificateInitiatorClientCredential_mobile.cs diff --git a/mcs/class/Facades/System.ServiceModel.Primitives/TypeForwarders.cs b/mcs/class/Facades/System.ServiceModel.Primitives/TypeForwarders.cs index b584fc0b8e..3be79604b4 100644 --- a/mcs/class/Facades/System.ServiceModel.Primitives/TypeForwarders.cs +++ b/mcs/class/Facades/System.ServiceModel.Primitives/TypeForwarders.cs @@ -20,6 +20,7 @@ // 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<>))] @@ -150,6 +151,10 @@ [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))] @@ -158,17 +163,3 @@ [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 diff --git a/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateInitiatorClientCredential_mobile.cs b/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateInitiatorClientCredential_mobile.cs deleted file mode 100644 index daf321c22e..0000000000 --- a/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateInitiatorClientCredential_mobile.cs +++ /dev/null @@ -1,72 +0,0 @@ -// -// 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 diff --git a/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateRecipientClientCredential_mobile.cs b/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateRecipientClientCredential_mobile.cs deleted file mode 100644 index 3545b724b5..0000000000 --- a/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateRecipientClientCredential_mobile.cs +++ /dev/null @@ -1,117 +0,0 @@ -// -// 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 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 diff --git a/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateValidationMode_mobile.cs b/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateValidationMode_mobile.cs deleted file mode 100644 index 34b1d241c6..0000000000 --- a/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateValidationMode_mobile.cs +++ /dev/null @@ -1,45 +0,0 @@ -// -// 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 diff --git a/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateValidator_mobile.cs b/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateValidator_mobile.cs deleted file mode 100644 index 734e99020d..0000000000 --- a/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateValidator_mobile.cs +++ /dev/null @@ -1,43 +0,0 @@ -// -// 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 diff --git a/mcs/class/Facades/System.ServiceModel.Primitives/X509ServiceCertificateAuthentication_mobile.cs b/mcs/class/Facades/System.ServiceModel.Primitives/X509ServiceCertificateAuthentication_mobile.cs deleted file mode 100644 index 725cbd9153..0000000000 --- a/mcs/class/Facades/System.ServiceModel.Primitives/X509ServiceCertificateAuthentication_mobile.cs +++ /dev/null @@ -1,95 +0,0 @@ -// -// 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 diff --git a/mcs/class/Facades/System.ServiceModel.Security/AssemblyInfo.cs b/mcs/class/Facades/System.ServiceModel.Security/AssemblyInfo.cs index f222e8b656..1195365cf2 100644 --- a/mcs/class/Facades/System.ServiceModel.Security/AssemblyInfo.cs +++ b/mcs/class/Facades/System.ServiceModel.Security/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.ServiceProcess.ServiceController/AssemblyInfo.cs b/mcs/class/Facades/System.ServiceProcess.ServiceController/AssemblyInfo.cs index 0a10348eeb..67306cb4ad 100644 --- a/mcs/class/Facades/System.ServiceProcess.ServiceController/AssemblyInfo.cs +++ b/mcs/class/Facades/System.ServiceProcess.ServiceController/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Text.Encoding.CodePages/AssemblyInfo.cs b/mcs/class/Facades/System.Text.Encoding.CodePages/AssemblyInfo.cs index 568942dca1..3a26f0dca9 100644 --- a/mcs/class/Facades/System.Text.Encoding.CodePages/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Text.Encoding.CodePages/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Text.Encoding.Extensions/AssemblyInfo.cs b/mcs/class/Facades/System.Text.Encoding.Extensions/AssemblyInfo.cs index 33c51e0187..80d5a5f15e 100644 --- a/mcs/class/Facades/System.Text.Encoding.Extensions/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Text.Encoding.Extensions/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Text.Encoding/AssemblyInfo.cs b/mcs/class/Facades/System.Text.Encoding/AssemblyInfo.cs index ff006b094f..4ff5799c82 100644 --- a/mcs/class/Facades/System.Text.Encoding/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Text.Encoding/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Text.RegularExpressions/AssemblyInfo.cs b/mcs/class/Facades/System.Text.RegularExpressions/AssemblyInfo.cs index 41f882f463..8ad5d918c2 100644 --- a/mcs/class/Facades/System.Text.RegularExpressions/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Text.RegularExpressions/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Threading.Overlapped/AssemblyInfo.cs b/mcs/class/Facades/System.Threading.Overlapped/AssemblyInfo.cs index 37bca06c01..e6621486d7 100644 --- a/mcs/class/Facades/System.Threading.Overlapped/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Threading.Overlapped/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Threading.Tasks/AssemblyInfo.cs b/mcs/class/Facades/System.Threading.Tasks/AssemblyInfo.cs index b4b38c4706..7ba876ff82 100644 --- a/mcs/class/Facades/System.Threading.Tasks/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Threading.Tasks/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Threading.ThreadPool/AssemblyInfo.cs b/mcs/class/Facades/System.Threading.ThreadPool/AssemblyInfo.cs index 44825c052e..d10a02fae3 100644 --- a/mcs/class/Facades/System.Threading.ThreadPool/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Threading.ThreadPool/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Threading/AssemblyInfo.cs b/mcs/class/Facades/System.Threading/AssemblyInfo.cs index c68b68a093..9659d44288 100644 --- a/mcs/class/Facades/System.Threading/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Threading/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Xml.ReaderWriter/AssemblyInfo.cs b/mcs/class/Facades/System.Xml.ReaderWriter/AssemblyInfo.cs index d051051155..80c8d3a2bb 100644 --- a/mcs/class/Facades/System.Xml.ReaderWriter/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Xml.ReaderWriter/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Xml.XDocument/AssemblyInfo.cs b/mcs/class/Facades/System.Xml.XDocument/AssemblyInfo.cs index bd6476be52..f3780608d8 100644 --- a/mcs/class/Facades/System.Xml.XDocument/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Xml.XDocument/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Xml.XPath.XDocument/AssemblyInfo.cs b/mcs/class/Facades/System.Xml.XPath.XDocument/AssemblyInfo.cs index 26f4eb8081..6086ef6f44 100644 --- a/mcs/class/Facades/System.Xml.XPath.XDocument/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Xml.XPath.XDocument/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Xml.XPath/AssemblyInfo.cs b/mcs/class/Facades/System.Xml.XPath/AssemblyInfo.cs index 1a93dd240e..c141099a7b 100644 --- a/mcs/class/Facades/System.Xml.XPath/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Xml.XPath/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Xml.XmlDocument/AssemblyInfo.cs b/mcs/class/Facades/System.Xml.XmlDocument/AssemblyInfo.cs index f83abebce2..b9722fd4a4 100644 --- a/mcs/class/Facades/System.Xml.XmlDocument/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Xml.XmlDocument/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/System.Xml.XmlSerializer/AssemblyInfo.cs b/mcs/class/Facades/System.Xml.XmlSerializer/AssemblyInfo.cs index 71235d79b0..64b18fd19c 100644 --- a/mcs/class/Facades/System.Xml.XmlSerializer/AssemblyInfo.cs +++ b/mcs/class/Facades/System.Xml.XmlSerializer/AssemblyInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.CompilerServices; [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)] diff --git a/mcs/class/Facades/subdirs.make b/mcs/class/Facades/subdirs.make index 65b30b9e8e..df1dd02040 100644 --- a/mcs/class/Facades/subdirs.make +++ b/mcs/class/Facades/subdirs.make @@ -26,7 +26,7 @@ System.Security.Principal.Windows System.Threading.Thread System.Threading.Threa 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 @@ -36,15 +36,14 @@ drawing_DEPS_SUBDIRS = System.Drawing.Primitives 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) @@ -62,6 +61,8 @@ monotouch_tv_SUBDIRS = $(monotouch_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) diff --git a/mcs/class/Makefile b/mcs/class/Makefile index 7b5fca45b1..06dbb9edf3 100644 --- a/mcs/class/Makefile +++ b/mcs/class/Makefile @@ -30,6 +30,7 @@ mobile_common_dirs := \ SMDiagnostics \ System.Runtime.Serialization \ System.Xml.Linq \ + System.IdentityModel \ System.ServiceModel \ System.ServiceModel.Web \ System.Json \ diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs index fb545562ff..33aad3dea6 100644 --- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs +++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs @@ -1077,6 +1077,11 @@ namespace Microsoft.Build.BuildEngine { if (!String.IsNullOrEmpty (ToolsVersion)) return ToolsVersion; +#if XBUILD_14 + return "14.0"; +#elif XBUILD_12 + return "12.0"; +#else if (!HasToolsVersionAttribute) return parentEngine.DefaultToolsVersion; @@ -1088,6 +1093,7 @@ namespace Microsoft.Build.BuildEngine { } return DefaultToolsVersion; +#endif } void AddProjectExtensions (XmlElement xmlElement) diff --git a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs index 5bba4d9209..18bfca4934 100644 --- a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs +++ b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs @@ -182,6 +182,31 @@ namespace System.IO.MemoryMappedFiles }; } + 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, @@ -242,6 +267,12 @@ namespace System.IO.MemoryMappedFiles 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, @@ -262,6 +293,12 @@ namespace System.IO.MemoryMappedFiles 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) { diff --git a/mcs/class/System.Core/System.IO.Pipes/NamedPipeClientStream.cs b/mcs/class/System.Core/System.IO.Pipes/NamedPipeClientStream.cs index 181ab1ccbf..a5a9ebd3fb 100644 --- a/mcs/class/System.Core/System.IO.Pipes/NamedPipeClientStream.cs +++ b/mcs/class/System.Core/System.IO.Pipes/NamedPipeClientStream.cs @@ -37,6 +37,8 @@ using System.Security.AccessControl; 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; @@ -113,6 +115,10 @@ namespace System.IO.Pipes } #endif + ~NamedPipeClientStream () { + Dispose (false); + } + INamedPipeClient impl; public void Connect () @@ -137,6 +143,26 @@ namespace System.IO.Pipes #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 (); diff --git a/mcs/class/System.Core/System.IO.Pipes/NamedPipeServerStream.cs b/mcs/class/System.Core/System.IO.Pipes/NamedPipeServerStream.cs index 2723109bd9..3ffe894367 100644 --- a/mcs/class/System.Core/System.IO.Pipes/NamedPipeServerStream.cs +++ b/mcs/class/System.Core/System.IO.Pipes/NamedPipeServerStream.cs @@ -32,6 +32,8 @@ using Microsoft.Win32.SafeHandles; 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; @@ -153,6 +155,17 @@ namespace System.IO.Pipes 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 () diff --git a/mcs/class/System.Core/System.IO.Pipes/PipeStream.cs b/mcs/class/System.Core/System.IO.Pipes/PipeStream.cs index ed030e7608..20b7e7ec09 100644 --- a/mcs/class/System.Core/System.IO.Pipes/PipeStream.cs +++ b/mcs/class/System.Core/System.IO.Pipes/PipeStream.cs @@ -269,13 +269,13 @@ namespace System.IO.Pipes pipeSecurity.Persist (SafePipeHandle); } +#endif // pipe I/O public void WaitForPipeDrain () { } -#endif [MonoTODO] public override int Read ([In] byte [] buffer, int offset, int count) diff --git a/mcs/class/Facades/System.Security.Cryptography.Algorithms/ECCurve.cs b/mcs/class/System.Core/System.Security.Cryptography/ECCurve.cs similarity index 99% rename from mcs/class/Facades/System.Security.Cryptography.Algorithms/ECCurve.cs rename to mcs/class/System.Core/System.Security.Cryptography/ECCurve.cs index 3e1733e0c3..40374b884f 100644 --- a/mcs/class/Facades/System.Security.Cryptography.Algorithms/ECCurve.cs +++ b/mcs/class/System.Core/System.Security.Cryptography/ECCurve.cs @@ -26,6 +26,8 @@ // 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)] @@ -82,4 +84,6 @@ namespace System.Security.Cryptography public static ECCurve nistP521 { get { throw new NotImplementedException (); } } } } -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/mcs/class/Facades/System.Security.Cryptography.Algorithms/ECParameters.cs b/mcs/class/System.Core/System.Security.Cryptography/ECParameters.cs similarity index 98% rename from mcs/class/Facades/System.Security.Cryptography.Algorithms/ECParameters.cs rename to mcs/class/System.Core/System.Security.Cryptography/ECParameters.cs index 6f1e4211c8..e7159043f3 100644 --- a/mcs/class/Facades/System.Security.Cryptography.Algorithms/ECParameters.cs +++ b/mcs/class/System.Core/System.Security.Cryptography/ECParameters.cs @@ -26,6 +26,8 @@ // 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)] @@ -36,4 +38,6 @@ namespace System.Security.Cryptography public ECPoint Q; public void Validate () { throw new NotImplementedException (); } } -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/mcs/class/Facades/System.Security.Cryptography.Algorithms/ECPoint.cs b/mcs/class/System.Core/System.Security.Cryptography/ECPoint.cs similarity index 98% rename from mcs/class/Facades/System.Security.Cryptography.Algorithms/ECPoint.cs rename to mcs/class/System.Core/System.Security.Cryptography/ECPoint.cs index 5693959d0e..88042d1f44 100644 --- a/mcs/class/Facades/System.Security.Cryptography.Algorithms/ECPoint.cs +++ b/mcs/class/System.Core/System.Security.Cryptography/ECPoint.cs @@ -26,6 +26,8 @@ // 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)] @@ -34,4 +36,6 @@ namespace System.Security.Cryptography public byte[] X; public byte[] Y; } -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/mcs/class/Facades/System.Security.Cryptography.Algorithms/IncrementalHash.cs b/mcs/class/System.Core/System.Security.Cryptography/IncrementalHash.cs similarity index 98% rename from mcs/class/Facades/System.Security.Cryptography.Algorithms/IncrementalHash.cs rename to mcs/class/System.Core/System.Security.Cryptography/IncrementalHash.cs index 7b39b0d988..14c895e597 100644 --- a/mcs/class/Facades/System.Security.Cryptography.Algorithms/IncrementalHash.cs +++ b/mcs/class/System.Core/System.Security.Cryptography/IncrementalHash.cs @@ -26,6 +26,8 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // +#if NETSTANDARD + namespace System.Security.Cryptography { public sealed class IncrementalHash : IDisposable @@ -39,4 +41,6 @@ namespace System.Security.Cryptography public void Dispose () { } public byte[] GetHashAndReset () { throw new NotImplementedException (); } } -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/mcs/class/System.Core/common_System.Core.dll.sources b/mcs/class/System.Core/common_System.Core.dll.sources index 30969ddee0..f6a3f9b546 100644 --- a/mcs/class/System.Core/common_System.Core.dll.sources +++ b/mcs/class/System.Core/common_System.Core.dll.sources @@ -223,3 +223,8 @@ ReferenceSources/Strings.cs ../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 diff --git a/mcs/class/System.Data/Microsoft.SqlServer.Server/SqlDataRecord.cs b/mcs/class/System.Data/Microsoft.SqlServer.Server/SqlDataRecord.cs index 0362d94774..f1bd8de25c 100644 --- a/mcs/class/System.Data/Microsoft.SqlServer.Server/SqlDataRecord.cs +++ b/mcs/class/System.Data/Microsoft.SqlServer.Server/SqlDataRecord.cs @@ -79,6 +79,11 @@ namespace Microsoft.SqlServer.Server throw new NotImplementedException (); } + public virtual DateTimeOffset GetDateTimeOffset (int ordinal) + { + throw new NotImplementedException (); + } + public virtual decimal GetDecimal (int ordinal) { throw new NotImplementedException (); @@ -89,7 +94,7 @@ namespace Microsoft.SqlServer.Server throw new NotImplementedException (); } - public virtual System.Type GetFieldType (int ordinal) + public virtual Type GetFieldType (int ordinal) { throw new NotImplementedException (); } @@ -129,11 +134,116 @@ namespace Microsoft.SqlServer.Server 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 (); @@ -144,6 +254,181 @@ namespace Microsoft.SqlServer.Server 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 (); diff --git a/mcs/class/System.Data/Microsoft.SqlServer.Server/SqlMetaData.cs b/mcs/class/System.Data/Microsoft.SqlServer.Server/SqlMetaData.cs index 831266c9a5..b428f22577 100644 --- a/mcs/class/System.Data/Microsoft.SqlServer.Server/SqlMetaData.cs +++ b/mcs/class/System.Data/Microsoft.SqlServer.Server/SqlMetaData.cs @@ -33,6 +33,7 @@ using System; using System.Data; +using System.Data.SqlClient; using System.Threading; using System.Data.SqlTypes; @@ -205,6 +206,42 @@ namespace Microsoft.SqlServer.Server { 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) @@ -659,6 +696,25 @@ namespace Microsoft.SqlServer.Server { 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 @@ -705,6 +761,20 @@ namespace Microsoft.SqlServer.Server { 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)) @@ -866,6 +936,12 @@ namespace Microsoft.SqlServer.Server { return value; } + [MonoTODO] + public SqlXml Adjust (SqlXml value) + { + throw new NotImplementedException (); + } + public string Adjust (string value) { if (type != typeof (string)) diff --git a/mcs/class/System.Data/System.Data.SqlClient/SqlBulkCopy.cs b/mcs/class/System.Data/System.Data.SqlClient/SqlBulkCopy.cs index 3b91545963..96cf66caba 100644 --- a/mcs/class/System.Data/System.Data.SqlClient/SqlBulkCopy.cs +++ b/mcs/class/System.Data/System.Data.SqlClient/SqlBulkCopy.cs @@ -32,6 +32,8 @@ 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; @@ -146,6 +148,12 @@ namespace System.Data.SqlClient { set { _destinationTableName = value; } } + [MonoTODO] + public bool EnableStreaming { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + public int NotifyAfter { get { return _notifyAfter; } set { @@ -598,6 +606,24 @@ namespace System.Data.SqlClient { 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); diff --git a/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs b/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs index edd0894e61..c6dc7712ba 100644 --- a/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs +++ b/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs @@ -47,6 +47,8 @@ using System.Data.Common; 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 { @@ -508,6 +510,42 @@ namespace System.Data.SqlClient { } } + [MonoTODO] + public new Task ExecuteReaderAsync () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public new Task ExecuteReaderAsync (CancellationToken cancellationToken) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public new Task ExecuteReaderAsync (CommandBehavior behavior) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public new Task ExecuteReaderAsync (CommandBehavior behavior, CancellationToken cancellationToken) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public Task ExecuteXmlReaderAsync () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public Task ExecuteXmlReaderAsync (CancellationToken cancellationToken) + { + throw new NotImplementedException (); + } + public override object ExecuteScalar () diff --git a/mcs/class/System.Data/System.Data.SqlClient/SqlConnection.cs b/mcs/class/System.Data/System.Data.SqlClient/SqlConnection.cs index 194aef4668..9af24e6505 100644 --- a/mcs/class/System.Data/System.Data.SqlClient/SqlConnection.cs +++ b/mcs/class/System.Data/System.Data.SqlClient/SqlConnection.cs @@ -163,6 +163,13 @@ namespace System.Data.SqlClient } } + [MonoTODO] + public Guid ClientConnectionId { + get { + throw new NotImplementedException (); + } + } + [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)] public override @@ -1663,6 +1670,17 @@ namespace System.Data.SqlClient } } + [MonoTODO] + public void ResetStatistics () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public IDictionary RetrieveStatistics () + { + throw new NotImplementedException (); + } #endregion // Methods diff --git a/mcs/class/System.Data/System.Data.SqlClient/SqlException.cs b/mcs/class/System.Data/System.Data.SqlClient/SqlException.cs index 2b0e1a8862..99cfb66fb7 100644 --- a/mcs/class/System.Data/System.Data.SqlClient/SqlException.cs +++ b/mcs/class/System.Data/System.Data.SqlClient/SqlException.cs @@ -162,6 +162,11 @@ namespace System.Data.SqlClient get { return Errors [0].Class; } } + [MonoTODO] + public Guid ClientConnectionId { + get { throw new NotImplementedException (); } + } + [DesignerSerializationVisibility (DesignerSerializationVisibility.Content)] public SqlErrorCollection Errors { get { return errors; } diff --git a/mcs/class/System.Data/System.Data.SqlClient/SqlParameter.cs b/mcs/class/System.Data/System.Data.SqlClient/SqlParameter.cs index f011f7cb3b..f6153fb60b 100644 --- a/mcs/class/System.Data/System.Data.SqlClient/SqlParameter.cs +++ b/mcs/class/System.Data/System.Data.SqlClient/SqlParameter.cs @@ -473,6 +473,9 @@ namespace System.Data.SqlClient { [BrowsableAttribute(false)] public string UdtTypeName { get; set; } + [BrowsableAttribute(false)] + public string TypeName { get; set; } + #endregion // Properties #region Methods diff --git a/mcs/class/System.IdentityModel/Assembly/AssemblyInfo.cs b/mcs/class/System.IdentityModel/Assembly/AssemblyInfo.cs index dd2571f2b1..05426acf59 100644 --- a/mcs/class/System.IdentityModel/Assembly/AssemblyInfo.cs +++ b/mcs/class/System.IdentityModel/Assembly/AssemblyInfo.cs @@ -61,4 +61,6 @@ using System.Runtime.InteropServices; [assembly: ComCompatibleVersion (1, 0, 3300, 0)] [assembly: AllowPartiallyTrustedCallers] +#if !NET_2_1 [assembly: SecurityCritical (SecurityCriticalScope.Explicit)] +#endif \ No newline at end of file diff --git a/mcs/class/System.IdentityModel/Makefile b/mcs/class/System.IdentityModel/Makefile index 5a8a72c4c5..7eea754cfa 100644 --- a/mcs/class/System.IdentityModel/Makefile +++ b/mcs/class/System.IdentityModel/Makefile @@ -3,15 +3,20 @@ SUBDIRS = 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) -ifndef NO_SYSTEM_WEB_DEPENDENCY -LIB_REFS += System.Web +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)) diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Selectors/X509CertificateValidator.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Selectors/X509CertificateValidator.cs index 721cda7426..180e75c6fa 100644 --- a/mcs/class/System.IdentityModel/System.IdentityModel.Selectors/X509CertificateValidator.cs +++ b/mcs/class/System.IdentityModel/System.IdentityModel.Selectors/X509CertificateValidator.cs @@ -27,8 +27,6 @@ // using System; using System.Collections.ObjectModel; -using System.IdentityModel.Policy; -using System.IdentityModel.Tokens; using System.Security.Cryptography.X509Certificates; namespace System.IdentityModel.Selectors diff --git a/mcs/class/System.IdentityModel/mobile_System.IdentityModel.dll.sources b/mcs/class/System.IdentityModel/mobile_System.IdentityModel.dll.sources new file mode 100644 index 0000000000..f67d88c0c3 --- /dev/null +++ b/mcs/class/System.IdentityModel/mobile_System.IdentityModel.dll.sources @@ -0,0 +1,6 @@ +../../build/common/Consts.cs +../../build/common/MonoTODOAttribute.cs +Assembly/AssemblyInfo.cs + +System.IdentityModel.Selectors/X509CertificateValidator.cs +System.ServiceModel.Security/X509CertificateValidationMode.cs diff --git a/mcs/class/System.IdentityModel/mobile_static_System.IdentityModel.dll.sources b/mcs/class/System.IdentityModel/mobile_static_System.IdentityModel.dll.sources new file mode 100644 index 0000000000..429636751c --- /dev/null +++ b/mcs/class/System.IdentityModel/mobile_static_System.IdentityModel.dll.sources @@ -0,0 +1 @@ +#include mobile_System.IdentityModel.dll.sources diff --git a/mcs/class/System.IdentityModel/monodroid_System.IdentityModel.dll.sources b/mcs/class/System.IdentityModel/monodroid_System.IdentityModel.dll.sources new file mode 100644 index 0000000000..429636751c --- /dev/null +++ b/mcs/class/System.IdentityModel/monodroid_System.IdentityModel.dll.sources @@ -0,0 +1 @@ +#include mobile_System.IdentityModel.dll.sources diff --git a/mcs/class/System.IdentityModel/monotouch_System.IdentityModel.dll.sources b/mcs/class/System.IdentityModel/monotouch_System.IdentityModel.dll.sources new file mode 100644 index 0000000000..429636751c --- /dev/null +++ b/mcs/class/System.IdentityModel/monotouch_System.IdentityModel.dll.sources @@ -0,0 +1 @@ +#include mobile_System.IdentityModel.dll.sources diff --git a/mcs/class/System.IdentityModel/monotouch_tv_System.IdentityModel.dll.sources b/mcs/class/System.IdentityModel/monotouch_tv_System.IdentityModel.dll.sources new file mode 100644 index 0000000000..429636751c --- /dev/null +++ b/mcs/class/System.IdentityModel/monotouch_tv_System.IdentityModel.dll.sources @@ -0,0 +1 @@ +#include mobile_System.IdentityModel.dll.sources diff --git a/mcs/class/System.IdentityModel/monotouch_watch_System.IdentityModel.dll.sources b/mcs/class/System.IdentityModel/monotouch_watch_System.IdentityModel.dll.sources new file mode 100644 index 0000000000..429636751c --- /dev/null +++ b/mcs/class/System.IdentityModel/monotouch_watch_System.IdentityModel.dll.sources @@ -0,0 +1 @@ +#include mobile_System.IdentityModel.dll.sources diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.dll.sources b/mcs/class/System.IdentityModel/net_4_x_System.IdentityModel.dll.sources similarity index 100% rename from mcs/class/System.IdentityModel/System.IdentityModel.dll.sources rename to mcs/class/System.IdentityModel/net_4_x_System.IdentityModel.dll.sources diff --git a/mcs/class/System.IdentityModel/xammac_System.IdentityModel.dll.sources b/mcs/class/System.IdentityModel/xammac_System.IdentityModel.dll.sources new file mode 100644 index 0000000000..429636751c --- /dev/null +++ b/mcs/class/System.IdentityModel/xammac_System.IdentityModel.dll.sources @@ -0,0 +1 @@ +#include mobile_System.IdentityModel.dll.sources diff --git a/mcs/class/System.IdentityModel/xammac_net_4_5_System.IdentityModel.dll.sources b/mcs/class/System.IdentityModel/xammac_net_4_5_System.IdentityModel.dll.sources new file mode 100644 index 0000000000..7d312678c9 --- /dev/null +++ b/mcs/class/System.IdentityModel/xammac_net_4_5_System.IdentityModel.dll.sources @@ -0,0 +1 @@ +#include net_4_x_System.IdentityModel.dll.sources diff --git a/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs b/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs index 94ad2ffb27..78f2fafcc8 100644 --- a/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs +++ b/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs @@ -26,10 +26,14 @@ // 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 @@ -387,5 +391,74 @@ 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 Properties { + get { + throw new NotImplementedException (); + } + } + + public Func ServerCertificateCustomValidationCallback { + get { + throw new NotImplementedException (); + } + set { + throw new NotImplementedException (); + } + } + + public SslProtocols SslProtocols { + get { + throw new NotImplementedException (); + } + set { + throw new NotImplementedException (); + } + } + +#endif } } diff --git a/mcs/class/System.ServiceModel/Dummy_2_1.cs b/mcs/class/System.ServiceModel/Dummy_2_1.cs index dc094beb45..526b5f1f4b 100644 --- a/mcs/class/System.ServiceModel/Dummy_2_1.cs +++ b/mcs/class/System.ServiceModel/Dummy_2_1.cs @@ -7,6 +7,7 @@ using System.ServiceModel.Channels; using System.ServiceModel.Dispatcher; using System.Text; using System.Xml; +using System.Threading; namespace System.Runtime.CompilerServices { @@ -22,9 +23,92 @@ namespace System.Runtime.CompilerServices namespace System.ServiceModel { public class EndpointIdentity {} - public class InstanceContext + public class InstanceContext : CommunicationObject, IExtensibleObject { - public InstanceContext (object dummy) {} + protected internal override TimeSpan DefaultCloseTimeout + { + get { throw new NotImplementedException (); } + } + + protected internal override TimeSpan DefaultOpenTimeout + { + get { throw new NotImplementedException (); } + } + + IExtensionCollection IExtensibleObject.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 diff --git a/mcs/class/System.ServiceModel/Dummy_XM_4_5.cs b/mcs/class/System.ServiceModel/Dummy_XM_4_5.cs index eaaad975e9..0106b2237d 100644 --- a/mcs/class/System.ServiceModel/Dummy_XM_4_5.cs +++ b/mcs/class/System.ServiceModel/Dummy_XM_4_5.cs @@ -6,12 +6,96 @@ using System.ServiceModel.Channels; using System.ServiceModel.Dispatcher; using System.Text; using System.Xml; +using System.Threading; namespace System.ServiceModel { - public class InstanceContext + public class InstanceContext : CommunicationObject, IExtensibleObject { - public InstanceContext (object dummy) {} + protected internal override TimeSpan DefaultCloseTimeout + { + get { throw new NotImplementedException (); } + } + + protected internal override TimeSpan DefaultOpenTimeout + { + get { throw new NotImplementedException (); } + } + + IExtensionCollection IExtensibleObject.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 (); + } } } diff --git a/mcs/class/System.ServiceModel/Makefile b/mcs/class/System.ServiceModel/Makefile index 5f09e6a232..683b096376 100644 --- a/mcs/class/System.ServiceModel/Makefile +++ b/mcs/class/System.ServiceModel/Makefile @@ -8,7 +8,7 @@ RESOURCE_FILES = \ 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 \ @@ -20,7 +20,7 @@ LIB_REFS += System.ServiceModel.Internals 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 diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs index 45aee53cce..1f47b906c0 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs @@ -34,8 +34,8 @@ using System.ServiceModel.Security; 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 @@ -44,11 +44,11 @@ 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 (); opt_endpoint = new SupportingTokenParameters (); opt_operation = new Dictionary (); @@ -60,12 +60,12 @@ namespace System.ServiceModel.Channels 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 (); foreach (KeyValuePair p in other.operation) @@ -79,12 +79,14 @@ namespace System.ServiceModel.Channels 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 operation, opt_operation; LocalServiceSecuritySettings service_settings; #endif @@ -93,6 +95,20 @@ namespace System.ServiceModel.Channels 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; } @@ -108,20 +124,6 @@ namespace System.ServiceModel.Channels 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 OperationSupportingTokenParameters { get { return operation; } } @@ -445,32 +447,6 @@ namespace System.ServiceModel.Channels 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) { @@ -554,6 +530,36 @@ namespace System.ServiceModel.Channels } #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 () diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/SslStreamSecurityBindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/SslStreamSecurityBindingElement.cs index 12be181d6d..b8e58b4bc0 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/SslStreamSecurityBindingElement.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/SslStreamSecurityBindingElement.cs @@ -29,6 +29,7 @@ using System.Collections.Generic; 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; @@ -64,6 +65,12 @@ namespace System.ServiceModel.Channels set { require_client_certificate = value; } } + [MonoTODO] + public SslProtocols SslProtocols { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + private SslStreamSecurityBindingElement ( SslStreamSecurityBindingElement other) : base (other) diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ClientCredentials.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ClientCredentials.cs index 951adecf87..c50146bfb3 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ClientCredentials.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ClientCredentials.cs @@ -54,12 +54,12 @@ namespace System.ServiceModel.Description 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 @@ -67,9 +67,7 @@ namespace System.ServiceModel.Description UserNamePasswordClientCredential userpass = new UserNamePasswordClientCredential (); -#if !NET_2_1 - IssuedTokenClientCredential issued_token = - new IssuedTokenClientCredential (); + HttpDigestClientCredential digest = new HttpDigestClientCredential (); X509CertificateInitiatorClientCredential initiator = @@ -78,8 +76,6 @@ namespace System.ServiceModel.Description new X509CertificateRecipientClientCredential (); WindowsClientCredential windows = new WindowsClientCredential (); - PeerCredential peer = new PeerCredential (); - bool support_interactive = true; public X509CertificateInitiatorClientCredential ClientCertificate { get { return initiator; } @@ -89,6 +85,20 @@ namespace System.ServiceModel.Description 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; } } @@ -97,18 +107,10 @@ namespace System.ServiceModel.Description 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 { diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Security/X509CertificateInitiatorClientCredential.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Security/X509CertificateInitiatorClientCredential.cs index 3037251ab5..3a1da201c8 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Security/X509CertificateInitiatorClientCredential.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Security/X509CertificateInitiatorClientCredential.cs @@ -31,7 +31,7 @@ using System.Security.Cryptography.X509Certificates; 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 { @@ -57,14 +57,22 @@ 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 } } } diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Security/X509CertificateRecipientClientCredential.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Security/X509CertificateRecipientClientCredential.cs index cc4ca15415..c6aa5acfa9 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Security/X509CertificateRecipientClientCredential.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Security/X509CertificateRecipientClientCredential.cs @@ -27,7 +27,9 @@ // 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; @@ -47,7 +49,9 @@ namespace System.ServiceModel.Security X509Certificate2 certificate; Dictionary scoped = new Dictionary (); +#if !NET_2_1 X509CertificateValidator validator; +#endif X509RevocationMode revocation_mode; StoreLocation store_loc; @@ -72,6 +76,13 @@ namespace System.ServiceModel.Security get { return scoped; } } + [MonoTODO] + public X509ServiceCertificateAuthentication SslCertificateAuthentication + { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + public void SetDefaultCertificate (string subjectName, StoreLocation storeLocation, StoreName storeName) { @@ -81,7 +92,11 @@ namespace System.ServiceModel.Security 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, @@ -95,7 +110,11 @@ namespace System.ServiceModel.Security 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 } } } diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Security/X509ServiceCertificateAuthentication.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Security/X509ServiceCertificateAuthentication.cs index 4c3e9d27f7..547775642a 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Security/X509ServiceCertificateAuthentication.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Security/X509ServiceCertificateAuthentication.cs @@ -37,7 +37,7 @@ namespace System.ServiceModel.Security [MonoTODO] public class X509ServiceCertificateAuthentication { - internal X509ServiceCertificateAuthentication () + public X509ServiceCertificateAuthentication () { } diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/EndpointAddressBuilder.cs b/mcs/class/System.ServiceModel/System.ServiceModel/EndpointAddressBuilder.cs index 27e5d72869..7500d76322 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel/EndpointAddressBuilder.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel/EndpointAddressBuilder.cs @@ -62,12 +62,12 @@ namespace System.ServiceModel 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) diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/MessageSecurityOverTcp.cs b/mcs/class/System.ServiceModel/System.ServiceModel/MessageSecurityOverTcp.cs index 6e9a794ee4..2c9c5bfbc8 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel/MessageSecurityOverTcp.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel/MessageSecurityOverTcp.cs @@ -36,7 +36,7 @@ namespace System.ServiceModel #endif MessageCredentialType client_credential_type; - internal MessageSecurityOverTcp () + public MessageSecurityOverTcp () { #if !MOBILE && !XAMMAC_4_5 alg_suite = SecurityAlgorithmSuite.Default; diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/TcpTransportSecurity.cs b/mcs/class/System.ServiceModel/System.ServiceModel/TcpTransportSecurity.cs index 6d8a1d5aff..4f8f3b708d 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel/TcpTransportSecurity.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel/TcpTransportSecurity.cs @@ -27,6 +27,7 @@ // using System; using System.Net.Security; +using System.Security.Authentication; using System.ServiceModel.Security; namespace System.ServiceModel @@ -44,5 +45,12 @@ 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 (); } + } } } diff --git a/mcs/class/System.ServiceModel/mobile_System.ServiceModel.dll.sources b/mcs/class/System.ServiceModel/mobile_System.ServiceModel.dll.sources index 6666c86e48..c614c10bea 100644 --- a/mcs/class/System.ServiceModel/mobile_System.ServiceModel.dll.sources +++ b/mcs/class/System.ServiceModel/mobile_System.ServiceModel.dll.sources @@ -179,6 +179,9 @@ System.ServiceModel.Security/MessageSecurityException.cs 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 @@ -277,8 +280,11 @@ System.ServiceModel/UpnEndpointIdentity.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 diff --git a/mcs/class/System.ServiceModel/xammac_net_4_5_System.ServiceModel.dll.sources b/mcs/class/System.ServiceModel/xammac_net_4_5_System.ServiceModel.dll.sources index 1e3d293835..f5b081aeda 100644 --- a/mcs/class/System.ServiceModel/xammac_net_4_5_System.ServiceModel.dll.sources +++ b/mcs/class/System.ServiceModel/xammac_net_4_5_System.ServiceModel.dll.sources @@ -32,6 +32,7 @@ System.ServiceModel.Dispatcher/SeekableXPathNavigator.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 diff --git a/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs b/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs new file mode 100644 index 0000000000..7827d97600 --- /dev/null +++ b/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs @@ -0,0 +1,264 @@ +#if SECURITY_DEP +// +// AsyncProtocolRequest.cs +// +// Author: +// Martin Baulig +// +// 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 diff --git a/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs b/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs new file mode 100644 index 0000000000..8701ffe92e --- /dev/null +++ b/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs @@ -0,0 +1,925 @@ +// +// MobileAuthenticatedStream.cs +// +// Author: +// Martin Baulig +// +// 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 diff --git a/mcs/class/System/Mono.Net.Security/MobileTlsContext.cs b/mcs/class/System/Mono.Net.Security/MobileTlsContext.cs new file mode 100644 index 0000000000..677a510769 --- /dev/null +++ b/mcs/class/System/Mono.Net.Security/MobileTlsContext.cs @@ -0,0 +1,204 @@ +// +// MobileTlsContext.cs +// +// Author: +// Martin Baulig +// +// 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 diff --git a/mcs/class/System/Mono.Net.Security/MonoDefaultTlsProvider.cs b/mcs/class/System/Mono.Net.Security/MonoLegacyTlsProvider.cs similarity index 97% rename from mcs/class/System/Mono.Net.Security/MonoDefaultTlsProvider.cs rename to mcs/class/System/Mono.Net.Security/MonoLegacyTlsProvider.cs index 7ea40e1940..9a97195e01 100644 --- a/mcs/class/System/Mono.Net.Security/MonoDefaultTlsProvider.cs +++ b/mcs/class/System/Mono.Net.Security/MonoLegacyTlsProvider.cs @@ -1,5 +1,5 @@ // -// MonoDefaultTlsProvider.cs +// MonoLegacyTlsProvider.cs // // Author: // Martin Baulig @@ -49,7 +49,7 @@ namespace Mono.Net.Security.Private /* * Strictly private - do not use outside the Mono.Net.Security directory. */ - class MonoDefaultTlsProvider : MonoTlsProviderImpl + class MonoLegacyTlsProvider : MonoTlsProviderImpl { static readonly Guid id = new Guid ("809e77d5-56cc-4da8-b9f0-45e65ba9cceb"); diff --git a/mcs/class/System/Mono.Net.Security/MonoTlsProviderFactoryExt.cs b/mcs/class/System/Mono.Net.Security/MonoTlsProviderFactory.Apple.cs similarity index 67% rename from mcs/class/System/Mono.Net.Security/MonoTlsProviderFactoryExt.cs rename to mcs/class/System/Mono.Net.Security/MonoTlsProviderFactory.Apple.cs index f9f939bb4d..89735c6bac 100644 --- a/mcs/class/System/Mono.Net.Security/MonoTlsProviderFactoryExt.cs +++ b/mcs/class/System/Mono.Net.Security/MonoTlsProviderFactory.Apple.cs @@ -1,5 +1,5 @@ // Copyright 2015 Xamarin Inc. All rights reserved. - +#if SECURITY_DEP using System; using MSI = Mono.Security.Interface; @@ -7,16 +7,13 @@ namespace Mono.Net.Security { static partial class MonoTlsProviderFactory { - static IMonoTlsProvider CreateDefaultProvider () + static MSI.MonoTlsProvider CreateDefaultProviderImpl () { - #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; + return provider; } } } +#endif diff --git a/mcs/class/System/Mono.Net.Security/MonoTlsProviderFactory.Droid.cs b/mcs/class/System/Mono.Net.Security/MonoTlsProviderFactory.Droid.cs new file mode 100644 index 0000000000..72390bcdd1 --- /dev/null +++ b/mcs/class/System/Mono.Net.Security/MonoTlsProviderFactory.Droid.cs @@ -0,0 +1,36 @@ +// 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 diff --git a/mcs/class/System/Mono.Net.Security/MonoTlsProviderFactory.cs b/mcs/class/System/Mono.Net.Security/MonoTlsProviderFactory.cs index c4b17abcd0..e53b6eba4c 100644 --- a/mcs/class/System/Mono.Net.Security/MonoTlsProviderFactory.cs +++ b/mcs/class/System/Mono.Net.Security/MonoTlsProviderFactory.cs @@ -101,10 +101,10 @@ namespace Mono.Net.Security } } -#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 @@ -115,16 +115,15 @@ namespace Mono.Net.Security * 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 + if (provider != null) + return new Private.MonoTlsProviderWrapper (provider); #endif -#else return null; -#endif } -#endif static object locker = new object (); static IMonoTlsProvider defaultProvider; @@ -160,7 +159,7 @@ namespace Mono.Net.Security 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); } @@ -172,15 +171,19 @@ namespace Mono.Net.Security if (providerRegistration != null) return; providerRegistration = new Dictionary (); + 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 () +#if MOBILE_STATIC || !MOBILE + static MSI.MonoTlsProvider TryDynamicLoad () { var variable = Environment.GetEnvironmentVariable ("MONO_TLS_PROVIDER"); if (variable == null) @@ -189,22 +192,18 @@ namespace Mono.Net.Security 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 diff --git a/mcs/class/System/Mono.Net.Security/MonoTlsStream.cs b/mcs/class/System/Mono.Net.Security/MonoTlsStream.cs index 58479df9fb..79e4fbf684 100644 --- a/mcs/class/System/Mono.Net.Security/MonoTlsStream.cs +++ b/mcs/class/System/Mono.Net.Security/MonoTlsStream.cs @@ -97,7 +97,7 @@ namespace Mono.Net.Security try { sslStream.AuthenticateAsClient ( - request.Address.Host, request.ClientCertificates, + request.Host, request.ClientCertificates, (SslProtocols)ServicePointManager.SecurityProtocol, ServicePointManager.CheckCertificateRevocationList); diff --git a/mcs/class/System/Mono.Security.Interface/MonoTlsProviderFactoryExt.cs b/mcs/class/System/Mono.Security.Interface/MonoTlsProviderFactoryExt.cs deleted file mode 100644 index e902c802d3..0000000000 --- a/mcs/class/System/Mono.Security.Interface/MonoTlsProviderFactoryExt.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Mono.Security.Interface -{ - public delegate MonoTlsProvider MonoTlsProviderFactoryDelegate (); - - static partial class MonoTlsProviderFactory - { - public static MonoTlsProviderFactoryDelegate _PrivateFactoryDelegate; - } -} diff --git a/mcs/class/System/System.Diagnostics/ProcessModuleCollection.cs b/mcs/class/System/System.Diagnostics/ProcessModuleCollection.cs index 7a29e8f83e..bd1ea619ba 100644 --- a/mcs/class/System/System.Diagnostics/ProcessModuleCollection.cs +++ b/mcs/class/System/System.Diagnostics/ProcessModuleCollection.cs @@ -39,6 +39,11 @@ namespace System.Diagnostics protected ProcessModuleCollectionBase InnerList { get { return this; } } + + public System.Collections.IEnumerator GetEnumerator () + { + return ((System.Collections.IEnumerable)InnerList).GetEnumerator (); + } } #endif diff --git a/mcs/class/System/System.Diagnostics/ProcessThreadCollection.cs b/mcs/class/System/System.Diagnostics/ProcessThreadCollection.cs index ffa9b9899d..b2fbdbfcb1 100644 --- a/mcs/class/System/System.Diagnostics/ProcessThreadCollection.cs +++ b/mcs/class/System/System.Diagnostics/ProcessThreadCollection.cs @@ -45,6 +45,11 @@ namespace System.Diagnostics base.Add (thread); return Count - 1; } + + public System.Collections.IEnumerator GetEnumerator () + { + return ((System.Collections.IEnumerable)InnerList).GetEnumerator (); + } } #endif diff --git a/mcs/class/System/System.IO/FileSystemWatcher_mobile.cs b/mcs/class/System/System.IO/FileSystemWatcher_mobile.cs index aa13ac5209..3b274e0599 100644 --- a/mcs/class/System/System.IO/FileSystemWatcher_mobile.cs +++ b/mcs/class/System/System.IO/FileSystemWatcher_mobile.cs @@ -28,7 +28,7 @@ namespace System.IO { - public class FileSystemWatcher + public class FileSystemWatcher : IDisposable { public FileSystemWatcher () { throw new NotImplementedException (); } public FileSystemWatcher (string path) { throw new NotImplementedException (); } @@ -51,5 +51,13 @@ namespace System.IO 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 diff --git a/mcs/class/System/System.Net.Security/SslStream.cs b/mcs/class/System/System.Net.Security/SslStream.cs index 59e741722b..3e7320e3cd 100644 --- a/mcs/class/System/System.Net.Security/SslStream.cs +++ b/mcs/class/System/System.Net.Security/SslStream.cs @@ -125,6 +125,12 @@ namespace System.Net.Security 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) { diff --git a/mcs/class/System/System.Net.Sockets/Socket.cs.REMOVED.git-id b/mcs/class/System/System.Net.Sockets/Socket.cs.REMOVED.git-id index 38e2ee1c5b..063939da6a 100644 --- a/mcs/class/System/System.Net.Sockets/Socket.cs.REMOVED.git-id +++ b/mcs/class/System/System.Net.Sockets/Socket.cs.REMOVED.git-id @@ -1 +1 @@ -07896d201380eea623b23d5a0ecfd9365798af18 \ No newline at end of file +f894f490612fc2b6ff9f185bd113be8941234c9b \ No newline at end of file diff --git a/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs b/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs index 2dd8387c04..98622cb981 100644 --- a/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs +++ b/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs @@ -101,7 +101,6 @@ namespace System.Net.Sockets set { remote_ep = value; } } -#if !NET_2_1 public IPPacketInformation ReceiveMessageFromPacketInfo { get; private set; @@ -112,6 +111,7 @@ namespace System.Net.Sockets set; } +#if !NET_2_1 public TransmitFileOptions SendPacketsFlags { get; set; @@ -185,9 +185,7 @@ namespace System.Net.Sockets BufferList = null; RemoteEndPoint = null; UserToken = null; -#if !NET_2_1 SendPacketsElements = null; -#endif } public void Dispose () diff --git a/mcs/class/System/System.Net.Sockets/TcpClient.cs b/mcs/class/System/System.Net.Sockets/TcpClient.cs index 46d16b4e47..bbdb034aa1 100644 --- a/mcs/class/System/System.Net.Sockets/TcpClient.cs +++ b/mcs/class/System/System.Net.Sockets/TcpClient.cs @@ -267,7 +267,7 @@ namespace System.Net.Sockets public void Close () { - ((IDisposable) this).Dispose (); + Dispose (); } public void Connect (IPEndPoint remoteEP) @@ -382,7 +382,7 @@ namespace System.Net.Sockets return client.BeginConnect (host, port, requestCallback, state); } - void IDisposable.Dispose () + public void Dispose () { Dispose (true); GC.SuppressFinalize (this); diff --git a/mcs/class/System/System.Net.Sockets/UdpClient.cs b/mcs/class/System/System.Net.Sockets/UdpClient.cs index 0799816a9e..ad3c4117f5 100644 --- a/mcs/class/System/System.Net.Sockets/UdpClient.cs +++ b/mcs/class/System/System.Net.Sockets/UdpClient.cs @@ -125,12 +125,10 @@ namespace System.Net.Sockets socket.Bind (localEP); } -#region Close public void Close () { - ((IDisposable) this).Dispose (); + Dispose (); } -#endregion #region Connect void DoConnect (IPEndPoint endPoint) @@ -570,7 +568,7 @@ namespace System.Net.Sockets #endregion #region Disposing - void IDisposable.Dispose () + public void Dispose () { Dispose (true); GC.SuppressFinalize (this); diff --git a/mcs/class/System/System.Net/ServicePoint.cs b/mcs/class/System/System.Net/ServicePoint.cs index d58b62bd9e..2ee8b0c074 100644 --- a/mcs/class/System/System.Net/ServicePoint.cs +++ b/mcs/class/System/System.Net/ServicePoint.cs @@ -345,25 +345,25 @@ namespace System.Net lock (hostE) { string uriHost = uri.Host; - if (host == null) { - // Cannot do DNS resolution on literal IP addresses - if (uri.HostNameType == UriHostNameType.IPv6 || uri.HostNameType == UriHostNameType.IPv4) { - - if (uri.HostNameType == UriHostNameType.IPv6) { - // Remove square brackets - uriHost = uriHost.Substring (1, uriHost.Length - 2); - } - - // Creates IPHostEntry - host = new IPHostEntry(); - host.AddressList = new IPAddress[] { IPAddress.Parse (uriHost) }; + // Cannot do DNS resolution on literal IP addresses + if (uri.HostNameType == UriHostNameType.IPv6 || uri.HostNameType == UriHostNameType.IPv4) { + if (host != null) return host; + + if (uri.HostNameType == UriHostNameType.IPv6) { + // Remove square brackets + uriHost = uriHost.Substring (1, uriHost.Length - 2); } - } else { - if (!HasTimedOut) - return host; + + // Creates IPHostEntry + host = new IPHostEntry(); + host.AddressList = new IPAddress[] { IPAddress.Parse (uriHost) }; + return host; } + if (!HasTimedOut) + return host; + lastDnsResolve = DateTime.UtcNow; try { diff --git a/mcs/class/System/System.Security.Authentication.ExtendedProtection/ServiceNameCollection.cs b/mcs/class/System/System.Security.Authentication.ExtendedProtection/ServiceNameCollection.cs index 9010edfeac..3fa9b3f4a9 100644 --- a/mcs/class/System/System.Security.Authentication.ExtendedProtection/ServiceNameCollection.cs +++ b/mcs/class/System/System.Security.Authentication.ExtendedProtection/ServiceNameCollection.cs @@ -50,6 +50,11 @@ namespace System.Security.Authentication.ExtendedProtection { throw new NotImplementedException (); } + + public bool Contains (string searchServiceName) + { + throw new NotImplementedException (); + } } } diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2Impl.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2Impl.cs index 60e256a05c..234d0907f2 100644 --- a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2Impl.cs +++ b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2Impl.cs @@ -67,6 +67,10 @@ namespace System.Security.Cryptography.X509Certificates get; } + internal abstract X509CertificateImplCollection IntermediateCertificates { + get; + } + public abstract string GetNameInfo (X509NameType nameType, bool forIssuer); public abstract void Import (byte[] rawData, string password, X509KeyStorageFlags keyStorageFlags); diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2ImplMono.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2ImplMono.cs index bfb2696f97..cdc14c49eb 100644 --- a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2ImplMono.cs +++ b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2ImplMono.cs @@ -57,6 +57,7 @@ namespace System.Security.Cryptography.X509Certificates X500DistinguishedName issuer_name; X500DistinguishedName subject_name; Oid signature_algorithm; + X509CertificateImplCollection intermediateCerts; MX.X509Certificate _cert; @@ -77,18 +78,25 @@ namespace System.Security.Cryptography.X509Certificates 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) { @@ -183,7 +191,7 @@ namespace System.Security.Cryptography.X509Certificates } } - #endregion +#endregion // constructors @@ -459,6 +467,15 @@ namespace System.Security.Cryptography.X509Certificates 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; } } @@ -546,6 +563,10 @@ namespace System.Security.Cryptography.X509Certificates issuer_name = null; subject_name = null; signature_algorithm = null; + if (intermediateCerts != null) { + intermediateCerts.Dispose (); + intermediateCerts = null; + } } public override string ToString () @@ -687,6 +708,10 @@ namespace System.Security.Cryptography.X509Certificates return GetCertContentType (data); } + internal override X509CertificateImplCollection IntermediateCertificates { + get { return intermediateCerts; } + } + // internal stuff because X509Certificate2 isn't complete enough // (maybe X509Certificate3 will be better?) diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509CertificateImplCollection.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509CertificateImplCollection.cs new file mode 100644 index 0000000000..42099ca198 --- /dev/null +++ b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509CertificateImplCollection.cs @@ -0,0 +1,97 @@ +// +// X509CertificateImplCollection.cs +// +// Authors: +// Martin Baulig +// +// 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 list; + + public X509CertificateImplCollection () + { + list = new List (); + } + + X509CertificateImplCollection (X509CertificateImplCollection other) + { + list = new List (); + 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 diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Chain.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Chain.cs index a7c24d385f..0ea1c8e9b0 100644 --- a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Chain.cs +++ b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Chain.cs @@ -37,6 +37,7 @@ using MX = MonoSecurity::Mono.Security.X509; using MX = Mono.Security.X509; #endif +using Microsoft.Win32.SafeHandles; using System.Collections; using System.Text; @@ -113,6 +114,10 @@ namespace System.Security.Cryptography.X509Certificates { get { return Impl.ChainStatus; } } + public SafeX509ChainHandle SafeHandle { + get { throw new NotImplementedException (); } + } + // methods [MonoTODO ("Not totally RFC3280 compliant, but neither is MS implementation...")] diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509ChainStatusFlags.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509ChainStatusFlags.cs index 142592bc58..e606819185 100644 --- a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509ChainStatusFlags.cs +++ b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509ChainStatusFlags.cs @@ -53,7 +53,10 @@ namespace System.Security.Cryptography.X509Certificates { CtlNotSignatureValid = 262144, CtlNotValidForUsage = 524288, OfflineRevocation = 16777216, - NoIssuanceChainPolicy = 33554432 + NoIssuanceChainPolicy = 33554432, + ExplicitDistrust = 67108864, + HasNotSupportedCriticalExtension = 134217728, + HasWeakSignature = 1048576, } } diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Store.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Store.cs index 42b6c6e3d4..0b9ec4525b 100644 --- a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Store.cs +++ b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Store.cs @@ -40,7 +40,7 @@ using System.Security.Permissions; namespace System.Security.Cryptography.X509Certificates { - public sealed class X509Store { + public sealed class X509Store : IDisposable { private string _name; private StoreLocation _location; @@ -208,6 +208,11 @@ namespace System.Security.Cryptography.X509Certificates { list.Clear (); } + public void Dispose () + { + Close (); + } + public void Open (OpenFlags flags) { if (String.IsNullOrEmpty (_name)) diff --git a/mcs/class/System/System.dll.sources b/mcs/class/System/System.dll.sources index 9d3dde13c8..afde1b3a32 100644 --- a/mcs/class/System/System.dll.sources +++ b/mcs/class/System/System.dll.sources @@ -463,6 +463,7 @@ System.Security.Cryptography.X509Certificates/X509Certificate2Enumerator.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/X509ChainElementCollection.cs System.Security.Cryptography.X509Certificates/X509ChainElement.cs @@ -543,12 +544,15 @@ System.Windows.Input/ICommand.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 diff --git a/mcs/class/System/Test/System/UriTest.cs b/mcs/class/System/Test/System/UriTest.cs index 9f5b848af0..32c3fb0459 100644 --- a/mcs/class/System/Test/System/UriTest.cs +++ b/mcs/class/System/Test/System/UriTest.cs @@ -2072,5 +2072,12 @@ namespace MonoTests.System Uri uri; Assert.IsTrue (Uri.TryCreate (value, UriKind.Absolute, out uri)); } + + [Test] + public void UncValidPath () + { + var uri = new Uri ("https://_foo/bar.html"); + Assert.AreEqual ("https", uri.Scheme); + } } } diff --git a/mcs/class/System/mobile_System.dll.sources b/mcs/class/System/mobile_System.dll.sources index e55a0a78f7..ae15bf9c4b 100644 --- a/mcs/class/System/mobile_System.dll.sources +++ b/mcs/class/System/mobile_System.dll.sources @@ -251,6 +251,7 @@ System.Security.Cryptography.X509Certificates/X509Certificate2Enumerator.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 @@ -290,12 +291,15 @@ System/UriTypeConverter.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 diff --git a/mcs/class/System/monodroid_System.dll.sources b/mcs/class/System/monodroid_System.dll.sources index 2abef93159..686004bd3b 100644 --- a/mcs/class/System/monodroid_System.dll.sources +++ b/mcs/class/System/monodroid_System.dll.sources @@ -1,3 +1,3 @@ #include mobile_System.dll.sources System/AndroidPlatform.cs - +Mono.Net.Security/MonoTlsProviderFactory.Droid.cs diff --git a/mcs/class/System/monotouch_System.dll.sources b/mcs/class/System/monotouch_System.dll.sources index 8f3de2eff5..a9108dde96 100644 --- a/mcs/class/System/monotouch_System.dll.sources +++ b/mcs/class/System/monotouch_System.dll.sources @@ -1,5 +1,5 @@ #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 diff --git a/mcs/class/System/xammac_System.dll.sources b/mcs/class/System/xammac_System.dll.sources index 330f510687..7c857b015b 100644 --- a/mcs/class/System/xammac_System.dll.sources +++ b/mcs/class/System/xammac_System.dll.sources @@ -1,4 +1,4 @@ #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 diff --git a/mcs/class/corlib/Microsoft.Win32/RegistryKey.cs b/mcs/class/corlib/Microsoft.Win32/RegistryKey.cs index a0f30146c8..531958e8bc 100644 --- a/mcs/class/corlib/Microsoft.Win32/RegistryKey.cs +++ b/mcs/class/corlib/Microsoft.Win32/RegistryKey.cs @@ -60,12 +60,90 @@ namespace Microsoft.Win32 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 (); } @@ -75,6 +153,11 @@ namespace Microsoft.Win32 throw new PlatformNotSupportedException (); } + public RegistryKey OpenSubKey (string name, RegistryRights rights) + { + throw new PlatformNotSupportedException (); + } + public void SetValue (string name, object value) { } @@ -83,7 +166,25 @@ namespace Microsoft.Win32 { } - // 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 /// @@ -389,7 +490,18 @@ namespace Microsoft.Win32 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); + } + /// /// Delete the specified subkey. /// @@ -589,7 +701,14 @@ namespace Microsoft.Win32 { 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) diff --git a/mcs/class/corlib/System.Diagnostics.Tracing/EventAttribute.cs b/mcs/class/corlib/System.Diagnostics.Tracing/EventAttribute.cs index a0d0fd05b2..a639132ba2 100644 --- a/mcs/class/corlib/System.Diagnostics.Tracing/EventAttribute.cs +++ b/mcs/class/corlib/System.Diagnostics.Tracing/EventAttribute.cs @@ -41,12 +41,15 @@ namespace System.Diagnostics.Tracing 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; } } } diff --git a/mcs/class/corlib/System.Diagnostics.Tracing/EventSource.cs b/mcs/class/corlib/System.Diagnostics.Tracing/EventSource.cs index 0872f01977..312f0ccb16 100644 --- a/mcs/class/corlib/System.Diagnostics.Tracing/EventSource.cs +++ b/mcs/class/corlib/System.Diagnostics.Tracing/EventSource.cs @@ -28,6 +28,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // +using System.Collections.Generic; namespace System.Diagnostics.Tracing { @@ -76,6 +77,11 @@ namespace System.Diagnostics.Tracing { } + ~EventSource () + { + Dispose (false); + } + public Exception ConstructionException { get { return null; } @@ -121,6 +127,7 @@ namespace System.Diagnostics.Tracing public void Dispose () { Dispose (true); + GC.SuppressFinalize (this); } public string GetTrait (string key) @@ -132,6 +139,10 @@ namespace System.Diagnostics.Tracing { } + public void Write (string eventName, EventSourceOptions options) + { + } + public void Write (string eventName, T data) { } @@ -244,6 +255,75 @@ namespace System.Diagnostics.Tracing { 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 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 GetSources () + { + throw new NotImplementedException (); + } + + [MonoTODO] + public static void SendCommand (EventSource eventSource, EventCommand command, IDictionary 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 (); + } } } diff --git a/mcs/class/corlib/System.Diagnostics/StackTrace.cs b/mcs/class/corlib/System.Diagnostics/StackTrace.cs index 75ef6023e6..8fe1fdea31 100644 --- a/mcs/class/corlib/System.Diagnostics/StackTrace.cs +++ b/mcs/class/corlib/System.Diagnostics/StackTrace.cs @@ -178,6 +178,20 @@ namespace System.Diagnostics { return frames; } + static bool isAotidSet; + static string aotid; + static string GetAotId () + { + if (!isAotidSet) { + aotid = Assembly.GetAotId (); + if (aotid != null) + aotid = new Guid (aotid).ToString ("N"); + isAotidSet = true; + } + + return aotid; + } + bool AddFrames (StringBuilder sb) { bool printOffset; @@ -215,8 +229,18 @@ namespace System.Diagnostics { sb.AppendFormat (" [0x{0:x5}]", frame.GetILOffset ()); } - sb.AppendFormat (debugInfo, frame.GetSecureFileName (), - frame.GetFileLineNumber ()); + var filename = frame.GetSecureFileName (); + if (filename[0] == '<') { + var mvid = frame.GetMethod ().Module.ModuleVersionId.ToString ("N"); + var aotid = GetAotId (); + if (frame.GetILOffset () != -1 || aotid == null) { + filename = string.Format ("<{0}>", mvid); + } else { + filename = string.Format ("<{0}#{1}>", mvid, aotid); + } + } + + sb.AppendFormat (debugInfo, filename, frame.GetFileLineNumber ()); } } @@ -287,8 +311,6 @@ namespace System.Diagnostics { if (!t.AddFrames (sb)) continue; - t.AddMetadata (sb); - sb.Append (Environment.NewLine); sb.Append ("--- End of stack trace from previous location where exception was thrown ---"); sb.Append (Environment.NewLine); @@ -296,78 +318,14 @@ namespace System.Diagnostics { } AddFrames (sb); - AddMetadata (sb); return sb.ToString (); } - void AddMetadata (StringBuilder sb) - { - if (metadataHandlers == null) - InitMetadataHandlers (); - - foreach (var handler in metadataHandlers) { - var lines = handler.Value (this); - using (var reader = new StringReader (lines)) { - string line; - while ((line = reader.ReadLine()) != null) { - sb.AppendLine (); - sb.AppendFormat ("[{0}] {1}", handler.Key, line); - } - } - } - } - internal String ToString (TraceFormat traceFormat) { // TODO: return ToString (); } - - static void InitMetadataHandlers () - { - metadataHandlers = new Dictionary> (StringComparer.Ordinal); - - var aotid = Assembly.GetAotId (); - if (aotid != null) - AddMetadataHandler ("AOTID", st => { return new Guid (aotid).ToString ("N"); }); - - AddMetadataHandler ("MVID", st => { - var mvidLines = new Dictionary> (); - var frames = st.GetFrames (); - for (var lineNumber = 0; lineNumber < frames.Length; lineNumber++) { - var method = frames[lineNumber].GetMethod (); - if (method == null) - continue; - var mvid = method.Module.ModuleVersionId; - - List lines = null; - if (!mvidLines.TryGetValue (mvid, out lines)) { - lines = new List (); - mvidLines.Add (mvid, lines); - } - - lines.Add (lineNumber); - } - - var mvids = new List (mvidLines.Keys); - mvids.Sort (); - - var sb = new StringBuilder (); - foreach (var mvid in mvids) - sb.AppendLine (string.Format ("{0} {1}", mvid.ToString ("N"), string.Join (",", mvidLines[mvid]))); - - return sb.ToString (); - }); - } - - // This method signature should not change, apps can use it with reflection to add custom metadata handlers. - private static void AddMetadataHandler (string id, Func handler) - { - if (metadataHandlers == null) - InitMetadataHandlers (); - - metadataHandlers.Add (id, handler); - } } } diff --git a/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs b/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs index a1b028b08c..ae4c08c10b 100644 --- a/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs +++ b/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs @@ -68,6 +68,12 @@ namespace System.Runtime.InteropServices #endif } + [MonoTODO] + public static bool AreComObjectsAvailableForCleanup () + { + return false; + } + [MethodImplAttribute(MethodImplOptions.InternalCall)] public extern static IntPtr AllocCoTaskMem (int cb); @@ -341,6 +347,12 @@ namespace System.Runtime.InteropServices #endif } + [MonoTODO] + public static IntPtr GetComInterfaceForObject (object o, Type T, CustomQueryInterfaceMode mode) + { + throw new NotImplementedException (); + } + public static IntPtr GetComInterfaceForObject (T o) { return GetComInterfaceForObject ((object)o, typeof (T)); } diff --git a/mcs/class/corlib/System.Security.AccessControl/AuthorizationRuleCollection.cs b/mcs/class/corlib/System.Security.AccessControl/AuthorizationRuleCollection.cs index a7975c16d2..7c0453db56 100644 --- a/mcs/class/corlib/System.Security.AccessControl/AuthorizationRuleCollection.cs +++ b/mcs/class/corlib/System.Security.AccessControl/AuthorizationRuleCollection.cs @@ -33,11 +33,20 @@ namespace System.Security.AccessControl { 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]; } } diff --git a/mcs/class/corlib/System.Security.AccessControl/CommonSecurityDescriptor.cs b/mcs/class/corlib/System.Security.AccessControl/CommonSecurityDescriptor.cs index 60bb7b2cde..b74475ed74 100644 --- a/mcs/class/corlib/System.Security.AccessControl/CommonSecurityDescriptor.cs +++ b/mcs/class/corlib/System.Security.AccessControl/CommonSecurityDescriptor.cs @@ -216,7 +216,19 @@ namespace System.Security.AccessControl 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) diff --git a/mcs/class/corlib/System.Security.AccessControl/DiscretionaryAcl.cs b/mcs/class/corlib/System.Security.AccessControl/DiscretionaryAcl.cs index 1d3156fc57..6d3983bcd4 100644 --- a/mcs/class/corlib/System.Security.AccessControl/DiscretionaryAcl.cs +++ b/mcs/class/corlib/System.Security.AccessControl/DiscretionaryAcl.cs @@ -71,7 +71,12 @@ namespace System.Security.AccessControl 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, @@ -94,7 +99,12 @@ namespace System.Security.AccessControl { 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, @@ -118,7 +128,12 @@ namespace System.Security.AccessControl 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, @@ -142,7 +157,12 @@ namespace System.Security.AccessControl 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 (); diff --git a/mcs/class/corlib/System.Security.AccessControl/ObjectSecurity.cs b/mcs/class/corlib/System.Security.AccessControl/ObjectSecurity.cs index 038fc71b8e..b3143fc254 100644 --- a/mcs/class/corlib/System.Security.AccessControl/ObjectSecurity.cs +++ b/mcs/class/corlib/System.Security.AccessControl/ObjectSecurity.cs @@ -39,7 +39,11 @@ namespace System.Security.AccessControl { public abstract class ObjectSecurity { - internal ObjectSecurity (CommonSecurityDescriptor securityDescriptor) + protected ObjectSecurity () + { + } + + protected ObjectSecurity (CommonSecurityDescriptor securityDescriptor) { if (securityDescriptor == null) throw new ArgumentNullException ("securityDescriptor"); diff --git a/mcs/class/corlib/System.Security.AccessControl/SystemAcl.cs b/mcs/class/corlib/System.Security.AccessControl/SystemAcl.cs index 3d41d02c6c..238fe8c904 100644 --- a/mcs/class/corlib/System.Security.AccessControl/SystemAcl.cs +++ b/mcs/class/corlib/System.Security.AccessControl/SystemAcl.cs @@ -71,7 +71,12 @@ namespace System.Security.AccessControl 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, @@ -94,7 +99,12 @@ namespace System.Security.AccessControl { 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, @@ -120,7 +130,12 @@ namespace System.Security.AccessControl 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, @@ -144,7 +159,12 @@ namespace System.Security.AccessControl 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 (); diff --git a/mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs b/mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs index c86156e8ca..a36af1be59 100644 --- a/mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs +++ b/mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs @@ -183,6 +183,18 @@ namespace System.Security.Principal { return new WindowsImpersonationContext (userToken); } + [SecuritySafeCritical] + public static void RunImpersonated (SafeAccessTokenHandle safeAccessTokenHandle, Action action) + { + throw new NotImplementedException (); + } + + [SecuritySafeCritical] + public static T RunImpersonated (SafeAccessTokenHandle safeAccessTokenHandle, Func func) + { + throw new NotImplementedException (); + } + // properties sealed override public string AuthenticationType { diff --git a/mcs/class/corlib/System/Console.cs b/mcs/class/corlib/System/Console.cs index f75547ab13..2e7c4f4531 100644 --- a/mcs/class/corlib/System/Console.cs +++ b/mcs/class/corlib/System/Console.cs @@ -782,6 +782,183 @@ namespace System 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 } } diff --git a/mcs/class/corlib/Test/System.Reflection.Emit/CustomAttributeBuilderTest.cs b/mcs/class/corlib/Test/System.Reflection.Emit/CustomAttributeBuilderTest.cs index d2a00c7690..eb6eff866c 100644 --- a/mcs/class/corlib/Test/System.Reflection.Emit/CustomAttributeBuilderTest.cs +++ b/mcs/class/corlib/Test/System.Reflection.Emit/CustomAttributeBuilderTest.cs @@ -727,6 +727,69 @@ namespace MonoTests.System.Reflection.Emit Assert.AreEqual ("foo", res [0][0]); Assert.AreEqual ("bar", res [1][0]); } + + [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] + internal class NonVisibleCustomAttribute : Attribute + { + public NonVisibleCustomAttribute () {} + } + + [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] + public class PublicVisibleCustomAttribute : Attribute + { + public PublicVisibleCustomAttribute () {} + } + + private static void AddCustomClassAttribute (TypeBuilder typeBuilder, Type customAttrType) + { + var attribCtorParams = new Type[] {}; + var attribCtorInfo = customAttrType.GetConstructor(attribCtorParams); + var attribBuilder = new CustomAttributeBuilder(attribCtorInfo, new object[] { }); + typeBuilder.SetCustomAttribute(attribBuilder); + } + + [Test] + public void NonvisibleCustomAttribute () { + // + // We build: + // [VisiblePublicCustom] + // [VisiblePublicCustom] + // [NonVisibleCustom] + // [VisiblePublicCustom] + // class BuiltType { public BuiltType () { } } + // + // And then we try to get all the attributes. + // + // Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=43291 + var assemblyName = new AssemblyName("Repro43291Asm"); + var assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.Run); + var moduleBuilder = assemblyBuilder.DefineDynamicModule("Repro43291Mod"); + + var typeBuilder = moduleBuilder.DefineType("BuiltType", + TypeAttributes.Public | TypeAttributes.Class | TypeAttributes.BeforeFieldInit); + + AddCustomClassAttribute (typeBuilder, typeof (PublicVisibleCustomAttribute)); + AddCustomClassAttribute (typeBuilder, typeof (PublicVisibleCustomAttribute)); + AddCustomClassAttribute (typeBuilder, typeof (NonVisibleCustomAttribute)); + AddCustomClassAttribute (typeBuilder, typeof (PublicVisibleCustomAttribute)); + + var createdType = typeBuilder.CreateType (); + + Assert.IsNotNull (createdType); + + var obj = Activator.CreateInstance (createdType); + + Assert.IsNotNull (obj); + + var attrs = obj.GetType ().GetCustomAttributes (typeof (Attribute), true); + + Assert.IsNotNull (attrs); + + Assert.AreEqual (3, attrs.Length); + Assert.IsInstanceOfType (typeof (PublicVisibleCustomAttribute), attrs[0]); + Assert.IsInstanceOfType (typeof (PublicVisibleCustomAttribute), attrs[1]); + Assert.IsInstanceOfType (typeof (PublicVisibleCustomAttribute), attrs[2]); + } } } diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LambdaExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LambdaExpression.cs index 4d1c235673..050330c0b4 100644 --- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LambdaExpression.cs +++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LambdaExpression.cs @@ -137,6 +137,13 @@ namespace System.Linq.Expressions { return LambdaCompiler.Compile(this, debugInfoGenerator); } +#if NETSTANDARD + public Delegate Compile(bool preferInterpretation) { + // TODO: add logic for preferInterpretation + return Compile(); + } +#endif + #if FEATURE_REFEMIT /// /// Compiles the lambda into a method definition. @@ -198,6 +205,13 @@ namespace System.Linq.Expressions { return (TDelegate)(object)LambdaCompiler.Compile(this, debugInfoGenerator); } +#if NETSTANDARD + public new TDelegate Compile(bool preferInterpretation) { + // TODO: add logic for preferInterpretation + return Compile(); + } +#endif + /// /// Creates a new expression that is like this one, but using the /// supplied children. If all of the children are the same, it will diff --git a/mcs/class/lib/monolite/System.Core.dll.REMOVED.git-id b/mcs/class/lib/monolite/System.Core.dll.REMOVED.git-id index e8c728515f..693fd9ef18 100644 --- a/mcs/class/lib/monolite/System.Core.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/System.Core.dll.REMOVED.git-id @@ -1 +1 @@ -7c86bcb4355c7ad3c46db54b0d3b3c61a500acc9 \ No newline at end of file +0e58c3fba67bf21766014677b5f894f7637162d9 \ No newline at end of file diff --git a/mcs/class/lib/monolite/System.dll.REMOVED.git-id b/mcs/class/lib/monolite/System.dll.REMOVED.git-id index 008f8d52a0..520e0adae4 100644 --- a/mcs/class/lib/monolite/System.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/System.dll.REMOVED.git-id @@ -1 +1 @@ -978b301e84fc06564244cf2feef42c74b080e185 \ No newline at end of file +1152863809f55647518f82881b764f79e30fb9fa \ No newline at end of file diff --git a/mcs/class/lib/monolite/basic.exe.REMOVED.git-id b/mcs/class/lib/monolite/basic.exe.REMOVED.git-id index f50cefee4a..c3c762917d 100644 --- a/mcs/class/lib/monolite/basic.exe.REMOVED.git-id +++ b/mcs/class/lib/monolite/basic.exe.REMOVED.git-id @@ -1 +1 @@ -18e87f730d98f4e5d611bc2461e5bdef38198632 \ No newline at end of file +46d006d236f4c10e9a0ed316c1d3326340f813f6 \ No newline at end of file diff --git a/mcs/class/lib/monolite/mscorlib.dll.REMOVED.git-id b/mcs/class/lib/monolite/mscorlib.dll.REMOVED.git-id index 92dd80ac4c..c054f6b124 100644 --- a/mcs/class/lib/monolite/mscorlib.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/mscorlib.dll.REMOVED.git-id @@ -1 +1 @@ -df5922d6d7e861e20227e01efcc657ca4fec248b \ No newline at end of file +f21401104ebf90038920793894d7c99d5dda72da \ No newline at end of file diff --git a/mcs/class/referencesource/System.Core/Microsoft/Scripting/Ast/LambdaExpression.cs b/mcs/class/referencesource/System.Core/Microsoft/Scripting/Ast/LambdaExpression.cs index cd275de3c6..3e70f3f8c7 100644 --- a/mcs/class/referencesource/System.Core/Microsoft/Scripting/Ast/LambdaExpression.cs +++ b/mcs/class/referencesource/System.Core/Microsoft/Scripting/Ast/LambdaExpression.cs @@ -139,6 +139,13 @@ namespace System.Linq.Expressions { return LambdaCompiler.Compile(this, debugInfoGenerator); } +#if NETSTANDARD + public Delegate Compile(bool preferInterpretation) { + // TODO: add logic for preferInterpretation + return Compile(); + } +#endif + /// /// Compiles the lambda into a method definition. /// @@ -200,6 +207,13 @@ namespace System.Linq.Expressions { return (TDelegate)(object)LambdaCompiler.Compile(this, debugInfoGenerator); } +#if NETSTANDARD + public new TDelegate Compile(bool preferInterpretation) { + // TODO: add logic for preferInterpretation + return Compile(); + } +#endif + /// /// Creates a new expression that is like this one, but using the /// supplied children. If all of the children are the same, it will diff --git a/mcs/class/referencesource/System.Core/System/Linq/Enumerable.cs.REMOVED.git-id b/mcs/class/referencesource/System.Core/System/Linq/Enumerable.cs.REMOVED.git-id index 1d89f21c13..abc9e5174d 100644 --- a/mcs/class/referencesource/System.Core/System/Linq/Enumerable.cs.REMOVED.git-id +++ b/mcs/class/referencesource/System.Core/System/Linq/Enumerable.cs.REMOVED.git-id @@ -1 +1 @@ -f062ca5e6394c3e981aa5bf8417cf029954e40a0 \ No newline at end of file +373609195c25680febccfacc678a393fa3cfeb06 \ No newline at end of file diff --git a/mcs/class/referencesource/System.Core/System/Security/Cryptography/CngAlgorithm.cs b/mcs/class/referencesource/System.Core/System/Security/Cryptography/CngAlgorithm.cs index bb161cb53f..55e173b354 100644 --- a/mcs/class/referencesource/System.Core/System/Security/Cryptography/CngAlgorithm.cs +++ b/mcs/class/referencesource/System.Core/System/Security/Cryptography/CngAlgorithm.cs @@ -241,5 +241,19 @@ namespace System.Security.Cryptography { return s_sha512; } } + +#if NETSTANDARD + public static CngAlgorithm ECDiffieHellman { + get { + throw new NotImplementedException (); + } + } + + public static CngAlgorithm ECDsa { + get { + throw new NotImplementedException (); + } + } +#endif } } diff --git a/mcs/class/referencesource/System.Core/System/Security/Cryptography/CngKey.cs b/mcs/class/referencesource/System.Core/System/Security/Cryptography/CngKey.cs index 4687087801..2429495c81 100644 --- a/mcs/class/referencesource/System.Core/System/Security/Cryptography/CngKey.cs +++ b/mcs/class/referencesource/System.Core/System/Security/Cryptography/CngKey.cs @@ -32,7 +32,206 @@ namespace System.Security.Cryptography { [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; diff --git a/mcs/class/referencesource/System.Core/System/Security/Cryptography/CngKeyBlobFormat.cs b/mcs/class/referencesource/System.Core/System/Security/Cryptography/CngKeyBlobFormat.cs index d5e9331e57..6592635e85 100644 --- a/mcs/class/referencesource/System.Core/System/Security/Cryptography/CngKeyBlobFormat.cs +++ b/mcs/class/referencesource/System.Core/System/Security/Cryptography/CngKeyBlobFormat.cs @@ -119,6 +119,20 @@ namespace System.Security.Cryptography { } } +#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() != null); diff --git a/mcs/class/referencesource/System.Core/System/Security/Cryptography/ECDsa.cs b/mcs/class/referencesource/System.Core/System/Security/Cryptography/ECDsa.cs index 22fb8b5052..79202306c8 100644 --- a/mcs/class/referencesource/System.Core/System/Security/Cryptography/ECDsa.cs +++ b/mcs/class/referencesource/System.Core/System/Security/Cryptography/ECDsa.cs @@ -41,6 +41,38 @@ namespace System.Security.Cryptography { 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 // diff --git a/mcs/class/referencesource/System.Core/System/Security/Cryptography/ECDsaCng.cs b/mcs/class/referencesource/System.Core/System/Security/Cryptography/ECDsaCng.cs index c1f169ead6..0dea9c70ed 100644 --- a/mcs/class/referencesource/System.Core/System/Security/Cryptography/ECDsaCng.cs +++ b/mcs/class/referencesource/System.Core/System/Security/Cryptography/ECDsaCng.cs @@ -19,6 +19,34 @@ namespace System.Security.Cryptography { [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(); } diff --git a/mcs/class/referencesource/System.Core/System/Security/Cryptography/RsaCng.cs b/mcs/class/referencesource/System.Core/System/Security/Cryptography/RsaCng.cs index 842c40428e..ca5ec3694d 100644 --- a/mcs/class/referencesource/System.Core/System/Security/Cryptography/RsaCng.cs +++ b/mcs/class/referencesource/System.Core/System/Security/Cryptography/RsaCng.cs @@ -11,6 +11,34 @@ namespace System.Security.Cryptography 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(); diff --git a/mcs/class/referencesource/System/net/System/_UncName.cs b/mcs/class/referencesource/System/net/System/_UncName.cs index 39d0c2c0f6..cbe1ea3f70 100644 --- a/mcs/class/referencesource/System/net/System/_UncName.cs +++ b/mcs/class/referencesource/System/net/System/_UncName.cs @@ -55,13 +55,6 @@ namespace System { if (start==end) return false; -#if MONO - if (!Uri.IsWindowsFileSystem) { - if (!(end - start > 2 && name[start] == '\\' && name[start + 1] == '\\')) { - return false; - } - } -#endif // // First segment could consist of only '_' or '-' but it cannot be all digits or empty // diff --git a/mcs/class/referencesource/System/regex/system/text/regularexpressions/Regex.cs b/mcs/class/referencesource/System/regex/system/text/regularexpressions/Regex.cs index 1a2adb1cfd..7b9b1e1911 100644 --- a/mcs/class/referencesource/System/regex/system/text/regularexpressions/Regex.cs +++ b/mcs/class/referencesource/System/regex/system/text/regularexpressions/Regex.cs @@ -471,7 +471,62 @@ namespace System.Text.RegularExpressions { } } } - + +#if NETSTANDARD + protected IDictionary Caps + { + get + { + var dict = new Dictionary(); + + 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(); + + 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 + /// /// /// Returns the options passed into the constructor diff --git a/mcs/class/referencesource/mscorlib/system/AppContext/AppContext.cs b/mcs/class/referencesource/mscorlib/system/AppContext/AppContext.cs index 0b00ff2182..7eaddbf117 100644 --- a/mcs/class/referencesource/mscorlib/system/AppContext/AppContext.cs +++ b/mcs/class/referencesource/mscorlib/system/AppContext/AppContext.cs @@ -34,6 +34,21 @@ namespace System } } +#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() diff --git a/mcs/mcs/assembly.cs b/mcs/mcs/assembly.cs index 8a99e9a397..4c7777a175 100644 --- a/mcs/mcs/assembly.cs +++ b/mcs/mcs/assembly.cs @@ -20,6 +20,7 @@ using System.Security.Cryptography; using System.Security.Permissions; using Mono.Security.Cryptography; using Mono.CompilerServices.SymbolWriter; +using System.Linq; #if STATIC using IKVM.Reflection; @@ -43,6 +44,20 @@ namespace Mono.CSharp byte[] GetPublicKeyToken (); bool IsFriendAssemblyTo (IAssemblyDefinition assembly); } + + public class AssemblyReferenceErrorInfo + { + public AssemblyReferenceErrorInfo (AssemblyName dependencyName, string location, string message) + { + this.DependencyName = dependencyName; + this.RequestingAssemblyLocation = location; + this.Message = message; + } + + public AssemblyName DependencyName { get; private set; } + public string RequestingAssemblyLocation { get; private set; } + public string Message { get; private set; } + } public abstract class AssemblyDefinition : IAssemblyDefinition { @@ -416,7 +431,8 @@ namespace Mono.CSharp // void CheckReferencesPublicToken () { - foreach (var an in builder_extra.GetReferencedAssemblies ()) { + var references = builder_extra.GetReferencedAssemblies (); + foreach (var an in references) { if (public_key != null && an.GetPublicKey ().Length == 0) { Report.Error (1577, "Referenced assembly `{0}' does not have a strong name", an.FullName); @@ -432,11 +448,17 @@ namespace Mono.CSharp if (ia == null) continue; - var references = GetNotUnifiedReferences (an); - if (references != null) { - foreach (var r in references) { - Report.SymbolRelatedToPreviousError ( r[0]); - Report.Error (1705, r [1]); + var an_references = GetNotUnifiedReferences (an); + if (an_references != null) { + foreach (var r in an_references) { + // + // Secondary check when assembly references is resolved but not used. For example + // due to type-forwarding + // + if (references.Any (l => l.Name == r.DependencyName.Name)) { + Report.SymbolRelatedToPreviousError (r.RequestingAssemblyLocation); + Report.Error (1705, r.Message); + } } } @@ -570,7 +592,7 @@ namespace Mono.CSharp return public_key_token; } - protected virtual List GetNotUnifiedReferences (AssemblyName assemblyName) + protected virtual List GetNotUnifiedReferences (AssemblyName assemblyName) { return null; } diff --git a/mcs/mcs/async.cs b/mcs/mcs/async.cs index b3efae3241..39d114fd45 100644 --- a/mcs/mcs/async.cs +++ b/mcs/mcs/async.cs @@ -973,14 +973,17 @@ namespace Mono.CSharp public StackFieldExpr (Field field) : base (field, Location.Null) { + AutomaticallyReuse = true; } + public bool AutomaticallyReuse { get; set; } + public bool IsAvailableForReuse { get { var field = (Field) spec.MemberDefinition; return field.IsAvailableForReuse; } - set { + private set { var field = (Field) spec.MemberDefinition; field.IsAvailableForReuse = value; } @@ -990,7 +993,7 @@ namespace Mono.CSharp { base.AddressOf (ec, mode); - if (mode == AddressOp.Load) { + if (mode == AddressOp.Load && AutomaticallyReuse) { IsAvailableForReuse = true; } } @@ -999,7 +1002,8 @@ namespace Mono.CSharp { base.Emit (ec); - PrepareCleanup (ec); + if (AutomaticallyReuse) + PrepareCleanup (ec); } public void EmitLoad (EmitContext ec) diff --git a/mcs/mcs/class.cs.REMOVED.git-id b/mcs/mcs/class.cs.REMOVED.git-id index 4863bfd52b..79fa8c3acd 100644 --- a/mcs/mcs/class.cs.REMOVED.git-id +++ b/mcs/mcs/class.cs.REMOVED.git-id @@ -1 +1 @@ -8b331dd7c778f49c22197b98267d5bc59cd1200c \ No newline at end of file +0f7ea925d9e3382fab323c3950fb1a16c48a47b5 \ No newline at end of file diff --git a/mcs/mcs/doc.cs b/mcs/mcs/doc.cs index 296faded93..0e5ec22656 100644 --- a/mcs/mcs/doc.cs +++ b/mcs/mcs/doc.cs @@ -290,7 +290,7 @@ namespace Mono.CSharp TypeExpr texpr = left as TypeExpr; if (texpr != null) { - var found = MemberCache.FindNestedType (texpr.Type, mn.Name, mn.Arity); + var found = MemberCache.FindNestedType (texpr.Type, mn.Name, mn.Arity, false); if (found != null) return new TypeExpression (found, Location.Null); diff --git a/mcs/mcs/ecore.cs.REMOVED.git-id b/mcs/mcs/ecore.cs.REMOVED.git-id index 0f2757c8d5..5b09343adb 100644 --- a/mcs/mcs/ecore.cs.REMOVED.git-id +++ b/mcs/mcs/ecore.cs.REMOVED.git-id @@ -1 +1 @@ -4386f93115a197fe081f0e882270c59d29b42df2 \ No newline at end of file +020166ddf94f9f86b0a2c64c968df999e14695e3 \ No newline at end of file diff --git a/mcs/mcs/expression.cs.REMOVED.git-id b/mcs/mcs/expression.cs.REMOVED.git-id index c56f175212..d71e19e50c 100644 --- a/mcs/mcs/expression.cs.REMOVED.git-id +++ b/mcs/mcs/expression.cs.REMOVED.git-id @@ -1 +1 @@ -f805523b76e0a16f41bd3320409ad98aba4cab8e \ No newline at end of file +02ae36b34c16802d921a2476f4a1ab3d750052c3 \ No newline at end of file diff --git a/mcs/mcs/generic.cs b/mcs/mcs/generic.cs index 556a08b852..b34f2dc1ec 100644 --- a/mcs/mcs/generic.cs +++ b/mcs/mcs/generic.cs @@ -1551,7 +1551,7 @@ namespace Mono.CSharp { // Parent was inflated, find the same type on inflated type // to use same cache for nested types on same generic parent // - type = MemberCache.FindNestedType (parent, type.Name, type.Arity); + type = MemberCache.FindNestedType (parent, type.Name, type.Arity, false); // // Handle the tricky case where parent shares local type arguments diff --git a/mcs/mcs/ikvm.cs b/mcs/mcs/ikvm.cs index 1d781cde60..b2cb90a047 100644 --- a/mcs/mcs/ikvm.cs +++ b/mcs/mcs/ikvm.cs @@ -220,7 +220,7 @@ namespace Mono.CSharp return Builder.__AddModule (moduleFile); } - protected override List GetNotUnifiedReferences (AssemblyName assemblyName) + protected override List GetNotUnifiedReferences (AssemblyName assemblyName) { return loader.GetNotUnifiedReferences (assemblyName); } @@ -238,7 +238,7 @@ namespace Mono.CSharp Assembly corlib; readonly List> loaded_names; static readonly Dictionary sdk_directory; - Dictionary> resolved_version_mismatches; + Dictionary> resolved_version_mismatches; static StaticLoader () { @@ -358,25 +358,24 @@ namespace Mono.CSharp if (version_mismatch is AssemblyBuilder) return version_mismatch; - var v1 = new AssemblyName (refname).Version; + var ref_an = new AssemblyName (refname); + var v1 = ref_an.Version; var v2 = version_mismatch.GetName ().Version; if (v1 > v2) { if (resolved_version_mismatches == null) - resolved_version_mismatches = new Dictionary> (); + resolved_version_mismatches = new Dictionary> (); var an = args.RequestingAssembly.GetName (); - List names; + List names; if (!resolved_version_mismatches.TryGetValue (an, out names)) { - names = new List (); + names = new List (); resolved_version_mismatches.Add (an, names); } - names.Add (new[] { - args.RequestingAssembly.Location, + names.Add (new AssemblyReferenceErrorInfo (ref_an, args.RequestingAssembly.Location, string.Format ("Assembly `{0}' depends on `{1}' which has a higher version number than referenced assembly `{2}'", - args.RequestingAssembly.FullName, refname, version_mismatch.GetName ().FullName) - }); + args.RequestingAssembly.FullName, refname, version_mismatch.GetName ().FullName))); return version_mismatch; } @@ -433,9 +432,9 @@ namespace Mono.CSharp return default_references.ToArray (); } - public List GetNotUnifiedReferences (AssemblyName assemblyName) + public List GetNotUnifiedReferences (AssemblyName assemblyName) { - List list = null; + List list = null; if (resolved_version_mismatches != null) resolved_version_mismatches.TryGetValue (assemblyName, out list); diff --git a/mcs/mcs/import.cs b/mcs/mcs/import.cs index d302724c38..60073b9f4c 100644 --- a/mcs/mcs/import.cs +++ b/mcs/mcs/import.cs @@ -814,7 +814,7 @@ namespace Mono.CSharp if (t.Kind == MemberKind.MissingType) spec = t; else - spec = MemberCache.FindNestedType (spec, t.Name, t.Arity); + spec = MemberCache.FindNestedType (spec, t.Name, t.Arity, false); if (t.Arity > 0) { spec = spec.MakeGenericType (module, targs.Skip (targs_pos).Take (spec.Arity).ToArray ()); @@ -834,7 +834,7 @@ namespace Mono.CSharp if (index > 0) name = name.Substring (0, index); - spec = MemberCache.FindNestedType (spec, name, targs.Length - targs_pos); + spec = MemberCache.FindNestedType (spec, name, targs.Length - targs_pos, false); if (spec.Arity > 0) { spec = spec.MakeGenericType (module, targs.Skip (targs_pos).ToArray ()); diff --git a/mcs/mcs/membercache.cs b/mcs/mcs/membercache.cs index 6a555cf325..8ada0a9707 100644 --- a/mcs/mcs/membercache.cs +++ b/mcs/mcs/membercache.cs @@ -465,7 +465,7 @@ namespace Mono.CSharp { // // Finds the nested type in container // - public static TypeSpec FindNestedType (TypeSpec container, string name, int arity) + public static TypeSpec FindNestedType (TypeSpec container, string name, int arity, bool declaredOnlyClass) { IList applicable; TypeSpec best_match = null; @@ -494,7 +494,7 @@ namespace Mono.CSharp { if (arity < 0) { if (best_match == null) { best_match = ts; - } else if (System.Math.Abs (ts.Arity + arity) < System.Math.Abs (ts.Arity + arity)) { + } else if (System.Math.Abs (ts.Arity + arity) < System.Math.Abs (best_match.Arity + arity)) { best_match = ts; } } @@ -502,7 +502,7 @@ namespace Mono.CSharp { } container = container.BaseType; - } while (container != null); + } while (container != null && !declaredOnlyClass); return best_match; } diff --git a/mcs/mcs/namespace.cs b/mcs/mcs/namespace.cs index d81c307ae0..b5379056ee 100644 --- a/mcs/mcs/namespace.cs +++ b/mcs/mcs/namespace.cs @@ -1159,38 +1159,18 @@ namespace Mono.CSharp { if (types_using_table != null) { foreach (var using_type in types_using_table) { - var members = MemberCache.FindMembers (using_type, name, true); - if (members == null) + var type = MemberCache.FindNestedType (using_type, name, arity, true); + if (type == null) continue; + + fne = new TypeExpression (type, loc); + if (match == null) { + match = fne; + continue; + } - foreach (var member in members) { - if (arity > 0 && member.Arity != arity) - continue; - - if ((member.Kind & MemberKind.NestedMask) != 0) { - // non-static nested type is included with using static - } else { - if ((member.Modifiers & Modifiers.STATIC) == 0) - continue; - - if ((member.Modifiers & Modifiers.METHOD_EXTENSION) != 0) - continue; - - if (mode == LookupMode.Normal) - continue; - - return null; - } - - fne = new TypeExpression ((TypeSpec) member, loc); - if (match == null) { - match = fne; - continue; - } - - if (mode == LookupMode.Normal) { - Error_AmbiguousReference (name, match, fne, loc); - } + if (mode == LookupMode.Normal) { + Error_AmbiguousReference (name, match, fne, loc); } } } diff --git a/mcs/mcs/statement.cs.REMOVED.git-id b/mcs/mcs/statement.cs.REMOVED.git-id index 666454480b..03e686a601 100644 --- a/mcs/mcs/statement.cs.REMOVED.git-id +++ b/mcs/mcs/statement.cs.REMOVED.git-id @@ -1 +1 @@ -703e7ba497fef805446a5df389a8fa4f81258816 \ No newline at end of file +ad08d02b5db754d3948bdb8ad9c4b690011c1aff \ No newline at end of file diff --git a/mcs/tests/Makefile b/mcs/tests/Makefile index 10674f5cd9..a149e2eb53 100644 --- a/mcs/tests/Makefile +++ b/mcs/tests/Makefile @@ -98,4 +98,8 @@ csproj-local: setup: $(CSCOMPILE) -t:library dlls/test-679-2/test-679-lib-2.cs $(CSCOMPILE) -t:library dlls/test-679-1/test-679-lib.cs -r:dlls/test-679-2/test-679-lib-2.dll + $(CSCOMPILE) -t:library dlls/test-939-common.cs -keyfile:key.snk -publicsign + $(CSCOMPILE) -t:library dlls/test-939-1/test-939-lib.cs -keyfile:key.snk -publicsign + $(CSCOMPILE) -t:library dlls/test-939-1/test-939-ref.cs -r:dlls/test-939-1/test-939-lib.dll -keyfile:key.snk -publicsign + $(CSCOMPILE) -t:library dlls/test-939-2/test-939-lib.cs -r:dlls/test-939-common.dll -keyfile:key.snk -publicsign $(ILASM) -dll dlls/test-883.il diff --git a/mcs/tests/dlls/test-939-1/test-939-lib.cs b/mcs/tests/dlls/test-939-1/test-939-lib.cs new file mode 100644 index 0000000000..1351652480 --- /dev/null +++ b/mcs/tests/dlls/test-939-1/test-939-lib.cs @@ -0,0 +1,9 @@ +[assembly:System.Reflection.AssemblyVersionAttribute ("2.1.0.0")] + +public class Common +{ + public static void Foo () + { + + } +} diff --git a/mcs/tests/dlls/test-939-1/test-939-ref.cs b/mcs/tests/dlls/test-939-1/test-939-ref.cs new file mode 100644 index 0000000000..580d407a9f --- /dev/null +++ b/mcs/tests/dlls/test-939-1/test-939-ref.cs @@ -0,0 +1,10 @@ +[assembly:System.Reflection.AssemblyVersionAttribute ("4.0.0.0")] + +public class A : Common +{ +} + +public class B +{ + +} diff --git a/mcs/tests/dlls/test-939-2/test-939-lib.cs b/mcs/tests/dlls/test-939-2/test-939-lib.cs new file mode 100644 index 0000000000..b66006890f --- /dev/null +++ b/mcs/tests/dlls/test-939-2/test-939-lib.cs @@ -0,0 +1,5 @@ +using System.Runtime.CompilerServices; + +[assembly:System.Reflection.AssemblyVersionAttribute ("2.0.0.0")] + +[assembly:TypeForwardedTo (typeof (Common))] diff --git a/mcs/tests/dlls/test-939-common.cs b/mcs/tests/dlls/test-939-common.cs new file mode 100644 index 0000000000..a6420bbc12 --- /dev/null +++ b/mcs/tests/dlls/test-939-common.cs @@ -0,0 +1,9 @@ +[assembly:System.Reflection.AssemblyVersionAttribute ("1.0.0.0")] + +public class Common +{ + public static void Foo () + { + + } +} diff --git a/mcs/tests/test-939.cs b/mcs/tests/test-939.cs new file mode 100644 index 0000000000..7d83ddf697 --- /dev/null +++ b/mcs/tests/test-939.cs @@ -0,0 +1,14 @@ +// Compiler options: -r:dlls/test-939-1/test-939-ref.dll -r:dlls/test-939-2/test-939-lib.dll -r:dlls/test-939-common.dll + +class X +{ + public static void Main () + { + } + + static void RealTest () + { + A.Foo (); + new B (); + } +} \ No newline at end of file diff --git a/mcs/tests/test-async-87.cs b/mcs/tests/test-async-87.cs new file mode 100644 index 0000000000..d973ba1974 --- /dev/null +++ b/mcs/tests/test-async-87.cs @@ -0,0 +1,55 @@ +using System; +using System.Threading.Tasks; + +class CA +{ + public CB CB { get; set; } + public DeviceDetails DeviceDetails { get; set; } +} + +class CB +{ + public CB (string arg) + { + } +} + +class DeviceDetails +{ + public DeviceDetails (string arg) + { + } +} + +class BB +{ + public Task GetUser() + { + return Task.FromResult ("aa"); + } + + public Task GetDevice() + { + return Task.FromResult ("bb"); + } +} + +class X +{ + BB bb = new BB (); + + public async Task GetCAAsync() + { + return new CA + { + CB = new CB(await bb.GetUser()), + DeviceDetails = new DeviceDetails(await bb.GetDevice()) + }; + } + + static void Main () + { + var x = new X (); + x.GetCAAsync ().Wait (); + } +} \ No newline at end of file diff --git a/mcs/tests/test-static-using-12.cs b/mcs/tests/test-static-using-12.cs new file mode 100644 index 0000000000..8d1708509a --- /dev/null +++ b/mcs/tests/test-static-using-12.cs @@ -0,0 +1,24 @@ +namespace A.B +{ + public static class G + { + public class DD + { + } + + public static object Dock () => null; + } +} + +namespace N2 +{ + using static A.B.G; + + class M : DD + { + public static void Main () + { + Dock (); + } + } +} diff --git a/mcs/tests/ver-il-net_4_x.xml.REMOVED.git-id b/mcs/tests/ver-il-net_4_x.xml.REMOVED.git-id index 6ac88ae55a..51a5838ac9 100644 --- a/mcs/tests/ver-il-net_4_x.xml.REMOVED.git-id +++ b/mcs/tests/ver-il-net_4_x.xml.REMOVED.git-id @@ -1 +1 @@ -c705efa9a031fbfcd360998fccab5c8d635e52ed \ No newline at end of file +2a519f077e32487fd84bbb5ea835758cd42cb85d \ No newline at end of file diff --git a/mcs/tools/mkbundle/mkbundle.cs b/mcs/tools/mkbundle/mkbundle.cs index 9f75c85749..86a7132bbc 100755 --- a/mcs/tools/mkbundle/mkbundle.cs +++ b/mcs/tools/mkbundle/mkbundle.cs @@ -256,10 +256,30 @@ class MakeBundle { } + if (fetch_target != null){ + var truntime = Path.Combine (targets_dir, fetch_target, "mono"); + Directory.CreateDirectory (Path.GetDirectoryName (truntime)); + var wc = new WebClient (); + var uri = new Uri ($"{target_server}{fetch_target}"); + try { + if (!quiet){ + Console.WriteLine ($"Downloading runtime {uri} to {truntime}"); + } + + wc.DownloadFile (uri, truntime); + } catch { + Console.Error.WriteLine ($"Failure to download the specified runtime from {uri}"); + File.Delete (truntime); + return 1; + } + return 0; + } + if (!quiet) { Console.WriteLine (os_message); Console.WriteLine ("Sources: {0} Auto-dependencies: {1}", sources.Count, autodeps); } + if (sources.Count == 0 || output == null) { Help (); Environment.Exit (1); @@ -271,33 +291,31 @@ class MakeBundle { if (!QueueAssembly (files, file)) return 1; - if (fetch_target != null){ - var truntime = Path.Combine (targets_dir, fetch_target, "mono"); - Directory.CreateDirectory (Path.GetDirectoryName (truntime)); - var wc = new WebClient (); - var uri = new Uri ($"{target_server}{fetch_target}"); - try { - wc.DownloadFile (uri, truntime); - } catch { - Console.Error.WriteLine ($"Failure to download the specified runtime from {uri}"); - File.Delete (truntime); - return 1; - } - return 0; - } - if (custom_mode) GenerateBundles (files); else { if (cross_target == "default") runtime = null; else { - var truntime = Path.Combine (targets_dir, cross_target, "mono"); - if (!File.Exists (truntime)){ - Console.Error.WriteLine ($"The runtime for the {cross_target} does not exist, use --fetch-target {cross_target} to download first"); - return 1; + if (runtime == null){ + if (cross_target == null){ + Console.Error.WriteLine ("you should specify either a --runtime or a --cross compilation target"); + Environment.Exit (1); + } + runtime = Path.Combine (targets_dir, cross_target, "mono"); + if (!File.Exists (runtime)){ + Console.Error.WriteLine ($"The runtime for the {cross_target} does not exist, use --fetch-target {cross_target} to download first"); + return 1; + } + } else { + if (!File.Exists (runtime)){ + Console.Error.WriteLine ($"The Mono runtime specified with --runtime does not exist"); + return 1; + } } - } + + Console.WriteLine ("Using runtime {0}", runtime); + } GeneratePackage (files); } diff --git a/mcs/tools/mono-symbolicate/StackFrameData.cs b/mcs/tools/mono-symbolicate/StackFrameData.cs index ed5134709c..0177fcd610 100644 --- a/mcs/tools/mono-symbolicate/StackFrameData.cs +++ b/mcs/tools/mono-symbolicate/StackFrameData.cs @@ -6,7 +6,7 @@ namespace Mono { class StackFrameData { - static Regex regex = new Regex (@"\w*at (?.+) *(\[0x(?.+)\]|<0x.+ \+ 0x(?.+)>( (?\d+)|)) in :0"); + static Regex regex = new Regex (@"\w*at (?.+) *(\[0x(?.+)\]|<0x.+ \+ 0x(?.+)>( (?\d+)|)) in <(?[^>#]+)(#(?[^>]+)|)>:0"); public readonly string TypeFullName; public readonly string MethodSignature; @@ -14,13 +14,13 @@ namespace Mono public readonly bool IsILOffset; public readonly uint MethodIndex; public readonly string Line; - - public readonly bool IsValid; + public readonly string Mvid; + public readonly string Aotid; public string File { get; private set; } public int LineNumber { get; private set; } - private StackFrameData (string line, string typeFullName, string methodSig, int offset, bool isILOffset, uint methodIndex) + private StackFrameData (string line, string typeFullName, string methodSig, int offset, bool isILOffset, uint methodIndex, string mvid, string aotid) { LineNumber = -1; @@ -30,15 +30,8 @@ namespace Mono Offset = offset; IsILOffset = isILOffset; MethodIndex = methodIndex; - - IsValid = true; - } - - private StackFrameData (string line) - { - LineNumber = -1; - - Line = line; + Mvid = mvid; + Aotid = aotid; } public static bool TryParse (string line, out StackFrameData stackFrame) @@ -46,13 +39,8 @@ namespace Mono stackFrame = null; var match = regex.Match (line); - if (!match.Success) { - if (line.Trim ().StartsWith ("at ", StringComparison.InvariantCulture)) { - stackFrame = new StackFrameData (line); - return true; - } + if (!match.Success) return false; - } string typeFullName, methodSignature; var methodStr = match.Groups ["Method"].Value.Trim (); @@ -67,7 +55,10 @@ namespace Mono if (!string.IsNullOrEmpty (match.Groups ["MethodIndex"].Value)) methodIndex = uint.Parse (match.Groups ["MethodIndex"].Value, CultureInfo.InvariantCulture); - stackFrame = new StackFrameData (line, typeFullName, methodSignature, offset, isILOffset, methodIndex); + var mvid = match.Groups ["MVID"].Value; + var aotid = match.Groups ["AOTID"].Value; + + stackFrame = new StackFrameData (line, typeFullName, methodSignature, offset, isILOffset, methodIndex, mvid, aotid); return true; } @@ -106,11 +97,9 @@ namespace Mono LineNumber = lineNumber; } - public override string ToString () { - if (Line.Contains (":0") && LineNumber != -1) - return Line.Replace (":0", string.Format ("{0}:{1}", File, LineNumber)); - - return Line; + public override string ToString () + { + return string.Format ("{0} in {1}:{2} ", Line.Substring (0, Line.IndexOf(" in <", StringComparison.Ordinal)), File, LineNumber); } } } diff --git a/mcs/tools/mono-symbolicate/StackTraceMetadata.cs b/mcs/tools/mono-symbolicate/StackTraceMetadata.cs deleted file mode 100644 index 4aa4753232..0000000000 --- a/mcs/tools/mono-symbolicate/StackTraceMetadata.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Text.RegularExpressions; - -namespace Mono -{ - class StackTraceMetadata - { - static Regex regex = new Regex (@"\[(?.+)\] (?.+)"); - - public readonly string Id; - public readonly string Value; - public readonly string Line; - - private StackTraceMetadata (string line, string id, string val) - { - Line = line; - Id = id; - Value = val; - } - - public static bool TryParse (string line, out StackTraceMetadata metadata) - { - metadata = null; - - var match = regex.Match (line); - if (!match.Success) - return false; - - string id = match.Groups ["Id"].Value; - string val = match.Groups ["Value"].Value; - - metadata = new StackTraceMetadata (line, id, val); - - return true; - } - } -} diff --git a/mcs/tools/mono-symbolicate/SymbolManager.cs b/mcs/tools/mono-symbolicate/SymbolManager.cs index 42990e5325..734aa3a166 100644 --- a/mcs/tools/mono-symbolicate/SymbolManager.cs +++ b/mcs/tools/mono-symbolicate/SymbolManager.cs @@ -19,18 +19,18 @@ namespace Mono this.logger = logger; } - internal bool TryResolveLocation (StackFrameData sfData, string mvid, string aotid) + internal bool TryResolveLocation (StackFrameData sfData) { - if (mvid == null) + if (sfData.Mvid == null) return false; - var assemblyLocProvider = GetOrCreateAssemblyLocationProvider (mvid); + var assemblyLocProvider = GetOrCreateAssemblyLocationProvider (sfData.Mvid); if (assemblyLocProvider == null) return false; SeqPointInfo seqPointInfo = null; - if (!sfData.IsILOffset && aotid != null) - seqPointInfo = GetOrCreateSeqPointInfo (aotid); + if (!sfData.IsILOffset && sfData.Aotid != null) + seqPointInfo = GetOrCreateSeqPointInfo (sfData.Aotid); return assemblyLocProvider.TryResolveLocation (sfData, seqPointInfo); } diff --git a/mcs/tools/mono-symbolicate/mono-symbolicate.exe.sources b/mcs/tools/mono-symbolicate/mono-symbolicate.exe.sources index daa4ebfb64..6cb8042e9c 100644 --- a/mcs/tools/mono-symbolicate/mono-symbolicate.exe.sources +++ b/mcs/tools/mono-symbolicate/mono-symbolicate.exe.sources @@ -2,7 +2,6 @@ symbolicate.cs LocationProvider.cs SeqPointInfo.cs StackFrameData.cs -StackTraceMetadata.cs SymbolManager.cs Logger.cs ../../class/Mono.Options/Mono.Options/Options.cs diff --git a/mcs/tools/mono-symbolicate/symbolicate.cs b/mcs/tools/mono-symbolicate/symbolicate.cs index 78b6945f14..2c04a27eef 100644 --- a/mcs/tools/mono-symbolicate/symbolicate.cs +++ b/mcs/tools/mono-symbolicate/symbolicate.cs @@ -80,8 +80,16 @@ namespace Mono var symbolManager = new SymbolManager (msymDir, logger); using (StreamReader r = new StreamReader (inputFile)) { - var sb = Process (r, symbolManager); - Console.Write (sb.ToString ()); + for (var line = r.ReadLine (); line != null; line = r.ReadLine ()) { + StackFrameData sfData; + if (StackFrameData.TryParse (line, out sfData) && + symbolManager.TryResolveLocation (sfData)) { + Console.WriteLine (sfData.ToString ()); + continue; + } + + Console.WriteLine (line); + } } } @@ -94,88 +102,5 @@ namespace Mono symbolManager.StoreSymbols (lookupDirs); } - - public static StringBuilder Process (StreamReader reader, SymbolManager symbolManager) - { - List stackFrames = new List(); - List metadata = new List(); - StringBuilder sb = new StringBuilder (); - bool linesEnded = false; - - for (var line = reader.ReadLine (); line != null; line = reader.ReadLine ()) { - StackFrameData sfData; - if (!linesEnded && StackFrameData.TryParse (line, out sfData)) { - stackFrames.Add (sfData); - continue; - } - - if (stackFrames.Count > 0) { - linesEnded = true; - - StackTraceMetadata stMetadata; - if (StackTraceMetadata.TryParse (line, out stMetadata)) { - metadata.Add (stMetadata); - continue; - } - - DumpStackTrace (symbolManager, sb, stackFrames, metadata); - - // Clear lists for next stack trace - stackFrames.Clear (); - metadata.Clear (); - } - - linesEnded = false; - - // Append last line - sb.AppendLine (line); - } - - if (stackFrames.Count > 0) - DumpStackTrace (symbolManager, sb, stackFrames, metadata); - - return sb; - } - - private static void DumpStackTrace (SymbolManager symbolManager, StringBuilder sb, List stackFrames, List metadata) - { - string aotid = null; - var aotidMetadata = metadata.FirstOrDefault ( m => m.Id == "AOTID" ); - if (aotidMetadata != null) - aotid = aotidMetadata.Value; - - var linesMvid = ProcessLinesMVID (metadata); - var lineNumber = -1; - foreach (var sfData in stackFrames) { - string mvid = null; - lineNumber++; - if (!sfData.IsValid) - continue; - if (linesMvid.ContainsKey (lineNumber)) - mvid = linesMvid [lineNumber]; - - symbolManager.TryResolveLocation (sfData, mvid, aotid); - - sb.AppendLine (sfData.ToString ()); - } - - foreach (var m in metadata) - sb.AppendLine (m.Line); - } - - private static Dictionary ProcessLinesMVID (List metadata) - { - var linesMvid = new Dictionary (); - var mvidData = metadata.Where ( m => m.Id == "MVID" ).Select ( m => m.Value ); - foreach (var m in mvidData) { - var s1 = m.Split (new char[] {' '}, 2); - var mvid = s1 [0]; - var lines = s1 [1].Split (','); - foreach (var line in lines) - linesMvid.Add (int.Parse (line), mvid); - } - - return linesMvid; - } } } diff --git a/mono/metadata/reflection.c.REMOVED.git-id b/mono/metadata/reflection.c.REMOVED.git-id index 63dbc74988..b1c2ea89ff 100644 --- a/mono/metadata/reflection.c.REMOVED.git-id +++ b/mono/metadata/reflection.c.REMOVED.git-id @@ -1 +1 @@ -86ddead705be331233d7cfe59820943b3583a497 \ No newline at end of file +9fbac024ad6e85933d31c735232b407130f89f93 \ No newline at end of file diff --git a/mono/mini/Makefile.am b/mono/mini/Makefile.am index 41c0367285..4ad67f1853 100644 --- a/mono/mini/Makefile.am +++ b/mono/mini/Makefile.am @@ -824,7 +824,7 @@ EXTRA_DIST = TestDriver.cs \ Makefile.am.in version.h: Makefile - echo "#define FULL_VERSION \"Stable 4.6.0.127/0cb79a3\"" > version.h + echo "#define FULL_VERSION \"Stable 4.6.0.150/d0fc1a6\"" > version.h # Utility target for patching libtool to speed up linking patch-libtool: diff --git a/mono/mini/Makefile.am.in b/mono/mini/Makefile.am.in index 41c0367285..4ad67f1853 100755 --- a/mono/mini/Makefile.am.in +++ b/mono/mini/Makefile.am.in @@ -824,7 +824,7 @@ EXTRA_DIST = TestDriver.cs \ Makefile.am.in version.h: Makefile - echo "#define FULL_VERSION \"Stable 4.6.0.127/0cb79a3\"" > version.h + echo "#define FULL_VERSION \"Stable 4.6.0.150/d0fc1a6\"" > version.h # Utility target for patching libtool to speed up linking patch-libtool: diff --git a/mono/mini/Makefile.in.REMOVED.git-id b/mono/mini/Makefile.in.REMOVED.git-id index 97872149bd..5d104a262a 100644 --- a/mono/mini/Makefile.in.REMOVED.git-id +++ b/mono/mini/Makefile.in.REMOVED.git-id @@ -1 +1 @@ -c1e1b34c9105e7efd98ab45e605956855423163d \ No newline at end of file +8661c97fc5b49dd62fa3c458b6a8636dacd3a88d \ No newline at end of file diff --git a/mono/mini/version.h b/mono/mini/version.h index 2e5218ba40..80b0370f33 100644 --- a/mono/mini/version.h +++ b/mono/mini/version.h @@ -1 +1 @@ -#define FULL_VERSION "Stable 4.6.0.127/0cb79a3" +#define FULL_VERSION "Stable 4.6.0.150/d0fc1a6" diff --git a/mono/tests/pinvoke3.cs b/mono/tests/pinvoke3.cs index 29ed8ea7ee..8d5cfb619f 100644 --- a/mono/tests/pinvoke3.cs +++ b/mono/tests/pinvoke3.cs @@ -1105,6 +1105,49 @@ public class Tests { 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 */ diff --git a/mono/utils/mono-threads-state-machine.c b/mono/utils/mono-threads-state-machine.c index 43df55e535..9792d5dbe2 100644 --- a/mono/utils/mono-threads-state-machine.c +++ b/mono/utils/mono-threads-state-machine.c @@ -282,7 +282,7 @@ MonoSelfSupendResult 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); diff --git a/mono/utils/mono-threads.c b/mono/utils/mono-threads.c index a92d250b29..bf2f273b68 100644 --- a/mono/utils/mono-threads.c +++ b/mono/utils/mono-threads.c @@ -398,6 +398,8 @@ unregister_thread (void *arg) 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; @@ -633,6 +635,20 @@ mono_thread_info_is_exiting (void) 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) { @@ -643,7 +659,7 @@ 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 @@ -1010,6 +1026,8 @@ static void 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); diff --git a/po/mcs/de.gmo b/po/mcs/de.gmo index 9dc9bc47c854d4612814b7aa21ace1bdde3b08c5..17cbf6b30e52b7fd9f650a8b57068dcdd215b90b 100644 GIT binary patch delta 17 YcmbQIHBW293oaHTD^ttOZ@7%O06RGa_5c6? delta 17 YcmbQIHBW293oaHzD-)y5Z@7%O06PB#?EnA( diff --git a/po/mcs/de.po.REMOVED.git-id b/po/mcs/de.po.REMOVED.git-id index 69eb022897..533914368d 100644 --- a/po/mcs/de.po.REMOVED.git-id +++ b/po/mcs/de.po.REMOVED.git-id @@ -1 +1 @@ -a5fa7f57500eb517b69201d0425707279f2c2728 \ No newline at end of file +3ebcc9e1ccbf6cd0ea471eb0268f6c61dbd51687 \ No newline at end of file diff --git a/po/mcs/es.gmo b/po/mcs/es.gmo index 2b5f4d82406fb483fb0c05c09547cbb092c4bc04..8181b728e5b616b3ce1bc6c84447da6752ccf83e 100644 GIT binary patch delta 17 YcmX?Ef3kjqp(2Zsm8s=sQ^hHA06{qhEC2ui delta 17 YcmX?Ef3kjqp(2Z+m5I@2Q^hHA06_l+BLDyZ diff --git a/po/mcs/es.po.REMOVED.git-id b/po/mcs/es.po.REMOVED.git-id index e32e74e154..75fd2af5af 100644 --- a/po/mcs/es.po.REMOVED.git-id +++ b/po/mcs/es.po.REMOVED.git-id @@ -1 +1 @@ -49fcfee1c19c6f4a61ad9617b3726619ca931b3a \ No newline at end of file +429a8dc6c8059014afff38b8bd08148e445294f1 \ No newline at end of file diff --git a/po/mcs/ja.gmo b/po/mcs/ja.gmo index 7845d2b13b6efee42bdb581ce7942ada581f7941..de7690142cc9dd1a5dec30142571b62d465a5805 100644 GIT binary patch delta 19 acmeyri1Gg-#tq!+EJjwQmYez23$y@E&jyG9 delta 19 acmeyri1Gg-#tq!+EQVGlMw|K73$y@El?HzR diff --git a/po/mcs/ja.po.REMOVED.git-id b/po/mcs/ja.po.REMOVED.git-id index feb6dcb8a9..be6fce94de 100644 --- a/po/mcs/ja.po.REMOVED.git-id +++ b/po/mcs/ja.po.REMOVED.git-id @@ -1 +1 @@ -318e04cf52f39ef2cdc660759d8d0204cb84032e \ No newline at end of file +90836edcd4a8e340316dbd73d952efab58cf2da4 \ No newline at end of file diff --git a/po/mcs/mcs.pot b/po/mcs/mcs.pot index bd7b335fe5..2b47c7ea7d 100644 --- a/po/mcs/mcs.pot +++ b/po/mcs/mcs.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: mono 4.6.0\n" "Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n" -"POT-Creation-Date: 2016-08-23 11:42+0000\n" +"POT-Creation-Date: 2016-08-23 12:59+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -135,67 +135,67 @@ msgstr "" msgid "Cannot assign to `{0}' because it is a `{1}'" msgstr "" -#: mcs/mcs/assembly.cs:211 +#: mcs/mcs/assembly.cs:226 msgid "" "Executables cannot be satellite assemblies. Remove the attribute or keep it " "empty" msgstr "" -#: mcs/mcs/assembly.cs:235 +#: mcs/mcs/assembly.cs:250 #, csharp-format msgid "" "The specified version string `{0}' does not conform to the required format - " "major[.minor[.build[.revision]]]" msgstr "" -#: mcs/mcs/assembly.cs:289 +#: mcs/mcs/assembly.cs:304 msgid "Invalid type specified as an argument for TypeForwardedTo attribute" msgstr "" -#: mcs/mcs/assembly.cs:297 -#, csharp-format -msgid "A duplicate type forward of type `{0}'" -msgstr "" - -#: mcs/mcs/assembly.cs:306 -#, csharp-format -msgid "Cannot forward type `{0}' because it is defined in this assembly" -msgstr "" - #: mcs/mcs/assembly.cs:312 #, csharp-format +msgid "A duplicate type forward of type `{0}'" +msgstr "" + +#: mcs/mcs/assembly.cs:321 +#, csharp-format +msgid "Cannot forward type `{0}' because it is defined in this assembly" +msgstr "" + +#: mcs/mcs/assembly.cs:327 +#, csharp-format msgid "Cannot forward type `{0}' because it is a nested type" msgstr "" -#: mcs/mcs/assembly.cs:329 +#: mcs/mcs/assembly.cs:344 msgid "Friend assembly reference cannot have `null' value" msgstr "" -#: mcs/mcs/assembly.cs:346 +#: mcs/mcs/assembly.cs:361 #, csharp-format msgid "" "Friend assembly reference `{0}' is invalid. InternalsVisibleTo declarations " "cannot have a version, culture or processor architecture specified" msgstr "" -#: mcs/mcs/assembly.cs:354 +#: mcs/mcs/assembly.cs:369 #, csharp-format msgid "" "Friend assembly reference `{0}' is invalid. Strong named assemblies must " "specify a public key in their InternalsVisibleTo declarations" msgstr "" -#: mcs/mcs/assembly.cs:421 +#: mcs/mcs/assembly.cs:437 #, csharp-format msgid "Referenced assembly `{0}' does not have a strong name" msgstr "" -#: mcs/mcs/assembly.cs:427 +#: mcs/mcs/assembly.cs:443 #, csharp-format msgid "Referenced assembly `{0}' has different culture setting of `{1}'" msgstr "" -#: mcs/mcs/assembly.cs:454 +#: mcs/mcs/assembly.cs:476 #, csharp-format msgid "" "Friend access was granted to `{0}', but the output assembly is named `{1}'. " @@ -203,95 +203,95 @@ msgid "" "it" msgstr "" -#: mcs/mcs/assembly.cs:468 +#: mcs/mcs/assembly.cs:490 msgid "" "Could not sign the assembly. ECMA key can only be used to delay-sign " "assemblies" msgstr "" -#: mcs/mcs/assembly.cs:727 +#: mcs/mcs/assembly.cs:749 msgid "" "Added modules must be marked with the CLSCompliant attribute to match the " "assembly" msgstr "" -#: mcs/mcs/assembly.cs:762 mcs/mcs/assembly.cs:777 +#: mcs/mcs/assembly.cs:784 mcs/mcs/assembly.cs:799 #, csharp-format msgid "" "Option `{0}' overrides attribute `{1}' given in a source file or added module" msgstr "" -#: mcs/mcs/assembly.cs:812 +#: mcs/mcs/assembly.cs:834 msgid "Delay signing was requested but no key file was given" msgstr "" -#: mcs/mcs/assembly.cs:837 +#: mcs/mcs/assembly.cs:859 msgid "Cannot link resource file when building a module" msgstr "" -#: mcs/mcs/assembly.cs:842 mcs/mcs/module.cs:752 +#: mcs/mcs/assembly.cs:864 mcs/mcs/module.cs:752 #, csharp-format msgid "Error reading resource file `{0}'" msgstr "" -#: mcs/mcs/assembly.cs:912 +#: mcs/mcs/assembly.cs:934 #, csharp-format msgid "Output file `{0}' exceeds the 4GB limit" msgstr "" -#: mcs/mcs/assembly.cs:914 +#: mcs/mcs/assembly.cs:936 #, csharp-format msgid "Could not write to file `{0}'. {1}" msgstr "" -#: mcs/mcs/assembly.cs:958 +#: mcs/mcs/assembly.cs:980 msgid "Cannot specify -main if building a module or library" msgstr "" -#: mcs/mcs/assembly.cs:984 +#: mcs/mcs/assembly.cs:1006 #, csharp-format msgid "Could not find `{0}' specified for Main method" msgstr "" -#: mcs/mcs/assembly.cs:990 +#: mcs/mcs/assembly.cs:1012 #, csharp-format msgid "`{0}' specified for Main method must be a valid class or struct" msgstr "" -#: mcs/mcs/assembly.cs:994 +#: mcs/mcs/assembly.cs:1016 #, csharp-format msgid "`{0}' does not have a suitable static Main method" msgstr "" -#: mcs/mcs/assembly.cs:997 +#: mcs/mcs/assembly.cs:1019 #, csharp-format msgid "" "Program `{0}' does not contain a static `Main' method suitable for an entry " "point" msgstr "" -#: mcs/mcs/assembly.cs:1016 +#: mcs/mcs/assembly.cs:1038 msgid "Error during assembly signing. " msgstr "" -#: mcs/mcs/assembly.cs:1206 +#: mcs/mcs/assembly.cs:1228 #, csharp-format msgid "Metadata file `{0}' could not be found" msgstr "" -#: mcs/mcs/assembly.cs:1211 +#: mcs/mcs/assembly.cs:1233 #, csharp-format msgid "Metadata file `{0}' does not contain valid metadata" msgstr "" -#: mcs/mcs/assembly.cs:1217 +#: mcs/mcs/assembly.cs:1239 #, csharp-format msgid "" "Referenced assembly file `{0}' is a module. Consider using `-addmodule' " "option to add the module" msgstr "" -#: mcs/mcs/assembly.cs:1224 +#: mcs/mcs/assembly.cs:1246 #, csharp-format msgid "" "Added module file `{0}' is an assembly. Consider using `-r' option to " @@ -2288,11 +2288,11 @@ msgid "" "Object and collection initializers cannot be used to instantiate a delegate" msgstr "" -#: mcs/mcs/expression.cs:12386 +#: mcs/mcs/expression.cs:12387 msgid "Anonymous types cannot be used in this expression" msgstr "" -#: mcs/mcs/expression.cs:12480 +#: mcs/mcs/expression.cs:12481 #, csharp-format msgid "An anonymous type property `{0}' cannot be initialized with `{1}'" msgstr "" @@ -2585,28 +2585,28 @@ msgstr "" msgid "SDK path could not be resolved" msgstr "" -#: mcs/mcs/ikvm.cs:387 mcs/mcs/ikvm.cs:391 +#: mcs/mcs/ikvm.cs:386 mcs/mcs/ikvm.cs:390 #, csharp-format msgid "" "Assuming assembly reference `{0}' matches assembly `{1}'. You may need to " "supply runtime policy" msgstr "" -#: mcs/mcs/ikvm.cs:499 +#: mcs/mcs/ikvm.cs:498 #, csharp-format msgid "" "An assembly with the same name `{0}' has already been imported. Consider " "removing one of the references or sign the assembly" msgstr "" -#: mcs/mcs/ikvm.cs:508 +#: mcs/mcs/ikvm.cs:507 #, csharp-format msgid "" "An assembly `{0}' with the same identity has already been imported. Consider " "removing one of the references" msgstr "" -#: mcs/mcs/ikvm.cs:627 +#: mcs/mcs/ikvm.cs:626 #, csharp-format msgid "Error opening icon file `{0}'. {1}" msgstr "" @@ -3069,21 +3069,21 @@ msgstr "" msgid "Namespace `{0}' contains a definition with same name as alias `{1}'" msgstr "" -#: mcs/mcs/namespace.cs:1450 +#: mcs/mcs/namespace.cs:1430 #, csharp-format msgid "" "A `using' directive can only be applied to namespaces but `{0}' denotes a " "type. Consider using a `using static' instead" msgstr "" -#: mcs/mcs/namespace.cs:1474 +#: mcs/mcs/namespace.cs:1454 #, csharp-format msgid "" "A 'using static' directive can only be applied to types but `{0}' denotes a " "namespace. Consider using a `using' directive instead" msgstr "" -#: mcs/mcs/namespace.cs:1555 +#: mcs/mcs/namespace.cs:1535 #, csharp-format msgid "The extern alias `{0}' was not specified in -reference option" msgstr "" @@ -3613,28 +3613,28 @@ msgid "" "clause" msgstr "" -#: mcs/mcs/statement.cs:7326 +#: mcs/mcs/statement.cs:7327 #, csharp-format msgid "" "A previous catch clause already catches all exceptions of this or a super " "type `{0}'" msgstr "" -#: mcs/mcs/statement.cs:7559 +#: mcs/mcs/statement.cs:7560 #, csharp-format msgid "" "`{0}': type used in a using statement must be implicitly convertible to " "`System.IDisposable'" msgstr "" -#: mcs/mcs/statement.cs:7975 +#: mcs/mcs/statement.cs:7976 #, csharp-format msgid "" "foreach statement requires that the return type `{0}' of `{1}' must have a " "suitable public MoveNext method and public Current property" msgstr "" -#: mcs/mcs/statement.cs:8019 +#: mcs/mcs/statement.cs:8020 #, csharp-format msgid "" "foreach statement cannot operate on variables of type `{0}' because it " @@ -3642,18 +3642,18 @@ msgid "" "implementation" msgstr "" -#: mcs/mcs/statement.cs:8041 +#: mcs/mcs/statement.cs:8042 #, csharp-format msgid "" "foreach statement cannot operate on variables of type `{0}' because it does " "not contain a definition for `{1}' or is inaccessible" msgstr "" -#: mcs/mcs/statement.cs:8279 +#: mcs/mcs/statement.cs:8280 msgid "Use of null is not valid in this context" msgstr "" -#: mcs/mcs/statement.cs:8291 +#: mcs/mcs/statement.cs:8292 #, csharp-format msgid "Foreach statement cannot operate on a `{0}'" msgstr "" diff --git a/po/mcs/pt_BR.gmo b/po/mcs/pt_BR.gmo index 199f370cca9ebdc1756f616d388ebbe0a3e960e9..28343e7993eb09d17c73872158137544329713f2 100644 GIT binary patch delta 19 bcmX@Po8{zgmJPDgSd6SpEjKGpThR^xQvwI; delta 19 bcmX@Po8{zgmJPDgSPZR9j5aGyThR^xQpgA5 diff --git a/po/mcs/pt_BR.po.REMOVED.git-id b/po/mcs/pt_BR.po.REMOVED.git-id index 643baa887d..3cae017360 100644 --- a/po/mcs/pt_BR.po.REMOVED.git-id +++ b/po/mcs/pt_BR.po.REMOVED.git-id @@ -1 +1 @@ -c3d8c6ce02798b4cf7384d5838390c3de2c4c6e6 \ No newline at end of file +b290a26e9128197f2e41f703eee21775d96890cc \ No newline at end of file