302 lines
10 KiB
C#
302 lines
10 KiB
C#
using System;
|
|
using System.Collections;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf
|
|
{
|
|
// Token: 0x02001F07 RID: 7943
|
|
[Token(Token = "0x2001F07")]
|
|
public class CertTemplate : Asn1Encodable
|
|
{
|
|
// Token: 0x0600C8A4 RID: 51364 RVA: 0x002DF59C File Offset: 0x002DD79C
|
|
[Token(Token = "0x600C8A4")]
|
|
[Address(RVA = "0x1872190", Offset = "0x1870F90", VA = "0x181872190")]
|
|
private CertTemplate(Asn1Sequence seq)
|
|
{
|
|
int num;
|
|
do
|
|
{
|
|
num = 0;
|
|
base..ctor();
|
|
this.seq = seq;
|
|
IEnumerator enumerator = seq.GetEnumerator();
|
|
X509Extensions x509Extensions;
|
|
if (enumerator != 0)
|
|
{
|
|
int num2 = 0;
|
|
if (enumerator == 0)
|
|
{
|
|
goto IL_AC;
|
|
}
|
|
if (num2 > 9)
|
|
{
|
|
goto IL_8E;
|
|
}
|
|
DerInteger derInteger;
|
|
this.version = derInteger;
|
|
DerInteger derInteger2;
|
|
this.serialNumber = derInteger2;
|
|
AlgorithmIdentifier algorithmIdentifier;
|
|
this.signingAlg = algorithmIdentifier;
|
|
X509Name x509Name;
|
|
this.issuer = x509Name;
|
|
Asn1Sequence asn1Sequence;
|
|
OptionalValidity instance = OptionalValidity.GetInstance(asn1Sequence);
|
|
this.validity = instance;
|
|
X509Name x509Name2;
|
|
this.subject = x509Name2;
|
|
SubjectPublicKeyInfo subjectPublicKeyInfo;
|
|
this.publicKey = subjectPublicKeyInfo;
|
|
DerBitString derBitString;
|
|
this.issuerUID = derBitString;
|
|
DerBitString derBitString2;
|
|
this.subjectUID = derBitString2;
|
|
this.extensions = x509Extensions;
|
|
}
|
|
if (x509Extensions != 0)
|
|
{
|
|
}
|
|
}
|
|
while (num != 0);
|
|
return;
|
|
IL_8E:
|
|
throw new NullReferenceException();
|
|
IL_AC:
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600C8A5 RID: 51365 RVA: 0x002DF660 File Offset: 0x002DD860
|
|
[Token(Token = "0x600C8A5")]
|
|
[Address(RVA = "0x1872090", Offset = "0x1870E90", VA = "0x181872090")]
|
|
public static CertTemplate GetInstance(object obj)
|
|
{
|
|
while (obj != 0)
|
|
{
|
|
Asn1Sequence instance;
|
|
if (obj == 0)
|
|
{
|
|
instance = Asn1Sequence.GetInstance(obj);
|
|
return new CertTemplate(instance);
|
|
}
|
|
if (instance != 0)
|
|
{
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001F6F RID: 8047
|
|
// (get) Token: 0x0600C8A6 RID: 51366 RVA: 0x002DF694 File Offset: 0x002DD894
|
|
[Token(Token = "0x17001F6F")]
|
|
public virtual int Version
|
|
{
|
|
[Token(Token = "0x600C8A6")]
|
|
[Address(RVA = "0x1872550", Offset = "0x1871350", VA = "0x181872550", Slot = "6")]
|
|
get
|
|
{
|
|
return new BigInteger(this.version.bytes).IntValue;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001F70 RID: 8048
|
|
// (get) Token: 0x0600C8A7 RID: 51367 RVA: 0x002DF6BC File Offset: 0x002DD8BC
|
|
[Token(Token = "0x17001F70")]
|
|
public virtual DerInteger SerialNumber
|
|
{
|
|
[Token(Token = "0x600C8A7")]
|
|
[Address(RVA = "0x3F6400", Offset = "0x3F5200", VA = "0x1803F6400", Slot = "7")]
|
|
get
|
|
{
|
|
return this.serialNumber;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001F71 RID: 8049
|
|
// (get) Token: 0x0600C8A8 RID: 51368 RVA: 0x002DF6D0 File Offset: 0x002DD8D0
|
|
[Token(Token = "0x17001F71")]
|
|
public virtual AlgorithmIdentifier SigningAlg
|
|
{
|
|
[Token(Token = "0x600C8A8")]
|
|
[Address(RVA = "0x3F63E0", Offset = "0x3F51E0", VA = "0x1803F63E0", Slot = "8")]
|
|
get
|
|
{
|
|
return this.signingAlg;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001F72 RID: 8050
|
|
// (get) Token: 0x0600C8A9 RID: 51369 RVA: 0x002DF6E4 File Offset: 0x002DD8E4
|
|
[Token(Token = "0x17001F72")]
|
|
public virtual X509Name Issuer
|
|
{
|
|
[Token(Token = "0x600C8A9")]
|
|
[Address(RVA = "0x3FA180", Offset = "0x3F8F80", VA = "0x1803FA180", Slot = "9")]
|
|
get
|
|
{
|
|
return this.issuer;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001F73 RID: 8051
|
|
// (get) Token: 0x0600C8AA RID: 51370 RVA: 0x002DF6F8 File Offset: 0x002DD8F8
|
|
[Token(Token = "0x17001F73")]
|
|
public virtual OptionalValidity Validity
|
|
{
|
|
[Token(Token = "0x600C8AA")]
|
|
[Address(RVA = "0x3F63D0", Offset = "0x3F51D0", VA = "0x1803F63D0", Slot = "10")]
|
|
get
|
|
{
|
|
return this.validity;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001F74 RID: 8052
|
|
// (get) Token: 0x0600C8AB RID: 51371 RVA: 0x002DF70C File Offset: 0x002DD90C
|
|
[Token(Token = "0x17001F74")]
|
|
public virtual X509Name Subject
|
|
{
|
|
[Token(Token = "0x600C8AB")]
|
|
[Address(RVA = "0x408890", Offset = "0x407690", VA = "0x180408890", Slot = "11")]
|
|
get
|
|
{
|
|
return this.subject;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001F75 RID: 8053
|
|
// (get) Token: 0x0600C8AC RID: 51372 RVA: 0x002DF720 File Offset: 0x002DD920
|
|
[Token(Token = "0x17001F75")]
|
|
public virtual SubjectPublicKeyInfo PublicKey
|
|
{
|
|
[Token(Token = "0x600C8AC")]
|
|
[Address(RVA = "0x3FA170", Offset = "0x3F8F70", VA = "0x1803FA170", Slot = "12")]
|
|
get
|
|
{
|
|
return this.publicKey;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001F76 RID: 8054
|
|
// (get) Token: 0x0600C8AD RID: 51373 RVA: 0x002DF734 File Offset: 0x002DD934
|
|
[Token(Token = "0x17001F76")]
|
|
public virtual DerBitString IssuerUID
|
|
{
|
|
[Token(Token = "0x600C8AD")]
|
|
[Address(RVA = "0x415290", Offset = "0x414090", VA = "0x180415290", Slot = "13")]
|
|
get
|
|
{
|
|
return this.issuerUID;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001F77 RID: 8055
|
|
// (get) Token: 0x0600C8AE RID: 51374 RVA: 0x002DF748 File Offset: 0x002DD948
|
|
[Token(Token = "0x17001F77")]
|
|
public virtual DerBitString SubjectUID
|
|
{
|
|
[Token(Token = "0x600C8AE")]
|
|
[Address(RVA = "0x423D40", Offset = "0x422B40", VA = "0x180423D40", Slot = "14")]
|
|
get
|
|
{
|
|
return this.subjectUID;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001F78 RID: 8056
|
|
// (get) Token: 0x0600C8AF RID: 51375 RVA: 0x002DF75C File Offset: 0x002DD95C
|
|
[Token(Token = "0x17001F78")]
|
|
public virtual X509Extensions Extensions
|
|
{
|
|
[Token(Token = "0x600C8AF")]
|
|
[Address(RVA = "0x423DE0", Offset = "0x422BE0", VA = "0x180423DE0", Slot = "15")]
|
|
get
|
|
{
|
|
return this.extensions;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600C8B0 RID: 51376 RVA: 0x002DF770 File Offset: 0x002DD970
|
|
[Token(Token = "0x600C8B0")]
|
|
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20", Slot = "5")]
|
|
public override Asn1Object ToAsn1Object()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600C8B0)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1Object BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf.CertTemplate::ToAsn1Object()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:Asn1Sequence(var_0_06, ldfld:Asn1Sequence(CertTemplate::seq, ldloc:CertTemplate(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: 0x04008005 RID: 32773
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4008005")]
|
|
private readonly Asn1Sequence seq;
|
|
|
|
// Token: 0x04008006 RID: 32774
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4008006")]
|
|
private readonly DerInteger version;
|
|
|
|
// Token: 0x04008007 RID: 32775
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4008007")]
|
|
private readonly DerInteger serialNumber;
|
|
|
|
// Token: 0x04008008 RID: 32776
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4008008")]
|
|
private readonly AlgorithmIdentifier signingAlg;
|
|
|
|
// Token: 0x04008009 RID: 32777
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x4008009")]
|
|
private readonly X509Name issuer;
|
|
|
|
// Token: 0x0400800A RID: 32778
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x400800A")]
|
|
private readonly OptionalValidity validity;
|
|
|
|
// Token: 0x0400800B RID: 32779
|
|
[FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x400800B")]
|
|
private readonly X509Name subject;
|
|
|
|
// Token: 0x0400800C RID: 32780
|
|
[FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x400800C")]
|
|
private readonly SubjectPublicKeyInfo publicKey;
|
|
|
|
// Token: 0x0400800D RID: 32781
|
|
[FieldOffset(Offset = "0x50")]
|
|
[Token(Token = "0x400800D")]
|
|
private readonly DerBitString issuerUID;
|
|
|
|
// Token: 0x0400800E RID: 32782
|
|
[FieldOffset(Offset = "0x58")]
|
|
[Token(Token = "0x400800E")]
|
|
private readonly DerBitString subjectUID;
|
|
|
|
// Token: 0x0400800F RID: 32783
|
|
[FieldOffset(Offset = "0x60")]
|
|
[Token(Token = "0x400800F")]
|
|
private readonly X509Extensions extensions;
|
|
}
|
|
}
|