diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs index 0430032b49eb13..f84bc20c1ef662 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs @@ -109,7 +109,7 @@ public static bool OpenSslPresentOnSystem { get { - if (IsWindows || IsAndroid || UsesMobileAppleCrypto || IsBrowser) + if (IsWindows || IsAndroid || IsApplePlatform || IsBrowser) { return false; } @@ -250,7 +250,7 @@ private static DistroInfo GetDistroInfo() else if (line.StartsWith("VERSION_ID=", StringComparison.Ordinal)) { string versionId = line.Substring(11).Trim('"', '\''); - int dashIndex = versionId.IndexOf('_'); // Strip prerelease info if any (needed for Alpine Edge) + int dashIndex = versionId.IndexOf('_'); // Strip prerelease info if any (needed for Alpine Edge) if (dashIndex != -1) { versionId = versionId.Substring(0, dashIndex); diff --git a/src/libraries/System.Security.Cryptography.OpenSsl/tests/System.Security.Cryptography.OpenSsl.Tests.csproj b/src/libraries/System.Security.Cryptography.OpenSsl/tests/System.Security.Cryptography.OpenSsl.Tests.csproj index 73581a9d4e2a0c..95c91ee0bcbe08 100644 --- a/src/libraries/System.Security.Cryptography.OpenSsl/tests/System.Security.Cryptography.OpenSsl.Tests.csproj +++ b/src/libraries/System.Security.Cryptography.OpenSsl/tests/System.Security.Cryptography.OpenSsl.Tests.csproj @@ -1,8 +1,8 @@ $(NetCoreAppCurrent)-unix;$(NetCoreAppCurrent)-browser - - true + + true true diff --git a/src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj b/src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj index ea11aafa4a3a8e..785f8e3a5ecf20 100644 --- a/src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj +++ b/src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj @@ -18,8 +18,6 @@ true true true - true - true $(DefineConstants);DESIGNTIMEINTERFACES @@ -870,18 +868,11 @@ - - - - - - + + + + + + + @@ -1131,15 +1133,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - + diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SafeEvpPKeyHandle.OpenSsl.macOS.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SafeEvpPKeyHandle.OpenSsl.macOS.cs deleted file mode 100644 index 23e1ae59117ed9..00000000000000 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SafeEvpPKeyHandle.OpenSsl.macOS.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System.Runtime.Versioning; -using System.Threading; - -namespace System.Security.Cryptography -{ - public sealed partial class SafeEvpPKeyHandle - { - private static readonly long _openSslVersion = !Interop.OpenSslNoInit.OpenSslIsAvailable ? 0 : Interop.OpenSsl.OpenSslVersionNumber(); - - /// - /// The runtime version number for the loaded version of OpenSSL. - /// - /// - /// For OpenSSL 1.1+ this is the result of OpenSSL_version_num(), - /// for OpenSSL 1.0.x this is the result of SSLeay(). - /// - [UnsupportedOSPlatform("android")] - [UnsupportedOSPlatform("browser")] - [UnsupportedOSPlatform("ios")] - [UnsupportedOSPlatform("tvos")] - [UnsupportedOSPlatform("windows")] - public static long OpenSslVersion - { - get - { - long version = _openSslVersion; - - if (version == 0) - { - throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); - } - - return version; - } - } - } -} diff --git a/src/libraries/System.Security.Cryptography/tests/AesCcmTests.cs b/src/libraries/System.Security.Cryptography/tests/AesCcmTests.cs index 0e6b6c8af1f239..6f8c4ced5a4847 100644 --- a/src/libraries/System.Security.Cryptography/tests/AesCcmTests.cs +++ b/src/libraries/System.Security.Cryptography/tests/AesCcmTests.cs @@ -708,17 +708,7 @@ public static void CtorThrowsPNSEIfNotSupported() [Fact] public static void CheckIsSupported() { - bool expectedIsSupported = !PlatformDetection.IsBrowser; - - if (PlatformDetection.IsOSX) - { - expectedIsSupported = PlatformDetection.OpenSslPresentOnSystem; - } - else if (PlatformDetection.UsesMobileAppleCrypto) - { - expectedIsSupported = false; - } - + bool expectedIsSupported = !PlatformDetection.IsBrowser && !PlatformDetection.IsApplePlatform; Assert.Equal(expectedIsSupported, AesCcm.IsSupported); } } diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index e868bd4384eae3..ece29b69d1ed30 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -40,11 +40,6 @@ - - - - -