a
This commit is contained in:
+189
@@ -0,0 +1,189 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.Ocsp
|
||||
{
|
||||
// Token: 0x02001ECA RID: 7882
|
||||
[Token(Token = "0x2001ECA")]
|
||||
public class RequestedCertificate : Asn1Encodable, IAsn1Choice
|
||||
{
|
||||
// Token: 0x0600C72E RID: 50990 RVA: 0x002D8CF0 File Offset: 0x002D6EF0
|
||||
[Token(Token = "0x600C72E")]
|
||||
[Address(RVA = "0x28477C0", Offset = "0x28465C0", VA = "0x1828477C0")]
|
||||
public static RequestedCertificate GetInstance(object obj)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600C72E)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.Ocsp.RequestedCertificate BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.Ocsp.RequestedCertificate::GetInstance(System.Object)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_39:
|
||||
stloc:string(var_7_3F, call:string(Platform::GetTypeName, ldloc:object(obj)))
|
||||
stloc:ArgumentException(var_8_57, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("unknown object in factory: "), ldloc:string(var_7_3F)), 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: 0x0600C72F RID: 50991 RVA: 0x002D8D58 File Offset: 0x002D6F58
|
||||
[Token(Token = "0x600C72F")]
|
||||
[Address(RVA = "0x28479C0", Offset = "0x28467C0", VA = "0x1828479C0")]
|
||||
public static RequestedCertificate GetInstance(Asn1TaggedObject obj, bool isExplicit)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600C72F)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.Ocsp.RequestedCertificate BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.Ocsp.RequestedCertificate::GetInstance(BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1TaggedObject,System.Boolean)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_10:
|
||||
stloc:ArgumentException(var_0_1A, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("choice item must be explicitly tagged")))
|
||||
}
|
||||
|
||||
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 1660
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600C730 RID: 50992 RVA: 0x002D8D80 File Offset: 0x002D6F80
|
||||
[Token(Token = "0x600C730")]
|
||||
[Address(RVA = "0x2847BF0", Offset = "0x28469F0", VA = "0x182847BF0")]
|
||||
private RequestedCertificate(Asn1TaggedObject tagged)
|
||||
{
|
||||
int tagNo = tagged.tagNo;
|
||||
if (tagNo == 0)
|
||||
{
|
||||
Stream octetStream = Asn1OctetString.GetInstance(tagged, true).GetOctetStream();
|
||||
this.publicKeyCert = octetStream;
|
||||
return;
|
||||
}
|
||||
Stream octetStream2 = Asn1OctetString.GetInstance(tagged, tagNo != 0).GetOctetStream();
|
||||
this.attributeCert = octetStream2;
|
||||
}
|
||||
|
||||
// Token: 0x0600C731 RID: 50993 RVA: 0x002D8DD0 File Offset: 0x002D6FD0
|
||||
[Token(Token = "0x600C731")]
|
||||
[Address(RVA = "0x462000", Offset = "0x460E00", VA = "0x180462000")]
|
||||
public RequestedCertificate(X509CertificateStructure certificate)
|
||||
{
|
||||
this.cert = certificate;
|
||||
}
|
||||
|
||||
// Token: 0x0600C732 RID: 50994 RVA: 0x002D8DEC File Offset: 0x002D6FEC
|
||||
[Token(Token = "0x600C732")]
|
||||
[Address(RVA = "0x2847B50", Offset = "0x2846950", VA = "0x182847B50")]
|
||||
public RequestedCertificate(RequestedCertificate.Choice type, byte[] certificateOctets)
|
||||
{
|
||||
DerOctetString derOctetString = new DerOctetString(certificateOctets);
|
||||
DerTaggedObject derTaggedObject = new DerTaggedObject((int)type, derOctetString);
|
||||
}
|
||||
|
||||
// Token: 0x17001F25 RID: 7973
|
||||
// (get) Token: 0x0600C733 RID: 50995 RVA: 0x002D8E0C File Offset: 0x002D700C
|
||||
[Token(Token = "0x17001F25")]
|
||||
public RequestedCertificate.Choice Type
|
||||
{
|
||||
[Token(Token = "0x600C733")]
|
||||
[Address(RVA = "0x2847D10", Offset = "0x2846B10", VA = "0x182847D10")]
|
||||
get
|
||||
{
|
||||
if (this.cert == (ulong)0L)
|
||||
{
|
||||
int num = 0;
|
||||
bool flag = this.publicKeyCert == num;
|
||||
}
|
||||
return RequestedCertificate.Choice.Certificate;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600C734 RID: 50996 RVA: 0x002D8E34 File Offset: 0x002D7034
|
||||
[Token(Token = "0x600C734")]
|
||||
[Address(RVA = "0x28476F0", Offset = "0x28464F0", VA = "0x1828476F0")]
|
||||
public byte[] GetCertificateBytes()
|
||||
{
|
||||
if (this.cert == (ulong)0L)
|
||||
{
|
||||
byte[] array = this.publicKeyCert;
|
||||
if (array == 0)
|
||||
{
|
||||
}
|
||||
return array;
|
||||
}
|
||||
X509CertificateStructure x509CertificateStructure = this.cert;
|
||||
return x509CertificateStructure.GetEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x0600C735 RID: 50997 RVA: 0x002D8E80 File Offset: 0x002D7080
|
||||
[Token(Token = "0x600C735")]
|
||||
[Address(RVA = "0x2847A50", Offset = "0x2846850", VA = "0x182847A50", Slot = "5")]
|
||||
public override Asn1Object ToAsn1Object()
|
||||
{
|
||||
byte[] array = this.publicKeyCert;
|
||||
if (array == 0)
|
||||
{
|
||||
byte[] array2 = this.attributeCert;
|
||||
if (array2 == 0)
|
||||
{
|
||||
return this.cert.ToAsn1Object();
|
||||
}
|
||||
DerOctetString derOctetString = new DerOctetString(array2);
|
||||
DerTaggedObject derTaggedObject = new DerTaggedObject(array);
|
||||
}
|
||||
DerOctetString derOctetString2 = new DerOctetString(array);
|
||||
int num;
|
||||
DerTaggedObject derTaggedObject2 = new DerTaggedObject(num, derOctetString2);
|
||||
num = 0;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x04007EDD RID: 32477
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007EDD")]
|
||||
private readonly X509CertificateStructure cert;
|
||||
|
||||
// Token: 0x04007EDE RID: 32478
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007EDE")]
|
||||
private readonly byte[] publicKeyCert;
|
||||
|
||||
// Token: 0x04007EDF RID: 32479
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007EDF")]
|
||||
private readonly byte[] attributeCert;
|
||||
|
||||
// Token: 0x02001ECB RID: 7883
|
||||
[Token(Token = "0x2001ECB")]
|
||||
public enum Choice
|
||||
{
|
||||
// Token: 0x04007EE1 RID: 32481
|
||||
[Token(Token = "0x4007EE1")]
|
||||
Certificate = -1,
|
||||
// Token: 0x04007EE2 RID: 32482
|
||||
[Token(Token = "0x4007EE2")]
|
||||
PublicKeyCertificate,
|
||||
// Token: 0x04007EE3 RID: 32483
|
||||
[Token(Token = "0x4007EE3")]
|
||||
AttributeCertificate
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user