231 lines
10 KiB
C#
231 lines
10 KiB
C#
using System;
|
|
using System.Collections;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
|
|
{
|
|
// Token: 0x02001EE3 RID: 7907
|
|
[Token(Token = "0x2001EE3")]
|
|
public class ExtendedKeyUsage : Asn1Encodable
|
|
{
|
|
// Token: 0x0600C637 RID: 50743 RVA: 0x002CC6F8 File Offset: 0x002CA8F8
|
|
[Token(Token = "0x600C637")]
|
|
[Address(RVA = "0x2E791C0", Offset = "0x2E781C0", VA = "0x182E791C0")]
|
|
public static ExtendedKeyUsage GetInstance(Asn1TaggedObject obj, bool explicitly)
|
|
{
|
|
return ExtendedKeyUsage.GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
|
|
}
|
|
|
|
// Token: 0x0600C638 RID: 50744 RVA: 0x002CC714 File Offset: 0x002CA914
|
|
[Token(Token = "0x600C638")]
|
|
[Address(RVA = "0x2E791E0", Offset = "0x2E781E0", VA = "0x182E791E0")]
|
|
public static ExtendedKeyUsage GetInstance(object obj)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600C638)
|
|
|
|
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 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x0600C639 RID: 50745 RVA: 0x002CC778 File Offset: 0x002CA978
|
|
[Token(Token = "0x600C639")]
|
|
[Address(RVA = "0x2E79940", Offset = "0x2E78940", VA = "0x182E79940")]
|
|
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: 0x0600C63A RID: 50746 RVA: 0x002CC7E4 File Offset: 0x002CA9E4
|
|
[Token(Token = "0x600C63A")]
|
|
[Address(RVA = "0x2E797B0", Offset = "0x2E787B0", VA = "0x182E797B0")]
|
|
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: 0x0600C63B RID: 50747 RVA: 0x002CC86C File Offset: 0x002CAA6C
|
|
[Token(Token = "0x600C63B")]
|
|
[Address(RVA = "0x2E79930", Offset = "0x2E78930", VA = "0x182E79930")]
|
|
[Obsolete]
|
|
public ExtendedKeyUsage(ArrayList usages)
|
|
{
|
|
}
|
|
|
|
// Token: 0x0600C63C RID: 50748 RVA: 0x002CC87C File Offset: 0x002CAA7C
|
|
[Token(Token = "0x600C63C")]
|
|
[Address(RVA = "0x2E79540", Offset = "0x2E78540", VA = "0x182E79540")]
|
|
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: 0x0600C63D RID: 50749 RVA: 0x002CC914 File Offset: 0x002CAB14
|
|
[Token(Token = "0x600C63D")]
|
|
[Address(RVA = "0x2E794E0", Offset = "0x2E784E0", VA = "0x182E794E0")]
|
|
public bool HasKeyPurposeId(KeyPurposeID keyPurposeId)
|
|
{
|
|
IDictionary dictionary = this.usageTable;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600C63E RID: 50750 RVA: 0x002CC930 File Offset: 0x002CAB30
|
|
[Token(Token = "0x600C63E")]
|
|
[Address(RVA = "0x2E79460", Offset = "0x2E78460", VA = "0x182E79460")]
|
|
[Obsolete]
|
|
public ArrayList GetUsages()
|
|
{
|
|
IDictionary dictionary = this.usageTable;
|
|
ArrayList arrayList;
|
|
return arrayList;
|
|
}
|
|
|
|
// Token: 0x0600C63F RID: 50751 RVA: 0x002CC94C File Offset: 0x002CAB4C
|
|
[Token(Token = "0x600C63F")]
|
|
[Address(RVA = "0x2E79140", Offset = "0x2E78140", VA = "0x182E79140")]
|
|
public IList GetAllUsages()
|
|
{
|
|
IDictionary dictionary = this.usageTable;
|
|
IList list;
|
|
return list;
|
|
}
|
|
|
|
// Token: 0x17001EA6 RID: 7846
|
|
// (get) Token: 0x0600C640 RID: 50752 RVA: 0x002CC968 File Offset: 0x002CAB68
|
|
[Token(Token = "0x17001EA6")]
|
|
public int Count
|
|
{
|
|
[Token(Token = "0x600C640")]
|
|
[Address(RVA = "0x2E79B30", Offset = "0x2E78B30", VA = "0x182E79B30")]
|
|
get
|
|
{
|
|
IDictionary dictionary = this.usageTable;
|
|
throw new NullReferenceException();
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600C641 RID: 50753 RVA: 0x002CC984 File Offset: 0x002CAB84
|
|
[Token(Token = "0x600C641")]
|
|
[Address(RVA = "0x4157B0", Offset = "0x4147B0", VA = "0x1804157B0", Slot = "5")]
|
|
public override Asn1Object ToAsn1Object()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600C641)
|
|
|
|
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 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x04007C4E RID: 31822
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4007C4E")]
|
|
internal readonly IDictionary usageTable;
|
|
|
|
// Token: 0x04007C4F RID: 31823
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4007C4F")]
|
|
internal readonly Asn1Sequence seq;
|
|
}
|
|
}
|