diff --git a/CMakeLists.txt b/CMakeLists.txt
index c8eadf24cb42..ef0220d9a786 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -692,9 +692,6 @@ if (CLR_CMAKE_PLATFORM_UNIX)
endif(CLR_CMAKE_PLATFORM_UNIX)
add_definitions(-DFEATURE_CORESYSTEM)
add_definitions(-DFEATURE_CORRUPTING_EXCEPTIONS)
-if(WIN32)
- add_definitions(-DFEATURE_CRYPTO)
-endif(WIN32)
if(CLR_CMAKE_PLATFORM_UNIX)
add_definitions(-DFEATURE_DBGIPC_TRANSPORT_DI)
add_definitions(-DFEATURE_DBGIPC_TRANSPORT_VM)
@@ -718,20 +715,10 @@ if (CLR_CMAKE_PLATFORM_UNIX OR CLR_CMAKE_PLATFORM_ARCH_ARM64)
add_definitions(-DFEATURE_IMPLICIT_TLS)
set(FEATURE_IMPLICIT_TLS 1)
endif(CLR_CMAKE_PLATFORM_UNIX OR CLR_CMAKE_PLATFORM_ARCH_ARM64)
-if(WIN32)
- add_definitions(-DFEATURE_ISOSTORE)
- add_definitions(-DFEATURE_ISOSTORE_LIGHT)
-endif(WIN32)
add_definitions(-DFEATURE_ISYM_READER)
add_definitions(-DFEATURE_LEGACYNETCF)
-if(WIN32)
- add_definitions(-DFEATURE_LEGACYNETCFCRYPTO)
-endif(WIN32)
add_definitions(-DFEATURE_LEGACYNETCF_DBG_HOST_CONTROL)
add_definitions(-DFEATURE_LEGACYNETCFFAS)
-if(WIN32)
-add_definitions(-DFEATURE_LEGACYSURFACE)
-endif(WIN32)
add_definitions(-DFEATURE_LOADER_OPTIMIZATION)
add_definitions(-DFEATURE_MANAGED_ETW)
add_definitions(-DFEATURE_MANAGED_ETW_CHANNELS)
@@ -781,10 +768,6 @@ endif(WIN32)
add_definitions(-DFEATURE_WIN32_REGISTRY)
add_definitions(-DFEATURE_WINDOWSPHONE)
add_definitions(-DFEATURE_WINMD_RESILIENT)
-if(WIN32)
- add_definitions(-DFEATURE_X509)
- add_definitions(-DFEATURE_X509_SECURESTRINGS)
-endif(WIN32)
if(CLR_CMAKE_BUILD_TESTS)
add_subdirectory(tests)
diff --git a/clr.coreclr.props b/clr.coreclr.props
index 77b579191495..a3354867c366 100644
--- a/clr.coreclr.props
+++ b/clr.coreclr.props
@@ -24,8 +24,6 @@
true
true
true
- true
- true
true
true
@@ -44,8 +42,6 @@
true
true
true
- true
- true
true
true
true
@@ -58,15 +54,12 @@
true
true
- true
true
true
true
true
- true
true
true
- true
true
true
true
@@ -113,15 +106,6 @@
false
false
-
- false
- false
- false
- false
- false
- false
- false
-
true
diff --git a/src/ToolBox/dirs.proj b/src/ToolBox/dirs.proj
index f506b3fc0373..ee075f5b01a4 100644
--- a/src/ToolBox/dirs.proj
+++ b/src/ToolBox/dirs.proj
@@ -91,7 +91,6 @@
-
diff --git a/src/coreclr/dirs.proj b/src/coreclr/dirs.proj
index 52f1cb39ff38..6b14c1aff263 100644
--- a/src/coreclr/dirs.proj
+++ b/src/coreclr/dirs.proj
@@ -13,7 +13,6 @@
-
diff --git a/src/mscorlib/model.xml b/src/mscorlib/model.xml
index 591f49df0404..f63f4f9be56c 100644
--- a/src/mscorlib/model.xml
+++ b/src/mscorlib/model.xml
@@ -69,38 +69,25 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
+
+
@@ -117,44 +104,12 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -170,7 +125,7 @@
-
+
@@ -222,7 +177,6 @@
-
@@ -537,12 +491,6 @@
-
@@ -826,12 +774,6 @@
-
-
-
-
-
-
@@ -990,22 +932,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1031,80 +957,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1639,17 +1491,14 @@
-
-
+
-
-
+
-
-
+
@@ -1658,22 +1507,15 @@
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -1919,22 +1761,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1967,7 +1793,6 @@
-
@@ -1975,10 +1800,7 @@
-
-
-
@@ -1990,16 +1812,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -2135,12 +1947,12 @@
-
+
-
+
@@ -3199,7 +3011,6 @@
-
@@ -3239,10 +3050,10 @@
-
-
-
-
+
+
+
+
@@ -3253,13 +3064,13 @@
-
-
+
+
-
-
-
-
+
+
+
+
@@ -3490,7 +3301,7 @@
-
+
@@ -3524,17 +3335,6 @@
-
-
-
-
-
-
-
-
-
-
-
@@ -3579,10 +3379,11 @@
-
+
-
+
+
@@ -3592,7 +3393,7 @@
-
+
@@ -3600,36 +3401,24 @@
-
-
-
-
-
-
+
-
-
+
-
-
-
-
-
-
-
-
+
-
+
+
@@ -3664,8 +3453,6 @@
-
-
@@ -3757,9 +3544,6 @@
-
-
-
@@ -3769,35 +3553,27 @@
-
-
-
-
-
-
-
-
+
-
@@ -3981,31 +3757,21 @@
-
-
-
-
-
-
-
-
-
-
@@ -4088,20 +3854,13 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -4434,7 +4193,6 @@
-
@@ -4508,9 +4266,6 @@
-
-
-
@@ -4519,8 +4274,6 @@
-
-
@@ -4539,7 +4292,6 @@
-
@@ -5016,9 +4768,6 @@
-
-
-
@@ -5335,20 +5084,15 @@
-
-
+
-
+
-
+
@@ -5394,7 +5138,7 @@
-
+
@@ -5404,7 +5148,7 @@
-
+
@@ -5414,9 +5158,8 @@
-
-
-
+
+
@@ -5435,8 +5178,8 @@
-
-
+
+
@@ -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-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -10110,14 +8686,7 @@
-
-
-
-
-
-
-
-
+
@@ -10150,12 +8719,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -10172,7 +8741,6 @@
-
@@ -10181,7 +8749,7 @@
-
+
@@ -10705,14 +9273,6 @@
-
-
-
-
-
-
-
-
@@ -10794,9 +9354,6 @@
-
-
-
@@ -11622,9 +10179,6 @@
-
-
-
@@ -12164,10 +10718,7 @@
-
-
-
@@ -12344,6 +10895,10 @@
+
+
+
+
+
-
diff --git a/src/mscorlib/mscorlib.shared.sources.props b/src/mscorlib/mscorlib.shared.sources.props
index 8b1bce3fc6ea..a2a9750780d4 100644
--- a/src/mscorlib/mscorlib.shared.sources.props
+++ b/src/mscorlib/mscorlib.shared.sources.props
@@ -325,13 +325,7 @@
-
-
-
-
-
-
-
+
diff --git a/src/mscorlib/src/Microsoft/Win32/Win32Native.cs b/src/mscorlib/src/Microsoft/Win32/Win32Native.cs
index abb2db9f6fb8..fd0791cef240 100644
--- a/src/mscorlib/src/Microsoft/Win32/Win32Native.cs
+++ b/src/mscorlib/src/Microsoft/Win32/Win32Native.cs
@@ -852,9 +852,12 @@ internal static extern bool IsWow64Process(
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
internal static extern uint SysStringByteLen(IntPtr bstr);
+#if FEATURE_LEGACYSURFACE
[DllImport(Win32Native.OLEAUT32)]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
internal static extern uint SysStringLen(SafeBSTRHandle bstr);
+#endif
+
#endif
[DllImport(KERNEL32)]
@@ -1755,7 +1758,7 @@ internal class USEROBJECTFLAGS {
// DPAPI
//
-#if FEATURE_COMINTEROP
+#if FEATURE_LEGACYSURFACE
//
// RtlEncryptMemory and RtlDecryptMemory are declared in the internal header file crypt.h.
// They were also recently declared in the public header file ntsecapi.h (in the Platform SDK as well as the current build of Server 2003).
@@ -1777,7 +1780,7 @@ int SystemFunction041 (
[In,Out] SafeBSTRHandle pDataIn,
[In] uint cbDataIn, // multiple of RTL_ENCRYPT_MEMORY_SIZE
[In] uint dwFlags);
-#endif // FEATURE_COMINTEROP
+#endif // FEATURE_LEGACYSURFACE
#if FEATURE_CORECLR
[DllImport(NTDLL, CharSet=CharSet.Unicode, SetLastError=true)]
@@ -2416,11 +2419,30 @@ internal unsafe static extern int MultiByteToWideChar(
[return: MarshalAs(UnmanagedType.Bool)]
internal extern static bool QueryUnbiasedInterruptTime(out ulong UnbiasedTime);
+#if FEATURE_CORECLR
#if FEATURE_PAL
[DllImport(KERNEL32, EntryPoint = "PAL_Random")]
[ResourceExposure(ResourceScope.None)]
internal extern static bool Random(bool bStrong,
[Out, MarshalAs(UnmanagedType.LPArray)] byte[] buffer, int length);
+#else
+ internal const int PROV_RSA_FULL = 1;
+ internal const int CRYPT_VERIFYCONTEXT = unchecked((int)0xF0000000);
+
+ [DllImport("advapi32", SetLastError = true, CharSet = CharSet.Unicode)]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ internal static extern bool CryptAcquireContext([Out] out IntPtr phProv,
+ string pszContainer,
+ string pszProvider,
+ int dwProvType,
+ int dwFlags);
+
+ [DllImport("advapi32", SetLastError = true)]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ internal static extern bool CryptGenRandom(IntPtr hProv,
+ int dwLen,
+ [In, Out, MarshalAs(UnmanagedType.LPArray)] byte[] pbBuffer);
+#endif
#endif
}
}
diff --git a/src/mscorlib/src/System/Collections/Hashtable.cs b/src/mscorlib/src/System/Collections/Hashtable.cs
index 1c42128fded1..49344c946582 100644
--- a/src/mscorlib/src/System/Collections/Hashtable.cs
+++ b/src/mscorlib/src/System/Collections/Hashtable.cs
@@ -23,7 +23,7 @@ namespace System.Collections {
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
using System.Diagnostics.Contracts;
-#if FEATURE_RANDOMIZED_STRING_HASHING && !FEATURE_PAL
+#if !FEATURE_CORECLR
using System.Security.Cryptography;
#endif
@@ -943,7 +943,6 @@ private void Insert (Object key, Object nvalue, bool add) {
}
#endif // !FEATURE_CORECLR
#endif // FEATURE_RANDOMIZED_STRING_HASHING
-
return;
}
@@ -1806,7 +1805,11 @@ public static object GetEqualityComparerForSerialization(object comparer)
private const int bufferSize = 1024;
#if !FEATURE_PAL
+#if FEATURE_CORECLR
+ private static IntPtr hCryptProv;
+#else
private static RandomNumberGenerator rng;
+#endif
#endif
private static byte[] data;
private static int currentIndex = bufferSize;
@@ -1824,15 +1827,24 @@ internal static long GetEntropy()
data = new byte[bufferSize];
Contract.Assert(bufferSize % 8 == 0, "We increment our current index by 8, so our buffer size must be a multiple of 8");
#if !FEATURE_PAL
+#if FEATURE_CORECLR
+ Microsoft.Win32.Win32Native.CryptAcquireContext(out hCryptProv, null, null,
+ Microsoft.Win32.Win32Native.PROV_RSA_FULL, Microsoft.Win32.Win32Native.CRYPT_VERIFYCONTEXT);
+#else
rng = RandomNumberGenerator.Create();
+#endif
#endif
}
#if FEATURE_PAL
Microsoft.Win32.Win32Native.Random(true, data, data.Length);
+#else
+#if FEATURE_CORECLR
+ Microsoft.Win32.Win32Native.CryptGenRandom(hCryptProv, data.Length, data);
#else
rng.GetBytes(data);
+#endif
#endif
currentIndex = 0;
}
diff --git a/src/mscorlib/src/System/Console.cs b/src/mscorlib/src/System/Console.cs
deleted file mode 100644
index 3a0eb41c5bf4..000000000000
--- a/src/mscorlib/src/System/Console.cs
+++ /dev/null
@@ -1,2141 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/*=============================================================================
-**
-**
-**
-** Purpose: This class provides access to the standard input, standard output
-** and standard error streams.
-**
-**
-=============================================================================*/
-namespace System {
- using System;
- using System.IO;
- using System.Text;
- using System.Globalization;
- using System.Security;
- using System.Security.Permissions;
- using Microsoft.Win32;
- using System.Runtime.CompilerServices;
- using System.Threading;
- using System.Runtime.InteropServices;
- using Microsoft.Win32.SafeHandles;
- using System.Runtime.ConstrainedExecution;
- using System.Runtime.Versioning;
- using System.Diagnostics.Contracts;
- using System.Diagnostics.CodeAnalysis;
- using System.Collections.Generic;
-
- // Provides static fields for console input & output. Use
- // Console.In for input from the standard input stream (stdin),
- // Console.Out for output to stdout, and Console.Error
- // for output to stderr. If any of those console streams are
- // redirected from the command line, these streams will be redirected.
- // A program can also redirect its own output or input with the
- // SetIn, SetOut, and SetError methods.
- //
- // The distinction between Console.Out & Console.Error is useful
- // for programs that redirect output to a file or a pipe. Note that
- // stdout & stderr can be output to different files at the same
- // time from the DOS command line:
- //
- // someProgram 1> out 2> err
- //
- //Contains only static data. Serializable attribute not required.
- public static class Console
- {
- private const int DefaultConsoleBufferSize = 256;
- private const short AltVKCode = 0x12;
-
- private const int NumberLockVKCode = 0x90; // virtual key code
- private const int CapsLockVKCode = 0x14;
-
- // Beep range - see MSDN.
- private const int MinBeepFrequency = 37;
- private const int MaxBeepFrequency = 32767;
-
- // MSDN says console titles can be up to 64 KB in length.
- // But I get an exception if I use buffer lengths longer than
- // ~24500 Unicode characters. Oh well.
- private const int MaxConsoleTitleLength = 24500;
-
-#if !FEATURE_CORECLR
- private static readonly UnicodeEncoding StdConUnicodeEncoding = new UnicodeEncoding(false, false);
-#endif // !FEATURE_CORECLR
-
- private static volatile TextReader _in;
- private static volatile TextWriter _out;
- private static volatile TextWriter _error;
-
- private static volatile ConsoleCancelEventHandler _cancelCallbacks;
- private static volatile ControlCHooker _hooker;
-
- // ReadLine & Read can't use this because they need to use ReadFile
- // to be able to handle redirected input. We have to accept that
- // we will lose repeated keystrokes when someone switches from
- // calling ReadKey to calling Read or ReadLine. Those methods should
- // ideally flush this cache as well.
- [System.Security.SecurityCritical] // auto-generated
- private static Win32Native.InputRecord _cachedInputRecord;
-
- // For ResetColor
- private static volatile bool _haveReadDefaultColors;
- private static volatile byte _defaultColors;
-#if FEATURE_CODEPAGES_FILE // if no codepages file then locked into default
- private static volatile bool _isOutTextWriterRedirected = false;
- private static volatile bool _isErrorTextWriterRedirected = false;
-#endif
- private static volatile Encoding _inputEncoding = null;
- private static volatile Encoding _outputEncoding = null;
-
-#if !FEATURE_CORECLR
- private static volatile bool _stdInRedirectQueried = false;
- private static volatile bool _stdOutRedirectQueried = false;
- private static volatile bool _stdErrRedirectQueried = false;
-
- private static bool _isStdInRedirected;
- private static bool _isStdOutRedirected;
- private static bool _isStdErrRedirected;
-#endif // !FEATURE_CORECLR
-
- // Private object for locking instead of locking on a public type for SQL reliability work.
- // Use this for internal synchronization during initialization, wiring up events, or for short, non-blocking OS calls.
- private static volatile Object s_InternalSyncObject;
- private static Object InternalSyncObject {
- get {
- Contract.Ensures(Contract.Result