From a776badcb33be309b1f50a1ffe44e48c4f0efcdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Sat, 16 Dec 2023 15:58:40 +0100 Subject: [PATCH] Rename IsOSXLike to IsApplePlatform in libraries Consolidates the name we use across runtime and libraries. --- .../Common/tests/System/Net/Http/LoopbackServer.cs | 2 +- .../TestUtilities/System/PlatformDetection.Unix.cs | 8 +++----- .../TestUtilities/System/PlatformDetection.cs | 6 +++--- .../tests/DirectoryServicesTestHelpers.cs | 2 +- .../tests/FileSystemWatcher.unit.cs | 2 +- .../tests/FunctionalTests/PingTest.cs | 2 +- .../tests/FunctionalTests/Connect.cs | 2 +- .../tests/FunctionalTests/OSSupport.cs | 2 +- .../tests/FunctionalTests/ReceiveFrom.cs | 2 +- .../tests/FunctionalTests/ReceiveMessageFrom.cs | 2 +- .../tests/FunctionalTests/SendFile.cs | 4 ++-- .../FunctionalTests/SendReceive/SendReceive.cs | 2 +- .../src/System.Private.CoreLib.Shared.projitems | 14 +++++++------- .../System/IO/Strategies/FileStreamHelpers.Unix.cs | 4 ++-- .../src/System/OperatingSystem.cs | 2 +- .../CultureInfo/CultureInfoCurrentCulture.cs | 2 +- .../System.IO.FileSystem.Tests/File/GetSetTimes.cs | 2 +- .../FileInfo/GetSetTimes.cs | 2 +- .../PortedCommon/IOInputs.cs | 4 ++-- .../System.Runtime.Tests/System/DateTimeTests.cs | 2 +- .../tests/DSACryptoServiceProviderProvider.cs | 2 +- .../tests/DefaultDSAProvider.cs | 4 ++-- .../tests/DefaultECDiffieHellmanProvider.Unix.cs | 4 ++-- .../tests/DefaultECDsaProvider.Android.cs | 2 +- .../tests/DefaultECDsaProvider.Unix.cs | 4 ++-- 25 files changed, 41 insertions(+), 43 deletions(-) diff --git a/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs b/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs index b514f6ed01087f..3cdacf116f867c 100644 --- a/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs +++ b/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs @@ -147,7 +147,7 @@ public async Task EstablishConnectionAsync() socket.NoDelay = true; } // OSX can throw if socket is in weird state during close or cancellation - catch (SocketException ex) when (ex.SocketErrorCode == SocketError.InvalidArgument && PlatformDetection.IsOSXLike) { } + catch (SocketException ex) when (ex.SocketErrorCode == SocketError.InvalidArgument && PlatformDetection.IsApplePlatform) { } stream = new NetworkStream(socket, ownsSocket: false); #endif diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs index 48b8ba86f730a6..643f9dd915a6df 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs @@ -32,11 +32,9 @@ public static partial class PlatformDetection public static bool IsNotMonoLinuxArm64 => !IsMonoLinuxArm64; // OSX family - public static bool IsOSXLike => IsOSX || IsiOS || IstvOS || IsMacCatalyst; + public static bool IsApplePlatform => IsOSX || IsiOS || IstvOS || IsMacCatalyst; public static bool IsOSX => RuntimeInformation.IsOSPlatform(OSPlatform.OSX); public static bool IsNotOSX => !IsOSX; - public static bool IsMacOsMojaveOrHigher => IsOSX && Environment.OSVersion.Version >= new Version(10, 14); - public static bool IsMacOsCatalinaOrHigher => IsOSX && Environment.OSVersion.Version >= new Version(10, 15); public static bool IsMacOsAppleSilicon => IsOSX && IsArm64Process; public static bool IsNotMacOsAppleSilicon => !IsMacOsAppleSilicon; public static bool IsAppSandbox => Environment.GetEnvironmentVariable("APP_SANDBOX_CONTAINER_ID") != null; @@ -50,12 +48,12 @@ public static partial class PlatformDetection public static bool IsNotFedoraOrRedHatFamily => !IsFedora && !IsRedHatFamily; public static bool IsNotDebian10 => !IsDebian10; - public static Version OpenSslVersion => !IsOSXLike && !IsWindows && !IsAndroid ? + public static Version OpenSslVersion => !IsApplePlatform && !IsWindows && !IsAndroid ? GetOpenSslVersion() : throw new PlatformNotSupportedException(); private static readonly Version s_openssl3Version = new Version(3, 0, 0); - public static bool IsOpenSsl3 => !IsOSXLike && !IsWindows && !IsAndroid && !IsBrowser ? + public static bool IsOpenSsl3 => !IsApplePlatform && !IsWindows && !IsAndroid && !IsBrowser ? GetOpenSslVersion() >= s_openssl3Version : false; diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs index 6f2f4d05beecf2..3cad68e703b67d 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs @@ -55,7 +55,7 @@ public static partial class PlatformDetection public static bool IsAppleMobile => IsMacCatalyst || IsiOS || IstvOS; public static bool IsNotAppleMobile => !IsAppleMobile; public static bool IsNotNetFramework => !IsNetFramework; - public static bool IsBsdLike => IsOSXLike || IsFreeBSD || IsNetBSD; + public static bool IsBsdLike => IsApplePlatform || IsFreeBSD || IsNetBSD; public static bool IsArmProcess => RuntimeInformation.ProcessArchitecture == Architecture.Arm; public static bool IsNotArmProcess => !IsArmProcess; @@ -526,7 +526,7 @@ private static bool AndroidGetSslProtocolSupport(SslProtocols protocol) private static bool GetTls10Support() { // on macOS and Android TLS 1.0 is supported. - if (IsOSXLike || IsAndroid) + if (IsApplePlatform || IsAndroid) { return true; } @@ -554,7 +554,7 @@ private static bool GetTls11Support() return GetProtocolSupportFromWindowsRegistry(SslProtocols.Tls11, defaultProtocolSupport: true) && !IsWindows10Version20348OrGreater; } // on macOS and Android TLS 1.1 is supported. - else if (IsOSXLike || IsAndroid) + else if (IsApplePlatform || IsAndroid) { return true; } diff --git a/src/libraries/System.DirectoryServices.Protocols/tests/DirectoryServicesTestHelpers.cs b/src/libraries/System.DirectoryServices.Protocols/tests/DirectoryServicesTestHelpers.cs index 0fa2e8d7be198b..fb663740108b08 100644 --- a/src/libraries/System.DirectoryServices.Protocols/tests/DirectoryServicesTestHelpers.cs +++ b/src/libraries/System.DirectoryServices.Protocols/tests/DirectoryServicesTestHelpers.cs @@ -25,7 +25,7 @@ public static bool IsLibLdapInstalled #if NETCOREAPP if (!_isLibLdapInstalled.HasValue) { - if (PlatformDetection.IsOSXLike) + if (PlatformDetection.IsApplePlatform) { _isLibLdapInstalled = NativeLibrary.TryLoad("libldap.dylib", out _); } diff --git a/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs b/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs index 904dc34dc069a9..e1040f5bc8d040 100644 --- a/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs +++ b/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs @@ -232,7 +232,7 @@ public void FileSystemWatcher_Filter() watcher.Filter = "abc.dll"; Assert.Equal("abc.dll", watcher.Filter); - if (!PlatformDetection.IsOSXLike) + if (!PlatformDetection.IsApplePlatform) { watcher.Filter = "ABC.DLL"; Assert.Equal("ABC.DLL", watcher.Filter); diff --git a/src/libraries/System.Net.Ping/tests/FunctionalTests/PingTest.cs b/src/libraries/System.Net.Ping/tests/FunctionalTests/PingTest.cs index 49a95c858a9af8..0b98a87e80cfac 100644 --- a/src/libraries/System.Net.Ping/tests/FunctionalTests/PingTest.cs +++ b/src/libraries/System.Net.Ping/tests/FunctionalTests/PingTest.cs @@ -73,7 +73,7 @@ private static void PingResultValidator(PingReply pingReply, IPAddress[] localIp private static byte[] GetPingPayload(AddressFamily addressFamily) // On Unix, Non-root processes cannot send arbitrary data in the ping packet payload - => Capability.CanUseRawSockets(addressFamily) || PlatformDetection.IsOSXLike + => Capability.CanUseRawSockets(addressFamily) || PlatformDetection.IsApplePlatform ? TestSettings.PayloadAsBytes : Array.Empty(); diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/Connect.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/Connect.cs index c778cf130b030e..bc2ca6fff5c242 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/Connect.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/Connect.cs @@ -236,7 +236,7 @@ public async Task Connect_DatagramSockets_DontThrowConnectedException_OnSecondAt await ConnectAsync(s, new IPEndPoint(listenAt, ((IPEndPoint)listener.LocalEndPoint).Port)); Assert.True(s.Connected); // According to the OSX man page, it's enough connecting to an invalid address to dissolve the connection. (0 port connection returns error on OSX) - await ConnectAsync(s, new IPEndPoint(secondConnection, PlatformDetection.IsOSXLike ? 1 : 0)); + await ConnectAsync(s, new IPEndPoint(secondConnection, PlatformDetection.IsApplePlatform ? 1 : 0)); Assert.True(s.Connected); } } diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/OSSupport.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/OSSupport.cs index 03a5bdf0b5a76b..e103fde492b40c 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/OSSupport.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/OSSupport.cs @@ -144,7 +144,7 @@ public void IOControl_SIOCATMARK_Unix_Success() // OOB data read, read pointer at mark. Assert.Equal(4, client.IOControl(IOControlCode.OobDataRead, null, siocatmarkResult)); - Assert.Equal(PlatformDetection.IsOSXLike ? 0 : 1, BitConverter.ToInt32(siocatmarkResult, 0)); + Assert.Equal(PlatformDetection.IsApplePlatform ? 0 : 1, BitConverter.ToInt32(siocatmarkResult, 0)); } } } diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/ReceiveFrom.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/ReceiveFrom.cs index e8a9475538daf4..644782d4f69d4c 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/ReceiveFrom.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/ReceiveFrom.cs @@ -96,7 +96,7 @@ public async Task NotBound_Throws_InvalidOperationException() [InlineData(true)] public async Task ReceiveSent_TCP_Success(bool ipv6) { - if (ipv6 && PlatformDetection.IsOSXLike) + if (ipv6 && PlatformDetection.IsApplePlatform) { // [ActiveIssue("https://github.com/dotnet/runtime/issues/47335")] // accept() will create a (seemingly) DualMode socket on Mac, diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/ReceiveMessageFrom.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/ReceiveMessageFrom.cs index e5626f8ed6b848..e8663bc8047e9d 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/ReceiveMessageFrom.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/ReceiveMessageFrom.cs @@ -89,7 +89,7 @@ public async Task NotBound_Throws_InvalidOperationException() [InlineData(true)] public async Task ReceiveSent_TCP_Success(bool ipv6) { - if (ipv6 && PlatformDetection.IsOSXLike) + if (ipv6 && PlatformDetection.IsApplePlatform) { // [ActiveIssue("https://github.com/dotnet/runtime/issues/47335")] // accept() will create a (seemingly) DualMode socket on Mac, diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendFile.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendFile.cs index 7a8761397fbf56..5cc59d332f4ddf 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendFile.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendFile.cs @@ -236,7 +236,7 @@ public async Task SliceBuffers_Success() [InlineData(true)] [InlineData(false)] [ActiveIssue("https://github.com/dotnet/runtime/issues/73536", TestPlatforms.iOS | TestPlatforms.tvOS)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/80169", typeof(PlatformDetection), nameof(PlatformDetection.IsOSXLike))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/80169", typeof(PlatformDetection), nameof(PlatformDetection.IsApplePlatform))] public async Task SendFileGetsCanceledByDispose(bool owning) { // Aborting sync operations for non-owning handles is not supported on Unix. @@ -300,7 +300,7 @@ await RetryHelper.ExecuteAsync(async () => // On OSX, we're unable to unblock the on-going socket operations and // perform an abortive close. - if (!(UsesSync && PlatformDetection.IsOSXLike)) + if (!(UsesSync && PlatformDetection.IsApplePlatform)) { SocketError? peerSocketError = null; var receiveBuffer = new byte[4096]; diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive/SendReceive.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive/SendReceive.cs index e93c09ec73d6e6..0a65addc5c3f88 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive/SendReceive.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive/SendReceive.cs @@ -1109,7 +1109,7 @@ await socketOperation // On OSX, we're unable to unblock the on-going socket operations and // perform an abortive close. - if (!(UsesSync && PlatformDetection.IsOSXLike)) + if (!(UsesSync && PlatformDetection.IsApplePlatform)) { SocketError? peerSocketError = null; var receiveBuffer = new ArraySegment(new byte[4096]); diff --git a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems index 986102f5475e30..ec0fd93a48aef5 100644 --- a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems +++ b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems @@ -14,8 +14,8 @@ false enable - true true + true true true true @@ -62,7 +62,7 @@ - + @@ -2459,7 +2459,7 @@ - + @@ -2501,7 +2501,7 @@ - + @@ -2525,7 +2525,7 @@ - + @@ -2546,7 +2546,7 @@ - + Common\Interop\OSX\Interop.libobjc.cs @@ -2559,7 +2559,7 @@ - + Common\Interop\OSX\Interop.SearchPath.cs diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/Strategies/FileStreamHelpers.Unix.cs b/src/libraries/System.Private.CoreLib/src/System/IO/Strategies/FileStreamHelpers.Unix.cs index d3ae4b8b29211e..15da21326a9451 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/Strategies/FileStreamHelpers.Unix.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/Strategies/FileStreamHelpers.Unix.cs @@ -58,7 +58,7 @@ internal static void FlushToDisk(SafeFileHandle handle) internal static void Lock(SafeFileHandle handle, bool canWrite, long position, long length) { - if (OperatingSystem.IsOSXLike() || OperatingSystem.IsFreeBSD()) + if (OperatingSystem.IsApplePlatform() || OperatingSystem.IsFreeBSD()) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_OSXFileLocking); } @@ -68,7 +68,7 @@ internal static void Lock(SafeFileHandle handle, bool canWrite, long position, l internal static void Unlock(SafeFileHandle handle, long position, long length) { - if (OperatingSystem.IsOSXLike() || OperatingSystem.IsFreeBSD()) + if (OperatingSystem.IsApplePlatform() || OperatingSystem.IsFreeBSD()) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_OSXFileLocking); } diff --git a/src/libraries/System.Private.CoreLib/src/System/OperatingSystem.cs b/src/libraries/System.Private.CoreLib/src/System/OperatingSystem.cs index 8d6f33448325f8..e7da2f788fa0de 100644 --- a/src/libraries/System.Private.CoreLib/src/System/OperatingSystem.cs +++ b/src/libraries/System.Private.CoreLib/src/System/OperatingSystem.cs @@ -242,7 +242,7 @@ public static bool IsMacOS() => false; #endif - internal static bool IsOSXLike() => + internal static bool IsApplePlatform() => #if TARGET_OSX || TARGET_MACCATALYST || TARGET_IOS || TARGET_TVOS true; #else diff --git a/src/libraries/System.Runtime/tests/System.Globalization.Tests/CultureInfo/CultureInfoCurrentCulture.cs b/src/libraries/System.Runtime/tests/System.Globalization.Tests/CultureInfo/CultureInfoCurrentCulture.cs index 17d61191168583..9c34a6a128a873 100644 --- a/src/libraries/System.Runtime/tests/System.Globalization.Tests/CultureInfo/CultureInfoCurrentCulture.cs +++ b/src/libraries/System.Runtime/tests/System.Globalization.Tests/CultureInfo/CultureInfoCurrentCulture.cs @@ -163,7 +163,7 @@ public void CurrentCulture_DefaultWithNoLang(string langEnvVar) Assert.NotNull(CultureInfo.CurrentCulture); Assert.NotNull(CultureInfo.CurrentUICulture); - if (PlatformDetection.IsOSXLike) + if (PlatformDetection.IsApplePlatform) { Assert.NotEqual("", CultureInfo.CurrentCulture.Name); Assert.NotEqual("", CultureInfo.CurrentUICulture.Name); diff --git a/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/File/GetSetTimes.cs b/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/File/GetSetTimes.cs index 2eaa67a24f9725..c1e1b06e4def5a 100644 --- a/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/File/GetSetTimes.cs +++ b/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/File/GetSetTimes.cs @@ -11,7 +11,7 @@ public abstract class File_GetSetTimes : StaticGetSetTimes { // OSX has the limitation of setting upto 2262-04-11T23:47:16 (long.Max) date. // 32bit Unix has time_t up to ~ 2038. - protected static bool SupportsLongMaxDateTime => PlatformDetection.IsWindows || (!PlatformDetection.Is32BitProcess && !PlatformDetection.IsOSXLike); + protected static bool SupportsLongMaxDateTime => PlatformDetection.IsWindows || (!PlatformDetection.Is32BitProcess && !PlatformDetection.IsApplePlatform); protected override bool CanBeReadOnly => true; diff --git a/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/FileInfo/GetSetTimes.cs b/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/FileInfo/GetSetTimes.cs index 943c3867f948c5..1b4d2f2c22c46a 100644 --- a/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/FileInfo/GetSetTimes.cs +++ b/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/FileInfo/GetSetTimes.cs @@ -52,7 +52,7 @@ public FileInfo GetNonZeroNanoseconds() if (!HasNonZeroNanoseconds(fileinfo.LastWriteTime)) { - if (PlatformDetection.IsOSXLike) + if (PlatformDetection.IsApplePlatform) return null; DateTime dt = fileinfo.LastWriteTime; diff --git a/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/PortedCommon/IOInputs.cs b/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/PortedCommon/IOInputs.cs index 7187dc7339c9a6..0faa81495ddf41 100644 --- a/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/PortedCommon/IOInputs.cs +++ b/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/PortedCommon/IOInputs.cs @@ -8,8 +8,8 @@ internal static class IOInputs { - public static bool SupportsSettingCreationTime => PlatformDetection.IsWindows || PlatformDetection.IsOSXLike; - public static bool SupportsGettingCreationTime => PlatformDetection.IsWindows || PlatformDetection.IsOSXLike; + public static bool SupportsSettingCreationTime => PlatformDetection.IsWindows || PlatformDetection.IsApplePlatform; + public static bool SupportsGettingCreationTime => PlatformDetection.IsWindows || PlatformDetection.IsApplePlatform; // Max path length (minus trailing \0). Unix values vary system to system; just using really long values here likely to be more than on the average system. public static readonly int MaxPath = OperatingSystem.IsWindows() ? 259 : 10000; diff --git a/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/DateTimeTests.cs b/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/DateTimeTests.cs index 5407544356f1c0..d60ce55673aa08 100644 --- a/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/DateTimeTests.cs +++ b/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/DateTimeTests.cs @@ -1226,7 +1226,7 @@ public static void Parse_Japanese() Assert.Equal(expected, DateTime.Parse(expectedString, cultureInfo)); } - private static bool IsNotOSXOrBrowser => !PlatformDetection.IsOSXLike && !PlatformDetection.IsBrowser; + private static bool IsNotOSXOrBrowser => !PlatformDetection.IsApplePlatform && !PlatformDetection.IsBrowser; [ConditionalTheory(nameof(IsNotOSXOrBrowser))] [InlineData("ar")] diff --git a/src/libraries/System.Security.Cryptography.Csp/tests/DSACryptoServiceProviderProvider.cs b/src/libraries/System.Security.Cryptography.Csp/tests/DSACryptoServiceProviderProvider.cs index e71c23ee19d725..b4982af70f11ab 100644 --- a/src/libraries/System.Security.Cryptography.Csp/tests/DSACryptoServiceProviderProvider.cs +++ b/src/libraries/System.Security.Cryptography.Csp/tests/DSACryptoServiceProviderProvider.cs @@ -16,7 +16,7 @@ public DSA Create(int keySize) } public bool SupportsFips186_3 => false; - public bool SupportsKeyGeneration => !PlatformDetection.IsOSXLike; + public bool SupportsKeyGeneration => !PlatformDetection.IsApplePlatform; } public partial class DSAFactory diff --git a/src/libraries/System.Security.Cryptography/tests/DefaultDSAProvider.cs b/src/libraries/System.Security.Cryptography/tests/DefaultDSAProvider.cs index 049d8c2187894a..e04a1ce81f2602 100644 --- a/src/libraries/System.Security.Cryptography/tests/DefaultDSAProvider.cs +++ b/src/libraries/System.Security.Cryptography/tests/DefaultDSAProvider.cs @@ -25,11 +25,11 @@ public bool SupportsFips186_3 { get { - return !(PlatformDetection.IsWindows7 || PlatformDetection.IsOSXLike); + return !(PlatformDetection.IsWindows7 || PlatformDetection.IsApplePlatform); } } - public bool SupportsKeyGeneration => !PlatformDetection.IsOSXLike; + public bool SupportsKeyGeneration => !PlatformDetection.IsApplePlatform; } public partial class DSAFactory diff --git a/src/libraries/System.Security.Cryptography/tests/DefaultECDiffieHellmanProvider.Unix.cs b/src/libraries/System.Security.Cryptography/tests/DefaultECDiffieHellmanProvider.Unix.cs index 162831d72ac696..5e8aef8546006c 100644 --- a/src/libraries/System.Security.Cryptography/tests/DefaultECDiffieHellmanProvider.Unix.cs +++ b/src/libraries/System.Security.Cryptography/tests/DefaultECDiffieHellmanProvider.Unix.cs @@ -9,7 +9,7 @@ public partial class ECDiffieHellmanProvider : IECDiffieHellmanProvider { public bool IsCurveValid(Oid oid) { - if (PlatformDetection.IsOSXLike) + if (PlatformDetection.IsApplePlatform) { return false; } @@ -25,7 +25,7 @@ public bool ExplicitCurvesSupported { get { - if (PlatformDetection.IsOSXLike) + if (PlatformDetection.IsApplePlatform) { return false; } diff --git a/src/libraries/System.Security.Cryptography/tests/DefaultECDsaProvider.Android.cs b/src/libraries/System.Security.Cryptography/tests/DefaultECDsaProvider.Android.cs index c56e3a6d55ff78..c12eddf33ab180 100644 --- a/src/libraries/System.Security.Cryptography/tests/DefaultECDsaProvider.Android.cs +++ b/src/libraries/System.Security.Cryptography/tests/DefaultECDsaProvider.Android.cs @@ -21,7 +21,7 @@ public bool ExplicitCurvesSupported { get { - if (PlatformDetection.IsOSXLike) + if (PlatformDetection.IsApplePlatform) { return false; } diff --git a/src/libraries/System.Security.Cryptography/tests/DefaultECDsaProvider.Unix.cs b/src/libraries/System.Security.Cryptography/tests/DefaultECDsaProvider.Unix.cs index 53e9198720360b..c2dad6c0938fdb 100644 --- a/src/libraries/System.Security.Cryptography/tests/DefaultECDsaProvider.Unix.cs +++ b/src/libraries/System.Security.Cryptography/tests/DefaultECDsaProvider.Unix.cs @@ -9,7 +9,7 @@ public partial class ECDsaProvider : IECDsaProvider { public bool IsCurveValid(Oid oid) { - if (PlatformDetection.IsOSXLike) + if (PlatformDetection.IsApplePlatform) { return false; } @@ -25,7 +25,7 @@ public bool ExplicitCurvesSupported { get { - if (PlatformDetection.IsOSXLike) + if (PlatformDetection.IsApplePlatform) { return false; }