376 lines
9.3 KiB
C#
376 lines
9.3 KiB
C#
using System;
|
|
using System.Collections;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
|
|
{
|
|
// Token: 0x02001FF9 RID: 8185
|
|
[Token(Token = "0x2001FF9")]
|
|
public class AttributeTable
|
|
{
|
|
// Token: 0x0600CCF3 RID: 52467 RVA: 0x002E9910 File Offset: 0x002E7B10
|
|
[Token(Token = "0x600CCF3")]
|
|
[Address(RVA = "0x2FDAB50", Offset = "0x2FD9B50", VA = "0x182FDAB50")]
|
|
[Obsolete]
|
|
public AttributeTable(Hashtable attrs)
|
|
{
|
|
IDictionary dictionary = Platform.CreateHashtable(attrs);
|
|
this.attributes = dictionary;
|
|
}
|
|
|
|
// Token: 0x0600CCF4 RID: 52468 RVA: 0x002E9934 File Offset: 0x002E7B34
|
|
[Token(Token = "0x600CCF4")]
|
|
[Address(RVA = "0x2FDAAE0", Offset = "0x2FD9AE0", VA = "0x182FDAAE0")]
|
|
public AttributeTable(IDictionary attrs)
|
|
{
|
|
IDictionary dictionary = Platform.CreateHashtable(attrs);
|
|
this.attributes = dictionary;
|
|
}
|
|
|
|
// Token: 0x0600CCF5 RID: 52469 RVA: 0x002E9958 File Offset: 0x002E7B58
|
|
[Token(Token = "0x600CCF5")]
|
|
[Address(RVA = "0x2FDA8C0", Offset = "0x2FD98C0", VA = "0x182FDA8C0")]
|
|
public AttributeTable(Asn1EncodableVector v)
|
|
{
|
|
int num;
|
|
do
|
|
{
|
|
num = 0;
|
|
base..ctor();
|
|
IDictionary dictionary = Platform.CreateHashtable(v.Count);
|
|
this.attributes = dictionary;
|
|
IEnumerator enumerator = v.GetEnumerator();
|
|
Attribute instance;
|
|
if (enumerator != 0)
|
|
{
|
|
if (num < enumerator)
|
|
{
|
|
num += num;
|
|
num++;
|
|
}
|
|
if (num == 0)
|
|
{
|
|
num++;
|
|
num += 19;
|
|
}
|
|
if (num == 0)
|
|
{
|
|
goto IL_5F;
|
|
}
|
|
instance = Attribute.GetInstance(num);
|
|
this.AddAttribute(instance);
|
|
}
|
|
if (instance != 0)
|
|
{
|
|
}
|
|
}
|
|
while (num != 0);
|
|
return;
|
|
IL_5F:
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600CCF6 RID: 52470 RVA: 0x002E99CC File Offset: 0x002E7BCC
|
|
[Token(Token = "0x600CCF6")]
|
|
[Address(RVA = "0x2FDABC0", Offset = "0x2FD9BC0", VA = "0x182FDABC0")]
|
|
public AttributeTable(Asn1Set s)
|
|
{
|
|
IDictionary dictionary;
|
|
this.attributes = dictionary;
|
|
int num = 0;
|
|
Asn1Encodable asn1Encodable;
|
|
if (num != asn1Encodable)
|
|
{
|
|
IEnumerator enumerator = s.GetEnumerator();
|
|
Attribute attribute;
|
|
this.AddAttribute(attribute);
|
|
num++;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600CCF7 RID: 52471 RVA: 0x002E9A08 File Offset: 0x002E7C08
|
|
[Token(Token = "0x600CCF7")]
|
|
[Address(RVA = "0x2FDA790", Offset = "0x2FD9790", VA = "0x182FDA790")]
|
|
public AttributeTable(Attributes attrs)
|
|
{
|
|
Asn1Set instance = Asn1Set.GetInstance(attrs.ToAsn1Object());
|
|
base..ctor();
|
|
IDictionary dictionary;
|
|
this.attributes = dictionary;
|
|
int num = 0;
|
|
Asn1Encodable asn1Encodable;
|
|
if (num != asn1Encodable)
|
|
{
|
|
IEnumerator enumerator = instance.GetEnumerator();
|
|
Attribute attribute;
|
|
this.AddAttribute(attribute);
|
|
num++;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600CCF8 RID: 52472 RVA: 0x002E9A50 File Offset: 0x002E7C50
|
|
[Token(Token = "0x600CCF8")]
|
|
[Address(RVA = "0x2FD99C0", Offset = "0x2FD89C0", VA = "0x182FD99C0")]
|
|
private void AddAttribute(Attribute a)
|
|
{
|
|
int num;
|
|
do
|
|
{
|
|
IDictionary dictionary = this.attributes;
|
|
num = 0;
|
|
}
|
|
while (num == 0 && num == 0);
|
|
IList list = Platform.CreateArrayList();
|
|
IDictionary dictionary2 = this.attributes;
|
|
}
|
|
|
|
// Token: 0x17002036 RID: 8246
|
|
[Token(Token = "0x17002036")]
|
|
public Attribute this[DerObjectIdentifier oid]
|
|
{
|
|
[Token(Token = "0x600CCF9")]
|
|
[Address(RVA = "0x2FDAED0", Offset = "0x2FD9ED0", VA = "0x182FDAED0")]
|
|
get
|
|
{
|
|
for (;;)
|
|
{
|
|
IDictionary dictionary = this.attributes;
|
|
if (oid == 0)
|
|
{
|
|
}
|
|
if (oid != 0)
|
|
{
|
|
int num = 0;
|
|
if (num < dictionary)
|
|
{
|
|
num += num;
|
|
num++;
|
|
}
|
|
if (num == 0 || num != 0)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600CCFA RID: 52474 RVA: 0x002E9AE0 File Offset: 0x002E7CE0
|
|
[Token(Token = "0x600CCFA")]
|
|
[Address(RVA = "0x2FDA0F0", Offset = "0x2FD90F0", VA = "0x182FDA0F0")]
|
|
[Obsolete]
|
|
public Attribute Get(DerObjectIdentifier oid)
|
|
{
|
|
return this[oid];
|
|
}
|
|
|
|
// Token: 0x0600CCFB RID: 52475 RVA: 0x002E9AF4 File Offset: 0x002E7CF4
|
|
[Token(Token = "0x600CCFB")]
|
|
[Address(RVA = "0x2FD9C60", Offset = "0x2FD8C60", VA = "0x182FD9C60")]
|
|
public Asn1EncodableVector GetAll(DerObjectIdentifier oid)
|
|
{
|
|
Asn1EncodableVector asn1EncodableVector;
|
|
Asn1Encodable[] array2;
|
|
do
|
|
{
|
|
int num = 0;
|
|
IDictionary dictionary = this.attributes;
|
|
if (asn1EncodableVector != 0)
|
|
{
|
|
if (asn1EncodableVector == 0 || asn1EncodableVector == 0)
|
|
{
|
|
continue;
|
|
}
|
|
Asn1Encodable[] array;
|
|
if (asn1EncodableVector != 0)
|
|
{
|
|
if (num < asn1EncodableVector)
|
|
{
|
|
num += num;
|
|
num++;
|
|
}
|
|
if (asn1EncodableVector == 0)
|
|
{
|
|
}
|
|
if (asn1EncodableVector == 0)
|
|
{
|
|
goto IL_A7;
|
|
}
|
|
array = new Asn1Encodable[1];
|
|
if (asn1EncodableVector != 0)
|
|
{
|
|
}
|
|
array[0] = asn1EncodableVector;
|
|
asn1EncodableVector.Add(array);
|
|
}
|
|
if (array != 0)
|
|
{
|
|
}
|
|
if (num != 0)
|
|
{
|
|
continue;
|
|
}
|
|
if (num != -1)
|
|
{
|
|
}
|
|
}
|
|
if (asn1EncodableVector == 0)
|
|
{
|
|
return asn1EncodableVector;
|
|
}
|
|
array2 = new Asn1Encodable[1];
|
|
}
|
|
while (asn1EncodableVector == 0 || asn1EncodableVector == 0);
|
|
array2[0] = asn1EncodableVector;
|
|
asn1EncodableVector.Add(array2);
|
|
return asn1EncodableVector;
|
|
IL_A7:
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x17002037 RID: 8247
|
|
// (get) Token: 0x0600CCFC RID: 52476 RVA: 0x002E9BB0 File Offset: 0x002E7DB0
|
|
[Token(Token = "0x17002037")]
|
|
public int Count
|
|
{
|
|
[Token(Token = "0x600CCFC")]
|
|
[Address(RVA = "0x2FDACC0", Offset = "0x2FD9CC0", VA = "0x182FDACC0")]
|
|
get
|
|
{
|
|
int num;
|
|
do
|
|
{
|
|
num = 0;
|
|
IDictionary dictionary = this.attributes;
|
|
num += num;
|
|
num++;
|
|
if (num == 0)
|
|
{
|
|
num++;
|
|
num++;
|
|
num += 19;
|
|
}
|
|
num += num;
|
|
if (num != 0)
|
|
{
|
|
}
|
|
}
|
|
while (num != 0);
|
|
return num;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600CCFD RID: 52477 RVA: 0x002E9C00 File Offset: 0x002E7E00
|
|
[Token(Token = "0x600CCFD")]
|
|
[Address(RVA = "0x2FDA6D0", Offset = "0x2FD96D0", VA = "0x182FDA6D0")]
|
|
public IDictionary ToDictionary()
|
|
{
|
|
return Platform.CreateHashtable(this.attributes);
|
|
}
|
|
|
|
// Token: 0x0600CCFE RID: 52478 RVA: 0x002E9C18 File Offset: 0x002E7E18
|
|
[Token(Token = "0x600CCFE")]
|
|
[Address(RVA = "0x2FDA730", Offset = "0x2FD9730", VA = "0x182FDA730")]
|
|
[Obsolete]
|
|
public Hashtable ToHashtable()
|
|
{
|
|
return new Hashtable(this.attributes);
|
|
}
|
|
|
|
// Token: 0x0600CCFF RID: 52479 RVA: 0x002E9C30 File Offset: 0x002E7E30
|
|
[Token(Token = "0x600CCFF")]
|
|
[Address(RVA = "0x2FDA230", Offset = "0x2FD9230", VA = "0x182FDA230")]
|
|
public Asn1EncodableVector ToAsn1EncodableVector()
|
|
{
|
|
Asn1EncodableVector asn1EncodableVector;
|
|
Attribute instance;
|
|
for (;;)
|
|
{
|
|
IDictionary dictionary = this.attributes;
|
|
if (asn1EncodableVector != 0)
|
|
{
|
|
break;
|
|
}
|
|
if ((uint)(-1) != 0U)
|
|
{
|
|
}
|
|
if (instance == 0)
|
|
{
|
|
return asn1EncodableVector;
|
|
}
|
|
}
|
|
if (asn1EncodableVector != 0)
|
|
{
|
|
Attribute instance2;
|
|
if (asn1EncodableVector != 0)
|
|
{
|
|
Asn1Encodable[] array = new Asn1Encodable[1];
|
|
instance2 = Attribute.GetInstance(asn1EncodableVector);
|
|
throw new ArrayTypeMismatchException();
|
|
}
|
|
if ((uint)(-1) != 0U)
|
|
{
|
|
}
|
|
if (instance2 != 0)
|
|
{
|
|
throw new NullReferenceException();
|
|
}
|
|
if ((ulong)((uint)(-1)) != (ulong)(-1L))
|
|
{
|
|
}
|
|
}
|
|
Asn1Encodable[] array2 = new Asn1Encodable[1];
|
|
instance = Attribute.GetInstance(asn1EncodableVector);
|
|
throw new ArrayTypeMismatchException();
|
|
}
|
|
|
|
// Token: 0x0600CD00 RID: 52480 RVA: 0x002E9CF4 File Offset: 0x002E7EF4
|
|
[Token(Token = "0x600CD00")]
|
|
[Address(RVA = "0x2FDA620", Offset = "0x2FD9620", VA = "0x182FDA620")]
|
|
public Attributes ToAttributes()
|
|
{
|
|
BerSet berSet = new BerSet(this.ToAsn1EncodableVector());
|
|
Attributes attributes;
|
|
attributes.attributes = berSet;
|
|
return attributes;
|
|
}
|
|
|
|
// Token: 0x0600CD01 RID: 52481 RVA: 0x002E9D18 File Offset: 0x002E7F18
|
|
[Token(Token = "0x600CD01")]
|
|
[Address(RVA = "0x2FD9B50", Offset = "0x2FD8B50", VA = "0x182FD9B50")]
|
|
public AttributeTable Add(DerObjectIdentifier attrType, Asn1Encodable attrValue)
|
|
{
|
|
IDictionary dictionary = Platform.CreateHashtable(this.attributes);
|
|
AttributeTable attributeTable;
|
|
attributeTable.attributes = dictionary;
|
|
DerSet derSet = new DerSet(attrValue);
|
|
Attribute attribute;
|
|
attribute.attrType = attrType;
|
|
attribute.attrValues = derSet;
|
|
attributeTable.AddAttribute(attribute);
|
|
return attributeTable;
|
|
}
|
|
|
|
// Token: 0x0600CD02 RID: 52482 RVA: 0x002E9D58 File Offset: 0x002E7F58
|
|
[Token(Token = "0x600CD02")]
|
|
[Address(RVA = "0x2FDA100", Offset = "0x2FD9100", VA = "0x182FDA100")]
|
|
public AttributeTable Remove(DerObjectIdentifier attrType)
|
|
{
|
|
IDictionary dictionary = Platform.CreateHashtable(this.attributes);
|
|
AttributeTable attributeTable;
|
|
attributeTable.attributes = dictionary;
|
|
int num = 0;
|
|
num += num;
|
|
num++;
|
|
return attributeTable;
|
|
}
|
|
|
|
// Token: 0x04008209 RID: 33289
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4008209")]
|
|
private readonly IDictionary attributes;
|
|
}
|
|
}
|