From c603ce5df522377a7696958d86a76b6ad29fc188 Mon Sep 17 00:00:00 2001 From: Marek Safar Date: Tue, 15 Aug 2017 23:14:36 +0200 Subject: [PATCH] netstandard dependant facades update after 2.0 release (#5371) --- external/api-snapshot | 2 +- .../System.Data.SqlClient/TypeForwarders.cs | 1 + .../TypeForwarders.cs | 2 ++ .../TypeForwarders.cs | 1 + .../SafeNCryptHandle.cs | 6 ++++ .../SafeNCryptKeyHandle.cs | 8 +++++ .../common_System.Core.dll.sources | 1 + .../net_4_x_System.Core.dll.sources | 1 - .../System/Security/Cryptography/ECDsaCng.cs | 34 +++++++++++++++++++ tools/nuget-hash-extractor/Makefile | 5 ++- tools/nuget-hash-extractor/download.sh | 17 ++++++---- 11 files changed, 68 insertions(+), 10 deletions(-) diff --git a/external/api-snapshot b/external/api-snapshot index 2563306d41f..bf03a7c5cf6 160000 --- a/external/api-snapshot +++ b/external/api-snapshot @@ -1 +1 @@ -Subproject commit 2563306d41f7f7fa30421c629d0f3b60b08b1169 +Subproject commit bf03a7c5cf6b692fa662f1568ad66de35166b8ea diff --git a/mcs/class/Facades/System.Data.SqlClient/TypeForwarders.cs b/mcs/class/Facades/System.Data.SqlClient/TypeForwarders.cs index d8f7bb5be56..fa807fa7aa2 100644 --- a/mcs/class/Facades/System.Data.SqlClient/TypeForwarders.cs +++ b/mcs/class/Facades/System.Data.SqlClient/TypeForwarders.cs @@ -30,6 +30,7 @@ [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlBulkCopyColumnMappingCollection))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlBulkCopyOptions))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlClientFactory))] +[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlClientMetaDataCollectionNames))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlCommand))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlConnection))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlConnectionStringBuilder))] diff --git a/mcs/class/Facades/System.Security.Cryptography.Cng/TypeForwarders.cs b/mcs/class/Facades/System.Security.Cryptography.Cng/TypeForwarders.cs index 309d6fb5ce3..ade174b59d5 100644 --- a/mcs/class/Facades/System.Security.Cryptography.Cng/TypeForwarders.cs +++ b/mcs/class/Facades/System.Security.Cryptography.Cng/TypeForwarders.cs @@ -41,6 +41,8 @@ [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngProvider))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngUIPolicy))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngUIProtectionLevels))] +// TODO: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.DSACng))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ECDsaCng))] +[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ECKeyXmlFormat))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSACng))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.TripleDESCng))] diff --git a/mcs/class/Facades/System.ServiceModel.Http/TypeForwarders.cs b/mcs/class/Facades/System.ServiceModel.Http/TypeForwarders.cs index 4aa28e9e49f..597267838d2 100644 --- a/mcs/class/Facades/System.ServiceModel.Http/TypeForwarders.cs +++ b/mcs/class/Facades/System.ServiceModel.Http/TypeForwarders.cs @@ -36,6 +36,7 @@ [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.WebSocketTransportUsage))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.HttpBindingBase))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.HttpClientCredentialType))] +[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.HttpProxyCredentialType))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.HttpTransportSecurity))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.NetHttpBinding))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.NetHttpsBinding))] diff --git a/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptHandle.cs b/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptHandle.cs index cbf1491612f..da4d7f36b9e 100644 --- a/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptHandle.cs +++ b/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptHandle.cs @@ -37,6 +37,12 @@ namespace Microsoft.Win32.SafeHandles { } + protected SafeNCryptHandle (IntPtr handle, System.Runtime.InteropServices.SafeHandle parentHandle) + : base (false) + { + throw new NotImplementedException (); + } + public override bool IsInvalid { get { throw new NotImplementedException (); } } protected override bool ReleaseHandle () diff --git a/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptKeyHandle.cs b/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptKeyHandle.cs index 3dcbfae8d6d..06840259bf6 100644 --- a/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptKeyHandle.cs +++ b/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptKeyHandle.cs @@ -26,6 +26,8 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // +using System; + namespace Microsoft.Win32.SafeHandles { public sealed class SafeNCryptKeyHandle : SafeNCryptHandle @@ -34,6 +36,12 @@ namespace Microsoft.Win32.SafeHandles { } + public SafeNCryptKeyHandle (IntPtr handle, System.Runtime.InteropServices.SafeHandle parentHandle) + : base (handle, parentHandle) + { + + } + protected override bool ReleaseNativeHandle () { return false; diff --git a/mcs/class/System.Core/common_System.Core.dll.sources b/mcs/class/System.Core/common_System.Core.dll.sources index b521fe7b41c..cfe271aeee0 100644 --- a/mcs/class/System.Core/common_System.Core.dll.sources +++ b/mcs/class/System.Core/common_System.Core.dll.sources @@ -71,6 +71,7 @@ corefx/SR.missing.cs ../referencesource/System.Core/System/Security/Cryptography/ECDiffieHellmanPublicKey.cs ../referencesource/System.Core/System/Security/Cryptography/ECDsa.cs ../referencesource/System.Core/System/Security/Cryptography/ECDsaCng.cs +../referencesource/System.Core/System/Security/Cryptography/ECKeyXmlFormat.cs ../referencesource/System.Core/System/Security/Cryptography/NCryptNative.cs ../referencesource/System.Core/System/Security/Cryptography/RsaCng.cs diff --git a/mcs/class/System.Core/net_4_x_System.Core.dll.sources b/mcs/class/System.Core/net_4_x_System.Core.dll.sources index 215215e76a2..5cc42d8a3cf 100644 --- a/mcs/class/System.Core/net_4_x_System.Core.dll.sources +++ b/mcs/class/System.Core/net_4_x_System.Core.dll.sources @@ -14,6 +14,5 @@ System.Security.Cryptography/SHA512Cng.cs ../referencesource/System.Core/System/Security/Cryptography/AesManaged.cs ../referencesource/System.Core/System/Security/Cryptography/ECDiffieHellman.cs -../referencesource/System.Core/System/Security/Cryptography/ECKeyXmlFormat.cs ../referencesource/System.Core/System/threading/ReaderWriterLockSlim/LockRecursionException.cs 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 cd8283a9f64..39ad193190c 100644 --- a/mcs/class/referencesource/System.Core/System/Security/Cryptography/ECDsaCng.cs +++ b/mcs/class/referencesource/System.Core/System/Security/Cryptography/ECDsaCng.cs @@ -35,6 +35,8 @@ namespace System.Security.Cryptography { throw new NotImplementedException (); } + public CngAlgorithm HashAlgorithm { get; set; } + public CngKey Key { get { throw new NotImplementedException (); @@ -52,6 +54,38 @@ namespace System.Security.Cryptography { public override bool VerifyHash(byte[] hash, byte[] signature) { throw new NotImplementedException(); } + + public void FromXmlString (string xml, ECKeyXmlFormat format) { + throw new NotImplementedException(); + } + + public byte[] SignData (byte[] data) { + throw new NotImplementedException(); + } + + public byte[] SignData (System.IO.Stream data) { + throw new NotImplementedException(); + } + + public byte[] SignData (byte[] data, int offset, int count) { + throw new NotImplementedException(); + } + + public string ToXmlString (ECKeyXmlFormat format) { + throw new NotImplementedException(); + } + + public bool VerifyData (byte[] data, byte[] signature) { + throw new NotImplementedException(); + } + + public bool VerifyData (System.IO.Stream data, byte[] signature) { + throw new NotImplementedException(); + } + + public bool VerifyData (byte[] data, int offset, int count, byte[] signature) { + throw new NotImplementedException(); + } #else private static KeySizes[] s_legalKeySizes = new KeySizes[] { new KeySizes(256, 384, 128), new KeySizes(521, 521, 0) }; diff --git a/tools/nuget-hash-extractor/Makefile b/tools/nuget-hash-extractor/Makefile index 05b30f25975..4df4d768ff4 100644 --- a/tools/nuget-hash-extractor/Makefile +++ b/tools/nuget-hash-extractor/Makefile @@ -10,13 +10,16 @@ nuget-hash-extractor.exe: $(SOURCES) download: .download_stamp_file -run: download nuget-hash-extractor.exe exec-ver exec-asm +run: download nuget-hash-extractor.exe exec-ver exec-asm exec-msbuild run-asm: download nuget-hash-extractor.exe exec-asm exec-asm: mono nuget-hash-extractor.exe nugets asm +exec-msbuild: + mono nuget-hash-extractor.exe nugets guids_for_msbuild + run-ver: download nuget-hash-extractor.exe exec-ver exec-ver: diff --git a/tools/nuget-hash-extractor/download.sh b/tools/nuget-hash-extractor/download.sh index aee4e36d212..375666e3b6b 100755 --- a/tools/nuget-hash-extractor/download.sh +++ b/tools/nuget-hash-extractor/download.sh @@ -1,5 +1,14 @@ mkdir nugets +## +## Following are nugets which have net4* implementation but that implementation is Windows specific and won’t work on Mono or +## with any profile derived from Mono net_4_x profile like Xamarin.Mac. This is due to no TFM for Mono or Xamarin.Mac which +## would allow us to customize the behaviors. +## +## We don’t want to fix all broken nugets we only focus on few system-like that are likely to be used by broad audience and +## we have working implementation available in one of Mono assemblies. +## + #System.Runtime.InteropServices.RuntimeInformation wget https://www.nuget.org/api/v2/package/System.Runtime.InteropServices.RuntimeInformation/4.3.0 -O nugets/system.runtime.interopservices.runtimeinformation.4.3.0.nupkg wget https://www.nuget.org/api/v2/package/System.Runtime.InteropServices.RuntimeInformation/4.0.0 -O nugets/system.runtime.interopservices.runtimeinformation.4.0.0.nupkg @@ -23,20 +32,14 @@ wget https://www.nuget.org/api/v2/package/System.Net.Http/4.1.0 -O nugets/system wget https://www.nuget.org/api/v2/package/System.Net.Http/4.0.0 -O nugets/system.net.http.4.0.0.nupkg #System.Text.Encoding.CodePages +wget https://www.nuget.org/api/v2/package/System.Text.Encoding.CodePages/4.4.0 -O nugets/system.text.encoding.codepages.4.4.0.nupkg wget https://www.nuget.org/api/v2/package/System.Text.Encoding.CodePages/4.3.0 -O nugets/system.text.encoding.codepages.4.3.0.nupkg wget https://www.nuget.org/api/v2/package/System.Text.Encoding.CodePages/4.0.1 -O nugets/system.text.encoding.codepages.4.0.1.nupkg wget https://www.nuget.org/api/v2/package/System.Text.Encoding.CodePages/4.0.0 -O nugets/system.text.encoding.codepages.4.0.0.nupkg -#System.Reflection.DispatchProxy -wget https://www.nuget.org/api/v2/package/System.Reflection.DispatchProxy/4.3.0 -O nugets/system.reflection.dispatchproxy.4.3.0.nupkg -wget https://www.nuget.org/api/v2/package/System.Reflection.DispatchProxy/4.0.1 -O nugets/system.reflection.dispatchproxy.4.0.1.nupkg -wget https://www.nuget.org/api/v2/package/System.Reflection.DispatchProxy/4.0.0 -O nugets/system.reflection.dispatchproxy.4.0.0.nupkg - #System.Threading.Overlapped wget https://www.nuget.org/api/v2/package/System.Threading.Overlapped/4.3.0 -O nugets/system.threading.overlapped.4.3.0.nupkg wget https://www.nuget.org/api/v2/package/System.Threading.Overlapped/4.0.1 -O nugets/system.threading.overlapped.4.0.1.nupkg wget https://www.nuget.org/api/v2/package/System.Threading.Overlapped/4.0.0 -O nugets/system.threading.overlapped.4.0.0.nupkg -#System.Security.Cryptography.OpenSsl when .net 4.6.2 + 1 is out - touch .download_stamp_file -- 2.25.1