Skip to content

Commit

Permalink
Fix two tests in System.Security.Cryptography.Rsa.Tests.System.Securi…
Browse files Browse the repository at this point in the history
…ty.Cryptography.Algorithms.Tests on Windows 2012 server (dotnet/corefx#13883)

Commit migrated from dotnet/corefx@0b976c5
  • Loading branch information
AlexRadch authored and stephentoub committed Nov 22, 2016
1 parent e8e3240 commit 5e41aa9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,9 @@ public bool Supports384PrivateKey
{
if (!_supports384PrivateKey.HasValue)
{
bool hasSupport = true;

// For Windows 7 (Microsoft Windows 6.1) this is false for RSACng.
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
hasSupport = !RuntimeInformation.OSDescription.Contains("Windows 6.1");
}

_supports384PrivateKey = hasSupport;
// For Windows 7 (Microsoft Windows 6.1) and Windows 8 (Microsoft Windows 6.2) this is false for RSACng.
_supports384PrivateKey = !RuntimeInformation.OSDescription.Contains("Windows 6.1") &&
!RuntimeInformation.OSDescription.Contains("Windows 6.2");
}

return _supports384PrivateKey.Value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ public bool Supports384PrivateKey
{
if (!_supports384PrivateKey.HasValue)
{
// For Windows 7 (Microsoft Windows 6.1) this is false for RSACng.
_supports384PrivateKey = !RuntimeInformation.OSDescription.Contains("Windows 6.1");
// For Windows 7 (Microsoft Windows 6.1) and Windows 8 (Microsoft Windows 6.2) this is false for RSACng.
_supports384PrivateKey = !RuntimeInformation.OSDescription.Contains("Windows 6.1") &&
!RuntimeInformation.OSDescription.Contains("Windows 6.2");
}

return _supports384PrivateKey.Value;
Expand Down

0 comments on commit 5e41aa9

Please sign in to comment.