243 lines
11 KiB
C#
243 lines
11 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Runtime.InteropServices;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
|
|
{
|
|
// Token: 0x02001826 RID: 6182
|
|
[Token(Token = "0x2001826")]
|
|
[StructLayout(3)]
|
|
public class ExtendedKeyUsage : Asn1Encodable
|
|
{
|
|
// Token: 0x0600A68F RID: 42639 RVA: 0x0026B8D4 File Offset: 0x00269AD4
|
|
[Token(Token = "0x600A68F")]
|
|
[Address(RVA = "0x2B04300", Offset = "0x2B02D00", VA = "0x182B04300")]
|
|
public static ExtendedKeyUsage GetInstance(Asn1TaggedObject obj, bool explicitly)
|
|
{
|
|
return ExtendedKeyUsage.GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
|
|
}
|
|
|
|
// Token: 0x0600A690 RID: 42640 RVA: 0x0026B8F0 File Offset: 0x00269AF0
|
|
[Token(Token = "0x600A690")]
|
|
[Address(RVA = "0x2B04320", Offset = "0x2B02D20", VA = "0x182B04320")]
|
|
public static ExtendedKeyUsage GetInstance(object obj)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600A690)
|
|
|
|
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: 0x0600A691 RID: 42641 RVA: 0x0026B954 File Offset: 0x00269B54
|
|
[Token(Token = "0x600A691")]
|
|
[Address(RVA = "0x2B04B10", Offset = "0x2B03510", VA = "0x182B04B10")]
|
|
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_4F;
|
|
}
|
|
IDictionary dictionary2 = this.usageTable;
|
|
}
|
|
if (enumerator != 0)
|
|
{
|
|
}
|
|
if (num != -1)
|
|
{
|
|
}
|
|
}
|
|
while (num != 0);
|
|
return;
|
|
IL_4F:
|
|
ArgumentException ex = new ArgumentException("Only DerObjectIdentifier instances allowed in ExtendedKeyUsage.");
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600A692 RID: 42642 RVA: 0x0026B9C4 File Offset: 0x00269BC4
|
|
[Token(Token = "0x600A692")]
|
|
[Address(RVA = "0x2B04980", Offset = "0x2B03380", VA = "0x182B04980")]
|
|
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: 0x0600A693 RID: 42643 RVA: 0x0026BA4C File Offset: 0x00269C4C
|
|
[Token(Token = "0x600A693")]
|
|
[Address(RVA = "0x2B04B00", Offset = "0x2B03500", VA = "0x182B04B00")]
|
|
[Obsolete]
|
|
public ExtendedKeyUsage(ArrayList usages)
|
|
{
|
|
}
|
|
|
|
// Token: 0x0600A694 RID: 42644 RVA: 0x0026BA5C File Offset: 0x00269C5C
|
|
[Token(Token = "0x600A694")]
|
|
[Address(RVA = "0x2B046E0", Offset = "0x2B030E0", VA = "0x182B046E0")]
|
|
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 != -1)
|
|
{
|
|
}
|
|
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: 0x0600A695 RID: 42645 RVA: 0x0026BAF8 File Offset: 0x00269CF8
|
|
[Token(Token = "0x600A695")]
|
|
[Address(RVA = "0x2B04620", Offset = "0x2B03020", VA = "0x182B04620")]
|
|
public bool HasKeyPurposeId(KeyPurposeID keyPurposeId)
|
|
{
|
|
IDictionary dictionary = this.usageTable;
|
|
int num = 0;
|
|
num += num;
|
|
num++;
|
|
object obj = dictionary[keyPurposeId];
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600A696 RID: 42646 RVA: 0x0026BB24 File Offset: 0x00269D24
|
|
[Token(Token = "0x600A696")]
|
|
[Address(RVA = "0x2B045A0", Offset = "0x2B02FA0", VA = "0x182B045A0")]
|
|
[Obsolete]
|
|
public ArrayList GetUsages()
|
|
{
|
|
IDictionary dictionary = this.usageTable;
|
|
ArrayList arrayList;
|
|
return arrayList;
|
|
}
|
|
|
|
// Token: 0x0600A697 RID: 42647 RVA: 0x0026BB40 File Offset: 0x00269D40
|
|
[Token(Token = "0x600A697")]
|
|
[Address(RVA = "0x2B04280", Offset = "0x2B02C80", VA = "0x182B04280")]
|
|
public IList GetAllUsages()
|
|
{
|
|
IDictionary dictionary = this.usageTable;
|
|
IList list;
|
|
return list;
|
|
}
|
|
|
|
// Token: 0x17001A08 RID: 6664
|
|
// (get) Token: 0x0600A698 RID: 42648 RVA: 0x0026BB5C File Offset: 0x00269D5C
|
|
[Token(Token = "0x17001A08")]
|
|
public int Count
|
|
{
|
|
[Token(Token = "0x600A698")]
|
|
[Address(RVA = "0x2B04D20", Offset = "0x2B03720", VA = "0x182B04D20")]
|
|
get
|
|
{
|
|
IDictionary dictionary = this.usageTable;
|
|
throw new NullReferenceException();
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600A699 RID: 42649 RVA: 0x0026BB78 File Offset: 0x00269D78
|
|
[Token(Token = "0x600A699")]
|
|
[Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240", Slot = "5")]
|
|
public override Asn1Object ToAsn1Object()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600A699)
|
|
|
|
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: 0x04006C52 RID: 27730
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4006C52")]
|
|
internal readonly IDictionary usageTable;
|
|
|
|
// Token: 0x04006C53 RID: 27731
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4006C53")]
|
|
internal readonly Asn1Sequence seq;
|
|
}
|
|
}
|