You've already forked linux-packaging-mono
Imported Upstream version 5.2.0.175
Former-commit-id: bb0468d0f257ff100aa895eb5fe583fb5dfbf900
This commit is contained in:
parent
4bdbaf4a88
commit
966bba02bb
@@ -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 ());
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace System.IdentityModel.Tokens
|
||||
|
||||
[MonoTODO]
|
||||
public override bool MatchesKeyIdentifierClause (
|
||||
SecurityKeyIdentifierClause skiClause)
|
||||
SecurityKeyIdentifierClause keyIdentifierClause)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace System.IdentityModel.Tokens
|
||||
|
||||
[MonoTODO]
|
||||
public override bool MatchesKeyIdentifierClause (
|
||||
SecurityKeyIdentifierClause skiClause)
|
||||
SecurityKeyIdentifierClause keyIdentifierClause)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace System.IdentityModel.Tokens
|
||||
|
||||
[MonoTODO]
|
||||
public override bool MatchesKeyIdentifierClause (
|
||||
SecurityKeyIdentifierClause skiClause)
|
||||
SecurityKeyIdentifierClause keyIdentifierClause)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace System.IdentityModel.Tokens
|
||||
|
||||
[MonoTODO]
|
||||
public override AsymmetricAlgorithm GetAsymmetricAlgorithm (
|
||||
string algorithm, bool privateKey)
|
||||
string algorithm, bool requiresPrivateKey)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace System.IdentityModel.Tokens
|
||||
|
||||
[MonoTODO]
|
||||
public override bool MatchesKeyIdentifierClause (
|
||||
SecurityKeyIdentifierClause skiClause)
|
||||
SecurityKeyIdentifierClause keyIdentifierClause)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace System.IdentityModel.Tokens
|
||||
|
||||
public virtual void ReadXml (XmlDictionaryReader reader,
|
||||
SamlSerializer samlSerializer,
|
||||
SecurityTokenSerializer keyInfoTokenSerializer,
|
||||
SecurityTokenSerializer keyInfoSerializer,
|
||||
SecurityTokenResolver outOfBandTokenResolver)
|
||||
{
|
||||
if (reader == null)
|
||||
@@ -104,7 +104,7 @@ namespace System.IdentityModel.Tokens
|
||||
|
||||
public virtual void WriteXml (XmlDictionaryWriter writer,
|
||||
SamlSerializer samlSerializer,
|
||||
SecurityTokenSerializer keyInfoTokenSerializer)
|
||||
SecurityTokenSerializer keyInfoSerializer)
|
||||
{
|
||||
if (writer == null)
|
||||
throw new ArgumentNullException ("writer");
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace System.IdentityModel.Tokens
|
||||
|
||||
public virtual void ReadXml (XmlDictionaryReader reader,
|
||||
SamlSerializer samlSerializer,
|
||||
SecurityTokenSerializer keyInfoTokenSerializer,
|
||||
SecurityTokenSerializer keyInfoSerializer,
|
||||
SecurityTokenResolver outOfBandTokenResolver)
|
||||
{
|
||||
if (reader == null)
|
||||
@@ -105,7 +105,7 @@ namespace System.IdentityModel.Tokens
|
||||
switch (reader.LocalName) {
|
||||
case "Assertion":
|
||||
SamlAssertion a = new SamlAssertion ();
|
||||
a.ReadXml (reader, samlSerializer, keyInfoTokenSerializer, outOfBandTokenResolver);
|
||||
a.ReadXml (reader, samlSerializer, keyInfoSerializer, outOfBandTokenResolver);
|
||||
assertions.Add (a);
|
||||
break;
|
||||
case "AssertionIDReference":
|
||||
@@ -120,7 +120,7 @@ namespace System.IdentityModel.Tokens
|
||||
|
||||
public virtual void WriteXml (XmlDictionaryWriter writer,
|
||||
SamlSerializer samlSerializer,
|
||||
SecurityTokenSerializer keyInfoTokenSerializer)
|
||||
SecurityTokenSerializer keyInfoSerializer)
|
||||
{
|
||||
if (writer == null)
|
||||
throw new ArgumentNullException ("writer");
|
||||
@@ -130,7 +130,7 @@ namespace System.IdentityModel.Tokens
|
||||
foreach (string idref in AssertionIdReferences)
|
||||
writer.WriteElementString ("saml", "AssertionIDReference", SamlConstants.Namespace, idref);
|
||||
foreach (SamlAssertion assertion in Assertions)
|
||||
assertion.WriteXml (writer, samlSerializer, keyInfoTokenSerializer);
|
||||
assertion.WriteXml (writer, samlSerializer, keyInfoSerializer);
|
||||
writer.WriteEndElement ();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,16 +53,16 @@ namespace System.IdentityModel.Tokens
|
||||
}
|
||||
|
||||
public SamlAssertion (string assertionId, string issuer,
|
||||
DateTime issueInstant, SamlConditions conditions,
|
||||
SamlAdvice advice, IEnumerable<SamlStatement> statements)
|
||||
DateTime issueInstant, SamlConditions samlConditions,
|
||||
SamlAdvice samlAdvice, IEnumerable<SamlStatement> samlStatements)
|
||||
{
|
||||
if (IsInvalidAssertionId (assertionId))
|
||||
throw new ArgumentException (String.Format ("The assertionId '{0}' must be a valid XML NCName.", assertionId));
|
||||
|
||||
if (issuer == null || issuer.Length == 0)
|
||||
throw new ArgumentException ("issuer");
|
||||
if (statements == null)
|
||||
throw new ArgumentNullException ("statements");
|
||||
if (samlStatements == null)
|
||||
throw new ArgumentNullException ("samlStatements");
|
||||
|
||||
major = 1;
|
||||
minor = 1;
|
||||
@@ -70,9 +70,9 @@ namespace System.IdentityModel.Tokens
|
||||
assertion_id = assertionId;
|
||||
this.issuer = issuer;
|
||||
issue_instant = issueInstant;
|
||||
this.conditions = conditions;
|
||||
this.advice = advice;
|
||||
foreach (SamlStatement s in statements) {
|
||||
this.conditions = samlConditions;
|
||||
this.advice = samlAdvice;
|
||||
foreach (SamlStatement s in samlStatements) {
|
||||
if (s == null)
|
||||
throw new ArgumentException ("statements contain null item.");
|
||||
this.statements.Add (s);
|
||||
@@ -180,7 +180,7 @@ namespace System.IdentityModel.Tokens
|
||||
[MonoTODO]
|
||||
public virtual void ReadXml (XmlDictionaryReader reader,
|
||||
SamlSerializer samlSerializer,
|
||||
SecurityTokenSerializer keyInfoTokenSerializer,
|
||||
SecurityTokenSerializer keyInfoSerializer,
|
||||
SecurityTokenResolver outOfBandTokenResolver)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
@@ -188,7 +188,7 @@ namespace System.IdentityModel.Tokens
|
||||
|
||||
public virtual void WriteXml (XmlDictionaryWriter writer,
|
||||
SamlSerializer samlSerializer,
|
||||
SecurityTokenSerializer keyInfoTokenSerializer)
|
||||
SecurityTokenSerializer keyInfoSerializer)
|
||||
{
|
||||
if (writer == null)
|
||||
throw new ArgumentNullException ("writer");
|
||||
@@ -211,11 +211,11 @@ namespace System.IdentityModel.Tokens
|
||||
|
||||
try {
|
||||
if (Conditions != null)
|
||||
Conditions.WriteXml (writer, samlSerializer, keyInfoTokenSerializer);
|
||||
Conditions.WriteXml (writer, samlSerializer, keyInfoSerializer);
|
||||
if (Advice != null)
|
||||
Advice.WriteXml (writer, samlSerializer, keyInfoTokenSerializer);
|
||||
Advice.WriteXml (writer, samlSerializer, keyInfoSerializer);
|
||||
foreach (SamlStatement statement in Statements)
|
||||
statement.WriteXml (writer, samlSerializer, keyInfoTokenSerializer);
|
||||
statement.WriteXml (writer, samlSerializer, keyInfoSerializer);
|
||||
} catch (NotImplementedException) {
|
||||
throw;
|
||||
} catch (Exception ex) { // bad catch, eh?
|
||||
@@ -226,7 +226,7 @@ namespace System.IdentityModel.Tokens
|
||||
|
||||
[MonoTODO]
|
||||
protected void ReadSignature (XmlDictionaryReader reader,
|
||||
SecurityTokenSerializer keyInfoTokenSerializer,
|
||||
SecurityTokenSerializer keyInfoSerializer,
|
||||
SecurityTokenResolver outOfBandTokenResolver,
|
||||
SamlSerializer samlSerializer)
|
||||
{
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace System.IdentityModel.Tokens
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override bool Matches (SecurityKeyIdentifierClause clause)
|
||||
public override bool Matches (SecurityKeyIdentifierClause keyIdentifierClause)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ namespace System.IdentityModel.Tokens
|
||||
[MonoTODO]
|
||||
public virtual void ReadXml (XmlDictionaryReader reader,
|
||||
SamlSerializer samlSerializer,
|
||||
SecurityTokenSerializer keyInfoTokenSerializer,
|
||||
SecurityTokenSerializer keyInfoSerializer,
|
||||
SecurityTokenResolver outOfBandTokenResolver)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
@@ -122,7 +122,7 @@ namespace System.IdentityModel.Tokens
|
||||
|
||||
public virtual void WriteXml (XmlDictionaryWriter writer,
|
||||
SamlSerializer samlSerializer,
|
||||
SecurityTokenSerializer keyInfoTokenSerializer)
|
||||
SecurityTokenSerializer keyInfoSerializer)
|
||||
{
|
||||
writer.WriteStartElement ("saml", "Attribute", SamlConstants.Namespace);
|
||||
writer.WriteAttributeString ("AttributeName", Name);
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace System.IdentityModel.Tokens
|
||||
[MonoTODO]
|
||||
public override void ReadXml (XmlDictionaryReader reader,
|
||||
SamlSerializer samlSerializer,
|
||||
SecurityTokenSerializer keyInfoTokenSerializer,
|
||||
SecurityTokenSerializer keyInfoSerializer,
|
||||
SecurityTokenResolver outOfBandTokenResolver)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
@@ -74,14 +74,14 @@ namespace System.IdentityModel.Tokens
|
||||
|
||||
public override void WriteXml (XmlDictionaryWriter writer,
|
||||
SamlSerializer samlSerializer,
|
||||
SecurityTokenSerializer keyInfoTokenSerializer)
|
||||
SecurityTokenSerializer keyInfoSerializer)
|
||||
{
|
||||
if (SamlSubject == null)
|
||||
throw new SecurityTokenException ("Subject is null in the AttributeStatement");
|
||||
writer.WriteStartElement ("saml", "AttributeStatement", SamlConstants.Namespace);
|
||||
SamlSubject.WriteXml (writer, samlSerializer, keyInfoTokenSerializer);
|
||||
SamlSubject.WriteXml (writer, samlSerializer, keyInfoSerializer);
|
||||
foreach (SamlAttribute a in Attributes)
|
||||
a.WriteXml (writer, samlSerializer, keyInfoTokenSerializer);
|
||||
a.WriteXml (writer, samlSerializer, keyInfoSerializer);
|
||||
writer.WriteEndElement ();
|
||||
}
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace System.IdentityModel.Tokens
|
||||
[MonoTODO]
|
||||
public override void ReadXml (XmlDictionaryReader reader,
|
||||
SamlSerializer samlSerializer,
|
||||
SecurityTokenSerializer keyInfoTokenSerializer,
|
||||
SecurityTokenSerializer keyInfoSerializer,
|
||||
SecurityTokenResolver outOfBandTokenResolver)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
@@ -132,7 +132,7 @@ namespace System.IdentityModel.Tokens
|
||||
|
||||
public override void WriteXml (XmlDictionaryWriter writer,
|
||||
SamlSerializer samlSerializer,
|
||||
SecurityTokenSerializer keyInfoTokenSerializer)
|
||||
SecurityTokenSerializer keyInfoSerializer)
|
||||
{
|
||||
if (writer == null)
|
||||
throw new ArgumentNullException ("writer");
|
||||
@@ -145,7 +145,7 @@ namespace System.IdentityModel.Tokens
|
||||
writer.WriteAttributeString ("AuthenticationMethod", AuthenticationMethod);
|
||||
writer.WriteAttributeString ("AuthenticationInstant",
|
||||
AuthenticationInstant.ToString (SamlConstants.DateFormat, CultureInfo.InvariantCulture));
|
||||
SamlSubject.WriteXml (writer, samlSerializer, keyInfoTokenSerializer);
|
||||
SamlSubject.WriteXml (writer, samlSerializer, keyInfoSerializer);
|
||||
if (DnsAddress != null || IPAddress != null) {
|
||||
writer.WriteStartElement ("saml", "SubjectLocality", SamlConstants.Namespace);
|
||||
if (IPAddress != null)
|
||||
|
||||
@@ -46,11 +46,11 @@ namespace System.IdentityModel.Tokens
|
||||
{
|
||||
}
|
||||
|
||||
public SamlAuthorityBinding (XmlQualifiedName kind, string binding, string location)
|
||||
public SamlAuthorityBinding (XmlQualifiedName authorityKind, string binding, string location)
|
||||
{
|
||||
if (kind == null)
|
||||
throw new ArgumentNullException ("kind");
|
||||
AuthorityKind = kind;
|
||||
if (authorityKind == null)
|
||||
throw new ArgumentNullException ("authorityKind");
|
||||
AuthorityKind = authorityKind;
|
||||
Binding = binding;
|
||||
Location = location;
|
||||
}
|
||||
|
||||
@@ -39,10 +39,10 @@ namespace System.IdentityModel.Tokens
|
||||
public class SamlAuthorizationDecisionClaimResource
|
||||
{
|
||||
public SamlAuthorizationDecisionClaimResource (
|
||||
string resource, SamlAccessDecision decision, string actionName, string actionNamespace)
|
||||
string resource, SamlAccessDecision accessDecision, string actionNamespace, string actionName)
|
||||
{
|
||||
this.resource = resource;
|
||||
this.decision = decision;
|
||||
this.decision = accessDecision;
|
||||
this.name = actionName;
|
||||
this.ns = actionNamespace;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user