218 lines
9.1 KiB
C#
218 lines
9.1 KiB
C#
using System;
|
|
using System.Collections;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
|
|
{
|
|
// Token: 0x02001F0A RID: 7946
|
|
[Token(Token = "0x2001F0A")]
|
|
public class V3TbsCertificateGenerator
|
|
{
|
|
// Token: 0x0600C768 RID: 51048 RVA: 0x002D15F8 File Offset: 0x002CF7F8
|
|
[Token(Token = "0x600C768")]
|
|
[Address(RVA = "0x2E8DC40", Offset = "0x2E8CC40", VA = "0x182E8DC40")]
|
|
public V3TbsCertificateGenerator()
|
|
{
|
|
DerInteger derInteger = new DerInteger(2);
|
|
int num;
|
|
DerTaggedObject derTaggedObject = new DerTaggedObject(num, derInteger);
|
|
num = 0;
|
|
this.version = derTaggedObject;
|
|
base..ctor();
|
|
}
|
|
|
|
// Token: 0x0600C769 RID: 51049 RVA: 0x002D1624 File Offset: 0x002CF824
|
|
[Token(Token = "0x600C769")]
|
|
[Address(RVA = "0x4157F0", Offset = "0x4147F0", VA = "0x1804157F0")]
|
|
public void SetSerialNumber(DerInteger serialNumber)
|
|
{
|
|
this.serialNumber = serialNumber;
|
|
}
|
|
|
|
// Token: 0x0600C76A RID: 51050 RVA: 0x002D1638 File Offset: 0x002CF838
|
|
[Token(Token = "0x600C76A")]
|
|
[Address(RVA = "0x415810", Offset = "0x414810", VA = "0x180415810")]
|
|
public void SetSignature(AlgorithmIdentifier signature)
|
|
{
|
|
this.signature = signature;
|
|
}
|
|
|
|
// Token: 0x0600C76B RID: 51051 RVA: 0x002D164C File Offset: 0x002CF84C
|
|
[Token(Token = "0x600C76B")]
|
|
[Address(RVA = "0x415820", Offset = "0x414820", VA = "0x180415820")]
|
|
public void SetIssuer(X509Name issuer)
|
|
{
|
|
this.issuer = issuer;
|
|
}
|
|
|
|
// Token: 0x0600C76C RID: 51052 RVA: 0x002D1660 File Offset: 0x002CF860
|
|
[Token(Token = "0x600C76C")]
|
|
[Address(RVA = "0x2E8DBD0", Offset = "0x2E8CBD0", VA = "0x182E8DBD0")]
|
|
public void SetStartDate(DerUtcTime startDate)
|
|
{
|
|
Time time = new Time(startDate);
|
|
this.startDate = time;
|
|
}
|
|
|
|
// Token: 0x0600C76D RID: 51053 RVA: 0x002D167C File Offset: 0x002CF87C
|
|
[Token(Token = "0x600C76D")]
|
|
[Address(RVA = "0x415830", Offset = "0x414830", VA = "0x180415830")]
|
|
public void SetStartDate(Time startDate)
|
|
{
|
|
this.startDate = startDate;
|
|
}
|
|
|
|
// Token: 0x0600C76E RID: 51054 RVA: 0x002D1690 File Offset: 0x002CF890
|
|
[Token(Token = "0x600C76E")]
|
|
[Address(RVA = "0x2E8DA40", Offset = "0x2E8CA40", VA = "0x182E8DA40")]
|
|
public void SetEndDate(DerUtcTime endDate)
|
|
{
|
|
Time time = new Time(endDate);
|
|
this.endDate = time;
|
|
}
|
|
|
|
// Token: 0x0600C76F RID: 51055 RVA: 0x002D16AC File Offset: 0x002CF8AC
|
|
[Token(Token = "0x600C76F")]
|
|
[Address(RVA = "0x41CFF0", Offset = "0x41BFF0", VA = "0x18041CFF0")]
|
|
public void SetEndDate(Time endDate)
|
|
{
|
|
this.endDate = endDate;
|
|
}
|
|
|
|
// Token: 0x0600C770 RID: 51056 RVA: 0x002D16C0 File Offset: 0x002CF8C0
|
|
[Token(Token = "0x600C770")]
|
|
[Address(RVA = "0x417960", Offset = "0x416960", VA = "0x180417960")]
|
|
public void SetSubject(X509Name subject)
|
|
{
|
|
this.subject = subject;
|
|
}
|
|
|
|
// Token: 0x0600C771 RID: 51057 RVA: 0x002D16D4 File Offset: 0x002CF8D4
|
|
[Token(Token = "0x600C771")]
|
|
[Address(RVA = "0x417A20", Offset = "0x416A20", VA = "0x180417A20")]
|
|
public void SetIssuerUniqueID(DerBitString uniqueID)
|
|
{
|
|
this.issuerUniqueID = uniqueID;
|
|
}
|
|
|
|
// Token: 0x0600C772 RID: 51058 RVA: 0x002D16E8 File Offset: 0x002CF8E8
|
|
[Token(Token = "0x600C772")]
|
|
[Address(RVA = "0x417AC0", Offset = "0x416AC0", VA = "0x180417AC0")]
|
|
public void SetSubjectUniqueID(DerBitString uniqueID)
|
|
{
|
|
this.subjectUniqueID = uniqueID;
|
|
}
|
|
|
|
// Token: 0x0600C773 RID: 51059 RVA: 0x002D16FC File Offset: 0x002CF8FC
|
|
[Token(Token = "0x600C773")]
|
|
[Address(RVA = "0x55BCF0", Offset = "0x55ACF0", VA = "0x18055BCF0")]
|
|
public void SetSubjectPublicKeyInfo(SubjectPublicKeyInfo pubKeyInfo)
|
|
{
|
|
this.subjectPublicKeyInfo = pubKeyInfo;
|
|
}
|
|
|
|
// Token: 0x0600C774 RID: 51060 RVA: 0x002D1710 File Offset: 0x002CF910
|
|
[Token(Token = "0x600C774")]
|
|
[Address(RVA = "0x2E8DAB0", Offset = "0x2E8CAB0", VA = "0x182E8DAB0")]
|
|
public void SetExtensions(X509Extensions extensions)
|
|
{
|
|
this.extensions = extensions;
|
|
if (extensions != 0)
|
|
{
|
|
IDictionary dictionary = extensions.extensions;
|
|
DerObjectIdentifier subjectDirectoryAttributes = X509Extensions.SubjectDirectoryAttributes;
|
|
this.altNamePresentAndCritical = true;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600C775 RID: 51061 RVA: 0x002D1744 File Offset: 0x002CF944
|
|
[Token(Token = "0x600C775")]
|
|
[Address(RVA = "0x2E8D4C0", Offset = "0x2E8C4C0", VA = "0x182E8D4C0")]
|
|
public TbsCertificateStructure GenerateTbsCertificate()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600C775)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.TbsCertificateStructure BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.V3TbsCertificateGenerator::GenerateTbsCertificate()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_25F:
|
|
stloc:InvalidOperationException(var_28_269, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("not all mandatory fields set in V3 TBScertificate generator")))
|
|
}
|
|
|
|
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.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: 0x04007CEF RID: 31983
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4007CEF")]
|
|
internal DerTaggedObject version;
|
|
|
|
// Token: 0x04007CF0 RID: 31984
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4007CF0")]
|
|
internal DerInteger serialNumber;
|
|
|
|
// Token: 0x04007CF1 RID: 31985
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4007CF1")]
|
|
internal AlgorithmIdentifier signature;
|
|
|
|
// Token: 0x04007CF2 RID: 31986
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4007CF2")]
|
|
internal X509Name issuer;
|
|
|
|
// Token: 0x04007CF3 RID: 31987
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x4007CF3")]
|
|
internal Time startDate;
|
|
|
|
// Token: 0x04007CF4 RID: 31988
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x4007CF4")]
|
|
internal Time endDate;
|
|
|
|
// Token: 0x04007CF5 RID: 31989
|
|
[FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x4007CF5")]
|
|
internal X509Name subject;
|
|
|
|
// Token: 0x04007CF6 RID: 31990
|
|
[FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x4007CF6")]
|
|
internal SubjectPublicKeyInfo subjectPublicKeyInfo;
|
|
|
|
// Token: 0x04007CF7 RID: 31991
|
|
[FieldOffset(Offset = "0x50")]
|
|
[Token(Token = "0x4007CF7")]
|
|
internal X509Extensions extensions;
|
|
|
|
// Token: 0x04007CF8 RID: 31992
|
|
[FieldOffset(Offset = "0x58")]
|
|
[Token(Token = "0x4007CF8")]
|
|
private bool altNamePresentAndCritical;
|
|
|
|
// Token: 0x04007CF9 RID: 31993
|
|
[FieldOffset(Offset = "0x60")]
|
|
[Token(Token = "0x4007CF9")]
|
|
private DerBitString issuerUniqueID;
|
|
|
|
// Token: 0x04007CFA RID: 31994
|
|
[FieldOffset(Offset = "0x68")]
|
|
[Token(Token = "0x4007CFA")]
|
|
private DerBitString subjectUniqueID;
|
|
}
|
|
}
|