Imported Upstream version 4.3.2.467

Former-commit-id: 9c2cb47f45fa221e661ab616387c9cda183f283d
This commit is contained in:
Xamarin Public Jenkins
2016-02-22 11:00:01 -05:00
parent f302175246
commit f3e3aab35a
4097 changed files with 122406 additions and 82300 deletions

View File

@@ -424,25 +424,8 @@ namespace System.Security.Policy
else if (hashAlgorithm.IsAssignableFrom(typeof(SHA256)))
{
// The managed SHA256 implementation is not a FIPS certified implementation, however on
// Windows 2003 and higher we have a FIPS alternative. If we're on Windows 2003 or better,
// use the CAPI implementation - otherwise, we fall back to the managed implementation if
// FIPS is not enabled.
Version osVersion = Environment.OSVersion.Version;
bool isWin2k3OrHigher = Environment.RunningOnWinNT &&
(osVersion.Major > 5 || (osVersion.Major == 5 && osVersion.Minor >= 2));
if (isWin2k3OrHigher)
{
return Type.GetType("System.Security.Cryptography.SHA256CryptoServiceProvider, " + AssemblyRef.SystemCore);
}
else if (!CryptoConfig.AllowOnlyFipsAlgorithms)
{
return typeof(SHA256Managed);
}
else
{
return null;
}
// we have a FIPS alternative.
return Type.GetType("System.Security.Cryptography.SHA256CryptoServiceProvider, " + AssemblyRef.SystemCore);
}
else
{

View File

@@ -5,7 +5,7 @@
// ==--==
// IConstantMembershipCondition.cs
//
// <OWNER>[....]</OWNER>
// <OWNER>ShawnFa</OWNER>
//
// Interface that all constant membership conditions must implement
//

View File

@@ -33,4 +33,4 @@ namespace System.Security.Policy {
/// </summary>
void MarkUsed();
}
}
}

View File

@@ -5,7 +5,7 @@
// ==--==
// IIdentityPermissionFactory.cs
//
// <OWNER>[....]</OWNER>
// <OWNER>ShawnFa</OWNER>
//
// All Identities will implement this interface.
//

View File

@@ -5,7 +5,7 @@
// ==--==
// IMembershipCondition.cs
//
// <OWNER>[....]</OWNER>
// <OWNER>ShawnFa</OWNER>
//
// Interface that all MembershipConditions must implement
//

View File

@@ -3,7 +3,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
// <OWNER>[....]</OWNER>
// <OWNER>ShawnFa</OWNER>
//
using System;