235 lines
11 KiB
C#
235 lines
11 KiB
C#
using System;
|
|
using System.Collections;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
|
|
{
|
|
// Token: 0x02001E03 RID: 7683
|
|
[Token(Token = "0x2001E03")]
|
|
public class ExtendedKeyUsage : Asn1Encodable
|
|
{
|
|
// Token: 0x0600C269 RID: 49769 RVA: 0x002C3EB8 File Offset: 0x002C20B8
|
|
[Token(Token = "0x600C269")]
|
|
[Address(RVA = "0x2728480", Offset = "0x2727280", VA = "0x182728480")]
|
|
public static ExtendedKeyUsage GetInstance(Asn1TaggedObject obj, bool explicitly)
|
|
{
|
|
return ExtendedKeyUsage.GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
|
|
}
|
|
|
|
// Token: 0x0600C26A RID: 49770 RVA: 0x002C3ED4 File Offset: 0x002C20D4
|
|
[Token(Token = "0x600C26A")]
|
|
[Address(RVA = "0x27284A0", Offset = "0x27272A0", VA = "0x1827284A0")]
|
|
public static ExtendedKeyUsage GetInstance(object obj)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600C26A)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.ExtendedKeyUsage BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.ExtendedKeyUsage::GetInstance(System.Object)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_3C:
|
|
stloc:string(var_9_42, call:string(Platform::GetTypeName, ldloc:object(obj)))
|
|
stloc:ArgumentException(var_10_55, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("Invalid ExtendedKeyUsage: "), ldloc:string(var_9_42))))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x0600C26B RID: 49771 RVA: 0x002C3F38 File Offset: 0x002C2138
|
|
[Token(Token = "0x600C26B")]
|
|
[Address(RVA = "0x2728C60", Offset = "0x2727A60", VA = "0x182728C60")]
|
|
private ExtendedKeyUsage(Asn1Sequence seq)
|
|
{
|
|
int num;
|
|
do
|
|
{
|
|
num = 0;
|
|
IDictionary dictionary = Platform.CreateHashtable();
|
|
this.usageTable = dictionary;
|
|
base..ctor();
|
|
this.seq = seq;
|
|
IEnumerator enumerator = seq.GetEnumerator();
|
|
if (enumerator != 0)
|
|
{
|
|
if (enumerator == 0 || enumerator == 0)
|
|
{
|
|
goto IL_4B;
|
|
}
|
|
IDictionary dictionary2 = this.usageTable;
|
|
}
|
|
if (enumerator != 0)
|
|
{
|
|
}
|
|
}
|
|
while (num != 0);
|
|
return;
|
|
IL_4B:
|
|
ArgumentException ex = new ArgumentException("Only DerObjectIdentifier instances allowed in ExtendedKeyUsage.");
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600C26C RID: 49772 RVA: 0x002C3FA4 File Offset: 0x002C21A4
|
|
[Token(Token = "0x600C26C")]
|
|
[Address(RVA = "0x2728AD0", Offset = "0x27278D0", VA = "0x182728AD0")]
|
|
public ExtendedKeyUsage(params KeyPurposeID[] usages)
|
|
{
|
|
IDictionary dictionary = Platform.CreateHashtable();
|
|
this.usageTable = dictionary;
|
|
base..ctor();
|
|
DerSequence derSequence = new DerSequence(usages);
|
|
int num = 0;
|
|
int num2 = 0;
|
|
this.seq = derSequence;
|
|
int length = usages.Length;
|
|
if (num2 < length)
|
|
{
|
|
IDictionary dictionary2 = this.usageTable;
|
|
KeyPurposeID keyPurposeID = usages[num2];
|
|
if (num2 < num)
|
|
{
|
|
num2 += num2;
|
|
num2++;
|
|
}
|
|
num2++;
|
|
keyPurposeID += keyPurposeID;
|
|
num2++;
|
|
num2 += 19;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600C26D RID: 49773 RVA: 0x002C402C File Offset: 0x002C222C
|
|
[Token(Token = "0x600C26D")]
|
|
[Address(RVA = "0x2728C50", Offset = "0x2727A50", VA = "0x182728C50")]
|
|
[Obsolete]
|
|
public ExtendedKeyUsage(ArrayList usages)
|
|
{
|
|
}
|
|
|
|
// Token: 0x0600C26E RID: 49774 RVA: 0x002C403C File Offset: 0x002C223C
|
|
[Token(Token = "0x600C26E")]
|
|
[Address(RVA = "0x2728860", Offset = "0x2727660", VA = "0x182728860")]
|
|
public ExtendedKeyUsage(IEnumerable usages)
|
|
{
|
|
Asn1EncodableVector asn1EncodableVector;
|
|
for (;;)
|
|
{
|
|
int num = 0;
|
|
IDictionary dictionary = Platform.CreateHashtable();
|
|
this.usageTable = dictionary;
|
|
base..ctor();
|
|
if (asn1EncodableVector != 0)
|
|
{
|
|
break;
|
|
}
|
|
ArrayTypeMismatchException ex;
|
|
if (ex != 0)
|
|
{
|
|
}
|
|
if (num == 0)
|
|
{
|
|
goto Block_1;
|
|
}
|
|
}
|
|
DerObjectIdentifier instance = DerObjectIdentifier.GetInstance(asn1EncodableVector);
|
|
Asn1Encodable[] array = new Asn1Encodable[1];
|
|
throw new ArrayTypeMismatchException();
|
|
Block_1:
|
|
DerSequence derSequence = new DerSequence(asn1EncodableVector);
|
|
this.seq = derSequence;
|
|
}
|
|
|
|
// Token: 0x0600C26F RID: 49775 RVA: 0x002C40D4 File Offset: 0x002C22D4
|
|
[Token(Token = "0x600C26F")]
|
|
[Address(RVA = "0x27287A0", Offset = "0x27275A0", VA = "0x1827287A0")]
|
|
public bool HasKeyPurposeId(KeyPurposeID keyPurposeId)
|
|
{
|
|
IDictionary dictionary = this.usageTable;
|
|
int num = 0;
|
|
num += num;
|
|
num++;
|
|
object obj = dictionary[keyPurposeId];
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600C270 RID: 49776 RVA: 0x002C4100 File Offset: 0x002C2300
|
|
[Token(Token = "0x600C270")]
|
|
[Address(RVA = "0x2728720", Offset = "0x2727520", VA = "0x182728720")]
|
|
[Obsolete]
|
|
public ArrayList GetUsages()
|
|
{
|
|
IDictionary dictionary = this.usageTable;
|
|
ArrayList arrayList;
|
|
return arrayList;
|
|
}
|
|
|
|
// Token: 0x0600C271 RID: 49777 RVA: 0x002C411C File Offset: 0x002C231C
|
|
[Token(Token = "0x600C271")]
|
|
[Address(RVA = "0x2728400", Offset = "0x2727200", VA = "0x182728400")]
|
|
public IList GetAllUsages()
|
|
{
|
|
IDictionary dictionary = this.usageTable;
|
|
IList list;
|
|
return list;
|
|
}
|
|
|
|
// Token: 0x17001E09 RID: 7689
|
|
// (get) Token: 0x0600C272 RID: 49778 RVA: 0x002C4138 File Offset: 0x002C2338
|
|
[Token(Token = "0x17001E09")]
|
|
public int Count
|
|
{
|
|
[Token(Token = "0x600C272")]
|
|
[Address(RVA = "0x2728E50", Offset = "0x2727C50", VA = "0x182728E50")]
|
|
get
|
|
{
|
|
IDictionary dictionary = this.usageTable;
|
|
throw new NullReferenceException();
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600C273 RID: 49779 RVA: 0x002C4154 File Offset: 0x002C2354
|
|
[Token(Token = "0x600C273")]
|
|
[Address(RVA = "0x3F5F40", Offset = "0x3F4D40", VA = "0x1803F5F40", Slot = "5")]
|
|
public override Asn1Object ToAsn1Object()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600C273)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1Object BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.ExtendedKeyUsage::ToAsn1Object()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:Asn1Sequence(var_0_06, ldfld:Asn1Sequence(ExtendedKeyUsage::seq, ldloc:ExtendedKeyUsage(this)))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x04007A95 RID: 31381
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4007A95")]
|
|
internal readonly IDictionary usageTable;
|
|
|
|
// Token: 0x04007A96 RID: 31382
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4007A96")]
|
|
internal readonly Asn1Sequence seq;
|
|
}
|
|
}
|