229 lines
8.6 KiB
C#
229 lines
8.6 KiB
C#
using System;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
|
|
{
|
|
// Token: 0x02001F57 RID: 8023
|
|
[Token(Token = "0x2001F57")]
|
|
public class KeyRecRepContent : Asn1Encodable
|
|
{
|
|
// Token: 0x0600CAF3 RID: 51955 RVA: 0x002E7F6C File Offset: 0x002E616C
|
|
[Token(Token = "0x600CAF3")]
|
|
[Address(RVA = "0x2651780", Offset = "0x2650580", VA = "0x182651780")]
|
|
private KeyRecRepContent(Asn1Sequence seq)
|
|
{
|
|
Asn1SequenceParser parser = seq.Parser;
|
|
PkiStatusInfo pkiStatusInfo;
|
|
this.status = pkiStatusInfo;
|
|
uint num;
|
|
Asn1Encodable asn1Encodable;
|
|
if (num < asn1Encodable)
|
|
{
|
|
Asn1SequenceParser parser2 = seq.Parser;
|
|
Asn1TaggedObject asn1TaggedObject;
|
|
int tagNo = asn1TaggedObject.tagNo;
|
|
if (tagNo != 0)
|
|
{
|
|
if (tagNo != 0)
|
|
{
|
|
if (tagNo != 1)
|
|
{
|
|
throw new NullReferenceException();
|
|
}
|
|
Asn1Encodable obj = asn1TaggedObject.obj;
|
|
if (obj == 0)
|
|
{
|
|
Asn1Sequence instance = Asn1Sequence.GetInstance(0);
|
|
this.keyPairHist = instance;
|
|
num += (uint)1;
|
|
}
|
|
Asn1Sequence instance2 = Asn1Sequence.GetInstance(obj.ToAsn1Object());
|
|
this.keyPairHist = instance2;
|
|
num += (uint)1;
|
|
}
|
|
if (asn1TaggedObject.obj == 0)
|
|
{
|
|
Asn1Sequence instance3 = Asn1Sequence.GetInstance(0);
|
|
this.caCerts = instance3;
|
|
num += (uint)1;
|
|
}
|
|
int num2;
|
|
Asn1Sequence instance4 = Asn1Sequence.GetInstance(num2);
|
|
this.caCerts = instance4;
|
|
num += (uint)1;
|
|
}
|
|
Asn1Encodable obj2 = asn1TaggedObject.obj;
|
|
if (obj2 == 0)
|
|
{
|
|
}
|
|
CmpCertificate instance5 = CmpCertificate.GetInstance(obj2.ToAsn1Object());
|
|
this.newSigCert = instance5;
|
|
num += (uint)1;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600CAF4 RID: 51956 RVA: 0x002E8080 File Offset: 0x002E6280
|
|
[Token(Token = "0x600CAF4")]
|
|
[Address(RVA = "0x2651330", Offset = "0x2650130", VA = "0x182651330")]
|
|
public static KeyRecRepContent GetInstance(object obj)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600CAF4)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp.KeyRecRepContent BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp.KeyRecRepContent::GetInstance(System.Object)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_22:
|
|
stloc:string(var_6_28, call:string(Platform::GetTypeName, ldloc:object(obj)))
|
|
stloc:ArgumentException(var_7_40, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("Invalid object: "), ldloc:string(var_6_28)), 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 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x1700202F RID: 8239
|
|
// (get) Token: 0x0600CAF5 RID: 51957 RVA: 0x002E80D0 File Offset: 0x002E62D0
|
|
[Token(Token = "0x1700202F")]
|
|
public virtual PkiStatusInfo Status
|
|
{
|
|
[Token(Token = "0x600CAF5")]
|
|
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20", Slot = "6")]
|
|
get
|
|
{
|
|
return this.status;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17002030 RID: 8240
|
|
// (get) Token: 0x0600CAF6 RID: 51958 RVA: 0x002E80E4 File Offset: 0x002E62E4
|
|
[Token(Token = "0x17002030")]
|
|
public virtual CmpCertificate NewSigCert
|
|
{
|
|
[Token(Token = "0x600CAF6")]
|
|
[Address(RVA = "0x3F5F40", Offset = "0x3F4D40", VA = "0x1803F5F40", Slot = "7")]
|
|
get
|
|
{
|
|
return this.newSigCert;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600CAF7 RID: 51959 RVA: 0x002E80F8 File Offset: 0x002E62F8
|
|
[Token(Token = "0x600CAF7")]
|
|
[Address(RVA = "0x2651210", Offset = "0x2650010", VA = "0x182651210", Slot = "8")]
|
|
public virtual CmpCertificate[] GetCACerts()
|
|
{
|
|
if (this.caCerts != 0)
|
|
{
|
|
Asn1Encodable asn1Encodable;
|
|
CmpCertificate[] array = new CmpCertificate[asn1Encodable];
|
|
int num = 0;
|
|
if (num != array.Length)
|
|
{
|
|
Asn1SequenceParser parser = this.caCerts.Parser;
|
|
CmpCertificate cmpCertificate;
|
|
if (cmpCertificate != 0)
|
|
{
|
|
}
|
|
num++;
|
|
array[0] = cmpCertificate;
|
|
}
|
|
return array;
|
|
}
|
|
throw new ArrayTypeMismatchException();
|
|
}
|
|
|
|
// Token: 0x0600CAF8 RID: 51960 RVA: 0x002E8148 File Offset: 0x002E6348
|
|
[Token(Token = "0x600CAF8")]
|
|
[Address(RVA = "0x2651520", Offset = "0x2650320", VA = "0x182651520", Slot = "9")]
|
|
public virtual CertifiedKeyPair[] GetKeyPairHist()
|
|
{
|
|
if (this.keyPairHist != 0)
|
|
{
|
|
Asn1Encodable asn1Encodable;
|
|
CertifiedKeyPair[] array = new CertifiedKeyPair[asn1Encodable];
|
|
int num = 0;
|
|
if (num != array.Length)
|
|
{
|
|
Asn1SequenceParser parser = this.keyPairHist.Parser;
|
|
CertifiedKeyPair certifiedKeyPair;
|
|
if (certifiedKeyPair != 0)
|
|
{
|
|
}
|
|
num++;
|
|
array[0] = certifiedKeyPair;
|
|
}
|
|
return array;
|
|
}
|
|
throw new ArrayTypeMismatchException();
|
|
}
|
|
|
|
// Token: 0x0600CAF9 RID: 51961 RVA: 0x002E8198 File Offset: 0x002E6398
|
|
[Token(Token = "0x600CAF9")]
|
|
[Address(RVA = "0x2651640", Offset = "0x2650440", VA = "0x182651640", Slot = "5")]
|
|
public override Asn1Object ToAsn1Object()
|
|
{
|
|
Asn1Encodable[] array = new Asn1Encodable[1];
|
|
PkiStatusInfo pkiStatusInfo = this.status;
|
|
if (pkiStatusInfo != 0)
|
|
{
|
|
}
|
|
array[0] = pkiStatusInfo;
|
|
Asn1EncodableVector asn1EncodableVector = new Asn1EncodableVector(array);
|
|
CmpCertificate cmpCertificate = this.newSigCert;
|
|
int num = 0;
|
|
this.AddOptional(asn1EncodableVector, num, cmpCertificate);
|
|
Asn1Sequence asn1Sequence = this.caCerts;
|
|
this.AddOptional(asn1EncodableVector, 1, asn1Sequence);
|
|
Asn1Sequence asn1Sequence2 = this.keyPairHist;
|
|
this.AddOptional(asn1EncodableVector, 2, asn1Sequence2);
|
|
DerSequence derSequence = new DerSequence(asn1EncodableVector);
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600CAFA RID: 51962 RVA: 0x002E8210 File Offset: 0x002E6410
|
|
[Token(Token = "0x600CAFA")]
|
|
[Address(RVA = "0x2651110", Offset = "0x264FF10", VA = "0x182651110")]
|
|
private void AddOptional(Asn1EncodableVector v, int tagNo, Asn1Encodable obj)
|
|
{
|
|
if (obj != 0)
|
|
{
|
|
Asn1Encodable[] array = new Asn1Encodable[1];
|
|
DerTaggedObject derTaggedObject = new DerTaggedObject(true, tagNo, obj);
|
|
if (derTaggedObject != 0)
|
|
{
|
|
}
|
|
array[0] = derTaggedObject;
|
|
v.Add(array);
|
|
}
|
|
}
|
|
|
|
// Token: 0x0400812C RID: 33068
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x400812C")]
|
|
private readonly PkiStatusInfo status;
|
|
|
|
// Token: 0x0400812D RID: 33069
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x400812D")]
|
|
private readonly CmpCertificate newSigCert;
|
|
|
|
// Token: 0x0400812E RID: 33070
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x400812E")]
|
|
private readonly Asn1Sequence caCerts;
|
|
|
|
// Token: 0x0400812F RID: 33071
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x400812F")]
|
|
private readonly Asn1Sequence keyPairHist;
|
|
}
|
|
}
|