216 lines
12 KiB
C#
216 lines
12 KiB
C#
using System;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
|
|
{
|
|
// Token: 0x02001ED6 RID: 7894
|
|
[Token(Token = "0x2001ED6")]
|
|
public class BasicConstraints : Asn1Encodable
|
|
{
|
|
// Token: 0x0600C5DA RID: 50650 RVA: 0x002CAFD8 File Offset: 0x002C91D8
|
|
[Token(Token = "0x600C5DA")]
|
|
[Address(RVA = "0x2D85750", Offset = "0x2D84750", VA = "0x182D85750")]
|
|
public static BasicConstraints GetInstance(Asn1TaggedObject obj, bool explicitly)
|
|
{
|
|
return BasicConstraints.GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
|
|
}
|
|
|
|
// Token: 0x0600C5DB RID: 50651 RVA: 0x002CAFF4 File Offset: 0x002C91F4
|
|
[Token(Token = "0x600C5DB")]
|
|
[Address(RVA = "0x2D85770", Offset = "0x2D84770", VA = "0x182D85770")]
|
|
public static BasicConstraints GetInstance(object obj)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600C5DB)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.BasicConstraints BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.BasicConstraints::GetInstance(System.Object)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_40:
|
|
stloc:string(var_9_46, call:string(Platform::GetTypeName, ldloc:object(obj)))
|
|
stloc:ArgumentException(var_10_5E, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("unknown object in factory: "), ldloc:string(var_9_46)), ldstr:string("obj")))
|
|
}
|
|
|
|
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: 0x0600C5DC RID: 50652 RVA: 0x002CB060 File Offset: 0x002C9260
|
|
[Token(Token = "0x600C5DC")]
|
|
[Address(RVA = "0x2D85E20", Offset = "0x2D84E20", VA = "0x182D85E20")]
|
|
private BasicConstraints(Asn1Sequence seq)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600C5DC)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.BasicConstraints::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1Sequence)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_66:
|
|
stloc:ArgumentException(var_11_75, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("wrong sequence in constructor"), ldstr:string("seq")))
|
|
}
|
|
|
|
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.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
|
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: 0x0600C5DD RID: 50653 RVA: 0x002CB0E4 File Offset: 0x002C92E4
|
|
[Token(Token = "0x600C5DD")]
|
|
[Address(RVA = "0x2D86080", Offset = "0x2D85080", VA = "0x182D86080")]
|
|
public BasicConstraints(bool cA)
|
|
{
|
|
if (cA)
|
|
{
|
|
DerBoolean @true = DerBoolean.True;
|
|
this.cA = @true;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600C5DE RID: 50654 RVA: 0x002CB108 File Offset: 0x002C9308
|
|
[Token(Token = "0x600C5DE")]
|
|
[Address(RVA = "0x2D85FE0", Offset = "0x2D84FE0", VA = "0x182D85FE0")]
|
|
public BasicConstraints(int pathLenConstraint)
|
|
{
|
|
DerBoolean @true = DerBoolean.True;
|
|
this.cA = @true;
|
|
DerInteger derInteger = new DerInteger(pathLenConstraint);
|
|
this.pathLenConstraint = derInteger;
|
|
}
|
|
|
|
// Token: 0x0600C5DF RID: 50655 RVA: 0x002CB138 File Offset: 0x002C9338
|
|
[Token(Token = "0x600C5DF")]
|
|
[Address(RVA = "0x2D85A00", Offset = "0x2D84A00", VA = "0x182D85A00")]
|
|
public bool IsCA()
|
|
{
|
|
DerBoolean derBoolean = this.cA;
|
|
if (derBoolean == 0)
|
|
{
|
|
}
|
|
return derBoolean.IsTrue;
|
|
}
|
|
|
|
// Token: 0x17001E92 RID: 7826
|
|
// (get) Token: 0x0600C5E0 RID: 50656 RVA: 0x002CB158 File Offset: 0x002C9358
|
|
[Token(Token = "0x17001E92")]
|
|
public BigInteger PathLenConstraint
|
|
{
|
|
[Token(Token = "0x600C5E0")]
|
|
[Address(RVA = "0x2D86100", Offset = "0x2D85100", VA = "0x182D86100")]
|
|
get
|
|
{
|
|
DerInteger derInteger = this.pathLenConstraint;
|
|
if (derInteger == 0)
|
|
{
|
|
}
|
|
return derInteger.Value;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600C5E1 RID: 50657 RVA: 0x002CB178 File Offset: 0x002C9378
|
|
[Token(Token = "0x600C5E1")]
|
|
[Address(RVA = "0x2D85A20", Offset = "0x2D84A20", VA = "0x182D85A20", Slot = "5")]
|
|
public override Asn1Object ToAsn1Object()
|
|
{
|
|
Asn1EncodableVector asn1EncodableVector;
|
|
if (this.cA != (ulong)0L)
|
|
{
|
|
Asn1Encodable[] array = new Asn1Encodable[1];
|
|
DerBoolean derBoolean = this.cA;
|
|
if (derBoolean != 0)
|
|
{
|
|
}
|
|
array[0] = derBoolean;
|
|
asn1EncodableVector.Add(array);
|
|
}
|
|
if (this.pathLenConstraint != (ulong)0L)
|
|
{
|
|
Asn1Encodable[] array2 = new Asn1Encodable[1];
|
|
DerInteger derInteger = this.pathLenConstraint;
|
|
if (derInteger != 0)
|
|
{
|
|
}
|
|
array2[0] = derInteger;
|
|
asn1EncodableVector.Add(array2);
|
|
}
|
|
DerSequence derSequence = new DerSequence(asn1EncodableVector);
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600C5E2 RID: 50658 RVA: 0x002CB1F0 File Offset: 0x002C93F0
|
|
[Token(Token = "0x600C5E2")]
|
|
[Address(RVA = "0x2D85BD0", Offset = "0x2D84BD0", VA = "0x182D85BD0", Slot = "3")]
|
|
public override string ToString()
|
|
{
|
|
if (this.pathLenConstraint != (ulong)0L)
|
|
{
|
|
object[] array = new object[4];
|
|
if ("BasicConstraints: isCa(" != 0)
|
|
{
|
|
}
|
|
array[0] = "BasicConstraints: isCa(";
|
|
DerBoolean derBoolean = this.cA;
|
|
if (derBoolean == 0)
|
|
{
|
|
}
|
|
bool isTrue = derBoolean.IsTrue;
|
|
string text;
|
|
if (text != 0)
|
|
{
|
|
}
|
|
array[1] = text;
|
|
if ("), pathLenConstraint = " != 0)
|
|
{
|
|
}
|
|
array[2] = "), pathLenConstraint = ";
|
|
BigInteger value = this.pathLenConstraint.Value;
|
|
if (value != 0)
|
|
{
|
|
}
|
|
array[3] = value;
|
|
return string.Concat(array);
|
|
}
|
|
DerBoolean derBoolean2 = this.cA;
|
|
if (derBoolean2 == 0)
|
|
{
|
|
}
|
|
bool isTrue2 = derBoolean2.IsTrue;
|
|
string text2;
|
|
return "BasicConstraints: isCa(" + text2 + ")";
|
|
}
|
|
|
|
// Token: 0x04007C27 RID: 31783
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4007C27")]
|
|
private readonly DerBoolean cA;
|
|
|
|
// Token: 0x04007C28 RID: 31784
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4007C28")]
|
|
private readonly DerInteger pathLenConstraint;
|
|
}
|
|
}
|