Imported Upstream version 4.8.0.309

Former-commit-id: 5f9c6ae75f295e057a7d2971f3a6df4656fa8850
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-11-10 13:04:39 +00:00
parent ee1447783b
commit 94b2861243
4912 changed files with 390737 additions and 49310 deletions

View File

@@ -225,7 +225,7 @@ namespace System.Security.Policy {
// "possible" presence of an Authenticode signature
[MethodImplAttribute (MethodImplOptions.InternalCall)]
static extern bool IsAuthenticodePresent (Assembly a);
#if NET_2_1
#if MOBILE
static internal Evidence GetDefaultHostEvidence (Assembly a)
{
return new Evidence ();
@@ -251,7 +251,7 @@ namespace System.Security.Policy {
}
// strongnamed assemblies gets a StrongName evidence
AssemblyName an = a.UnprotectedGetName ();
AssemblyName an = a.GetName ();
byte[] pk = an.GetPublicKey ();
if ((pk != null) && (pk.Length > 0)) {
StrongNamePublicKeyBlob blob = new StrongNamePublicKeyBlob (pk);
@@ -287,7 +287,7 @@ namespace System.Security.Policy {
return e;
}
#endif // NET_2_1
#endif // MOBILE
private class EvidenceEnumerator : IEnumerator {

View File

@@ -582,7 +582,7 @@ namespace System.Security.Policy {
internal bool IsFullTrustAssembly (Assembly a)
{
AssemblyName an = a.UnprotectedGetName ();
AssemblyName an = a.GetName ();
StrongNamePublicKeyBlob snpkb = new StrongNamePublicKeyBlob (an.GetPublicKey ());
StrongNameMembershipCondition snMC = new StrongNameMembershipCondition (snpkb, an.Name, an.Version);
foreach (StrongNameMembershipCondition sn in full_trust_assemblies) {

View File

@@ -83,7 +83,13 @@ namespace System.Security.Policy {
if (url.Length == 0)
return new Zone (z);
Uri uri = new Uri (url);
Uri uri = null;
try {
uri = new Uri (url);
}
catch {
return new Zone (z);
}
// TODO: apply zone configuration
// this is the only way to use the Trusted and Untrusted zones