Imported Upstream version 5.2.0.175

Former-commit-id: bb0468d0f257ff100aa895eb5fe583fb5dfbf900
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-06-07 13:16:24 +00:00
parent 4bdbaf4a88
commit 966bba02bb
8776 changed files with 346420 additions and 149650 deletions

View File

@ -78,7 +78,7 @@ namespace System.IdentityModel.Claims
}
[MonoTODO]
public static Claim CreateDenyOnlyWindowsSidClaim (SecurityIdentifier identifier)
public static Claim CreateDenyOnlyWindowsSidClaim (SecurityIdentifier sid)
{
throw new NotImplementedException ();
}

View File

@ -71,7 +71,7 @@ namespace System.IdentityModel.Claims
}
public abstract IEnumerable<Claim> FindClaims (
string resourceType, string right);
string claimType, string right);
public abstract IEnumerator<Claim> GetEnumerator ();

View File

@ -41,25 +41,25 @@ namespace System.IdentityModel.Claims
// Constructors
[MonoTODO]
public WindowsClaimSet (WindowsIdentity identity)
public WindowsClaimSet (WindowsIdentity windowsIdentity)
{
throw new NotImplementedException ();
}
[MonoTODO]
public WindowsClaimSet (WindowsIdentity identity, bool includeWindowsGroups)
public WindowsClaimSet (WindowsIdentity windowsIdentity, bool includeWindowsGroups)
{
throw new NotImplementedException ();
}
[MonoTODO]
public WindowsClaimSet (WindowsIdentity identity, DateTime expirationTime)
public WindowsClaimSet (WindowsIdentity windowsIdentity, DateTime expirationTime)
{
throw new NotImplementedException ();
}
[MonoTODO]
public WindowsClaimSet (WindowsIdentity identity, bool includeWindowsGroups, DateTime expirationTime)
public WindowsClaimSet (WindowsIdentity windowsIdentity, bool includeWindowsGroups, DateTime expirationTime)
{
throw new NotImplementedException ();
}

View File

@ -39,15 +39,15 @@ namespace System.IdentityModel.Policy
{
[MonoTODO]
public static AuthorizationContext
CreateDefaultAuthorizationContext (IList<IAuthorizationPolicy> policies)
CreateDefaultAuthorizationContext (IList<IAuthorizationPolicy> authorizationPolicies)
{
if (policies == null)
throw new ArgumentNullException ("policies");
if (authorizationPolicies == null)
throw new ArgumentNullException ("authorizationPolicies");
string id = new UniqueId ().ToString ();
DefaultEvaluationContext ctx =
new DefaultEvaluationContext ();
foreach (IAuthorizationPolicy a in policies) {
foreach (IAuthorizationPolicy a in authorizationPolicies) {
object o = null;
a.Evaluate (ctx, ref o);
}

View File

@ -46,10 +46,10 @@ namespace System.IdentityModel.Policy
public abstract ReadOnlyCollection<ClaimSet> ClaimSets { get; }
public abstract void AddClaimSet (
IAuthorizationPolicy authorizationPolicy,
IAuthorizationPolicy policy,
ClaimSet claimSet);
public abstract void RecordExpirationTime (DateTime time);
public abstract void RecordExpirationTime (DateTime expirationTime);
}
// default implementation

View File

@ -46,11 +46,11 @@ namespace System.IdentityModel.Selectors
}
[MonoTODO]
public KerberosSecurityTokenProvider (string servicePrincipalName, TokenImpersonationLevel tokenImpersonationLevel, NetworkCredential credential)
public KerberosSecurityTokenProvider (string servicePrincipalName, TokenImpersonationLevel tokenImpersonationLevel, NetworkCredential networkCredential)
{
name = servicePrincipalName;
impersonation_level = tokenImpersonationLevel;
this.credential = credential;
this.credential = networkCredential;
}
string name;

View File

@ -41,11 +41,11 @@ namespace System.IdentityModel.Selectors
public abstract SecurityTokenAuthenticator
CreateSecurityTokenAuthenticator (
SecurityTokenRequirement requirement,
out SecurityTokenResolver resolver);
SecurityTokenRequirement tokenRequirement,
out SecurityTokenResolver outOfBandTokenResolver);
public abstract SecurityTokenProvider
CreateSecurityTokenProvider(SecurityTokenRequirement requirement);
CreateSecurityTokenProvider(SecurityTokenRequirement tokenRequirement);
public abstract SecurityTokenSerializer
CreateSecurityTokenSerializer (SecurityTokenVersion version);

View File

@ -77,16 +77,16 @@ namespace System.IdentityModel.Selectors
EndCancelTokenCore (result);
}
public SecurityToken RenewToken (TimeSpan timeout, SecurityToken token)
public SecurityToken RenewToken (TimeSpan timeout, SecurityToken tokenToBeRenewed)
{
return RenewTokenCore (timeout, token);
return RenewTokenCore (timeout, tokenToBeRenewed);
}
public IAsyncResult BeginRenewToken (
TimeSpan timeout, SecurityToken token,
TimeSpan timeout, SecurityToken tokenToBeRenewed,
AsyncCallback callback, object state)
{
return BeginRenewTokenCore (timeout, token, callback, state);
return BeginRenewTokenCore (timeout, tokenToBeRenewed, callback, state);
}
public SecurityToken EndRenewToken (IAsyncResult result)
@ -101,7 +101,7 @@ namespace System.IdentityModel.Selectors
throw new NotSupportedException (String.Format ("Token cancellation on this security token provider '{0}' is not supported.", this));
}
protected virtual SecurityToken RenewTokenCore (TimeSpan timeout, SecurityToken token)
protected virtual SecurityToken RenewTokenCore (TimeSpan timeout, SecurityToken tokenToBeRenewed)
{
throw new NotSupportedException (String.Format ("Token renewal on this security token provider '{0}' is not supported.", this));
}
@ -124,7 +124,7 @@ namespace System.IdentityModel.Selectors
protected virtual IAsyncResult BeginRenewTokenCore (
TimeSpan timeout,
SecurityToken token,
SecurityToken tokenToBeRenewed,
AsyncCallback callback, object state)
{
throw new NotSupportedException (String.Format ("Token renewal on this security token provider '{0}' is not supported.", this));

View File

@ -125,28 +125,28 @@ namespace System.IdentityModel.Selectors
}
}
public TValue GetProperty<TValue> (string property)
public TValue GetProperty<TValue> (string propertyName)
{
TValue ret;
if (TryGetProperty<TValue> (property, out ret))
if (TryGetProperty<TValue> (propertyName, out ret))
return ret;
throw new ArgumentException (String.Format ("Property '{0}' was not found.", property));
throw new ArgumentException (String.Format ("Property '{0}' was not found.", propertyName));
}
public bool TryGetProperty<TValue> (string property, out TValue value)
public bool TryGetProperty<TValue> (string propertyName, out TValue result)
{
object tmp;
value = default (TValue);
result = default (TValue);
if (!Properties.TryGetValue (property, out tmp))
if (!Properties.TryGetValue (propertyName, out tmp))
return false;
if (tmp == null && !typeof (TValue).IsValueType)
value = default (TValue);
result = default (TValue);
else if (tmp is TValue)
value = (TValue) tmp;
result = (TValue) tmp;
else
throw new ArgumentException (String.Format ("The value of property '{0}' is of type '{1}', while '{2}' is expected.", property, tmp.GetType (), typeof (TValue)));
return value != null;
throw new ArgumentException (String.Format ("The value of property '{0}' is of type '{1}', while '{2}' is expected.", propertyName, tmp.GetType (), typeof (TValue)));
return result != null;
}
}
}

View File

@ -54,10 +54,10 @@ namespace System.IdentityModel.Tokens
return (byte []) GetRawBuffer ().Clone ();
}
public override bool Matches (SecurityKeyIdentifierClause clause)
public override bool Matches (SecurityKeyIdentifierClause keyIdentifierClause)
{
BinaryKeyIdentifierClause other =
clause as BinaryKeyIdentifierClause;
keyIdentifierClause as BinaryKeyIdentifierClause;
if (other == null)
return false;
return Matches (other.GetRawBuffer ());

View File

@ -1,4 +1,4 @@
//
//
// BootstrapContext.cs
//
// Author:
@ -60,14 +60,14 @@ namespace System.IdentityModel.Tokens {
}
/// <summary>Initializes a new instance of the <see cref="BootstrapContext"/> class by using the specified security token and token handler.</summary>
public BootstrapContext (SecurityToken token, SecurityTokenHandler handler)
public BootstrapContext (SecurityToken token, SecurityTokenHandler tokenHandler)
{
if (token == null)
throw new ArgumentNullException ("token");
if (handler == null)
throw new ArgumentNullException ("handler");
if (tokenHandler == null)
throw new ArgumentNullException ("tokenHandler");
SecurityToken = token;
SecurityTokenHandler = handler;
SecurityTokenHandler = tokenHandler;
}
/// <summary>Initializes a new instance of the <see cref="BootstrapContext"/> class from a stream.</summary>

View File

@ -42,26 +42,26 @@ namespace System.IdentityModel.Tokens
public EncryptedKeyIdentifierClause (
byte [] encryptedKey, string encryptionMethod,
SecurityKeyIdentifier identifier)
: this (encryptedKey, encryptionMethod, identifier, null)
SecurityKeyIdentifier encryptingKeyIdentifier)
: this (encryptedKey, encryptionMethod, encryptingKeyIdentifier, null)
{
}
public EncryptedKeyIdentifierClause (
byte [] encryptedKey, string encryptionMethod,
SecurityKeyIdentifier identifier, string carriedKeyName)
: this (encryptedKey, encryptionMethod, identifier, carriedKeyName, null, 0)
SecurityKeyIdentifier encryptingKeyIdentifier, string carriedKeyName)
: this (encryptedKey, encryptionMethod, encryptingKeyIdentifier, carriedKeyName, null, 0)
{
}
public EncryptedKeyIdentifierClause (
byte [] encryptedKey, string encryptionMethod,
SecurityKeyIdentifier identifier, string carriedKeyName,
SecurityKeyIdentifier encryptingKeyIdentifier, string carriedKeyName,
byte [] derivationNonce, int derivationLength)
: base (encryptionMethod, encryptedKey, true, derivationNonce, derivationLength)
{
this.carried_key_name = carriedKeyName;
this.identifier = identifier;
this.identifier = encryptingKeyIdentifier;
this.enc_method = encryptionMethod;
}
@ -100,10 +100,10 @@ namespace System.IdentityModel.Tokens
return true;
}
public override bool Matches (SecurityKeyIdentifierClause clause)
public override bool Matches (SecurityKeyIdentifierClause keyIdentifierClause)
{
EncryptedKeyIdentifierClause e =
clause as EncryptedKeyIdentifierClause;
keyIdentifierClause as EncryptedKeyIdentifierClause;
return e != null && Matches (e.GetRawBuffer (), e.EncryptionMethod, e.CarriedKeyName);
}

View File

@ -111,7 +111,7 @@ namespace System.IdentityModel.Tokens
[MonoTODO]
public override bool MatchesKeyIdentifierClause (
SecurityKeyIdentifierClause skiClause)
SecurityKeyIdentifierClause keyIdentifierClause)
{
throw new NotImplementedException ();
}

View File

@ -42,16 +42,16 @@ namespace System.IdentityModel.Tokens
{
byte [] key;
public InMemorySymmetricSecurityKey (byte [] key)
: this (key, true)
public InMemorySymmetricSecurityKey (byte [] symmetricKey)
: this (symmetricKey, true)
{
}
public InMemorySymmetricSecurityKey (byte [] key, bool clone)
public InMemorySymmetricSecurityKey (byte [] symmetricKey, bool cloneBuffer)
{
if (key == null)
throw new ArgumentNullException ("key");
this.key = clone ? (byte []) key.Clone() : key;
if (symmetricKey == null)
throw new ArgumentNullException ("symmetricKey");
this.key = cloneBuffer ? (byte []) symmetricKey.Clone() : symmetricKey;
}
// SymmetricSecurityKey implementation

View File

@ -72,7 +72,7 @@ namespace System.IdentityModel.Tokens
[MonoTODO]
public override bool MatchesKeyIdentifierClause (
SecurityKeyIdentifierClause skiClause)
SecurityKeyIdentifierClause keyIdentifierClause)
{
throw new NotImplementedException ();
}

View File

@ -98,7 +98,7 @@ namespace System.IdentityModel.Tokens
[MonoTODO]
public override bool MatchesKeyIdentifierClause (
SecurityKeyIdentifierClause skiClause)
SecurityKeyIdentifierClause keyIdentifierClause)
{
throw new NotImplementedException ();
}

View File

@ -62,12 +62,12 @@ namespace System.IdentityModel.Tokens
get { return owner_type; }
}
public override bool Matches (SecurityKeyIdentifierClause clause)
public override bool Matches (SecurityKeyIdentifierClause keyIdentifierClause)
{
if (clause == null)
throw new ArgumentNullException ("clause");
if (keyIdentifierClause == null)
throw new ArgumentNullException ("keyIdentifierClause");
LocalIdKeyIdentifierClause c =
clause as LocalIdKeyIdentifierClause;
keyIdentifierClause as LocalIdKeyIdentifierClause;
return c != null && Matches (c.LocalId, c.OwnerType);
}

View File

@ -78,12 +78,12 @@ namespace System.IdentityModel.Tokens
throw new NotImplementedException ();
}
public override bool Matches (SecurityKeyIdentifierClause clause)
public override bool Matches (SecurityKeyIdentifierClause keyIdentifierClause)
{
if (clause == null)
throw new ArgumentNullException ("clause");
if (keyIdentifierClause == null)
throw new ArgumentNullException ("keyIdentifierClause");
RsaKeyIdentifierClause rkic =
clause as RsaKeyIdentifierClause;
keyIdentifierClause as RsaKeyIdentifierClause;
return rkic != null && Matches (rkic.Rsa);
}

View File

@ -46,7 +46,7 @@ namespace System.IdentityModel.Tokens
[MonoTODO]
public override AsymmetricAlgorithm GetAsymmetricAlgorithm (
string algorithm, bool privateKey)
string algorithm, bool requiresPrivateKey)
{
throw new NotImplementedException ();
}

View File

@ -87,7 +87,7 @@ namespace System.IdentityModel.Tokens
[MonoTODO]
public override bool MatchesKeyIdentifierClause (
SecurityKeyIdentifierClause skiClause)
SecurityKeyIdentifierClause keyIdentifierClause)
{
throw new NotImplementedException ();
}

Some files were not shown because too many files have changed in this diff Show More