251 lines
9.4 KiB
C#
251 lines
9.4 KiB
C#
using System;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp
|
|
{
|
|
// Token: 0x02001EA1 RID: 7841
|
|
[Token(Token = "0x2001EA1")]
|
|
public class BasicOcspResponse : Asn1Encodable
|
|
{
|
|
// Token: 0x0600C634 RID: 50740 RVA: 0x002D4790 File Offset: 0x002D2990
|
|
[Token(Token = "0x600C634")]
|
|
[Address(RVA = "0x2BBC0F0", Offset = "0x2BBAEF0", VA = "0x182BBC0F0")]
|
|
public static BasicOcspResponse GetInstance(Asn1TaggedObject obj, bool explicitly)
|
|
{
|
|
return BasicOcspResponse.GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
|
|
}
|
|
|
|
// Token: 0x0600C635 RID: 50741 RVA: 0x002D47AC File Offset: 0x002D29AC
|
|
[Token(Token = "0x600C635")]
|
|
[Address(RVA = "0x2BBC110", Offset = "0x2BBAF10", VA = "0x182BBC110")]
|
|
public static BasicOcspResponse GetInstance(object obj)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600C635)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp.BasicOcspResponse BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp.BasicOcspResponse::GetInstance(System.Object)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_26:
|
|
stloc:string(var_6_2C, call:string(Platform::GetTypeName, ldloc:object(obj)))
|
|
stloc:ArgumentException(var_7_44, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("unknown object in factory: "), ldloc:string(var_6_2C)), 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: 0x0600C636 RID: 50742 RVA: 0x002D4800 File Offset: 0x002D2A00
|
|
[Token(Token = "0x600C636")]
|
|
[Address(RVA = "0x4F37F0", Offset = "0x4F25F0", VA = "0x1804F37F0")]
|
|
public BasicOcspResponse(ResponseData tbsResponseData, AlgorithmIdentifier signatureAlgorithm, DerBitString signature, Asn1Sequence certs)
|
|
{
|
|
this.tbsResponseData = tbsResponseData;
|
|
this.signature = signature;
|
|
this.certs = 0;
|
|
this.signatureAlgorithm = signatureAlgorithm;
|
|
}
|
|
|
|
// Token: 0x0600C637 RID: 50743 RVA: 0x002D4830 File Offset: 0x002D2A30
|
|
[Token(Token = "0x600C637")]
|
|
[Address(RVA = "0x2BBC560", Offset = "0x2BBB360", VA = "0x182BBC560")]
|
|
private BasicOcspResponse(Asn1Sequence seq)
|
|
{
|
|
for (;;)
|
|
{
|
|
base..ctor();
|
|
Asn1SequenceParser parser = seq.Parser;
|
|
ResponseData responseData;
|
|
this.tbsResponseData = responseData;
|
|
Asn1SequenceParser parser2 = seq.Parser;
|
|
AlgorithmIdentifier algorithmIdentifier;
|
|
this.signatureAlgorithm = algorithmIdentifier;
|
|
Asn1SequenceParser parser3 = seq.Parser;
|
|
if (parser3 == 0)
|
|
{
|
|
}
|
|
if (parser3 != 0)
|
|
{
|
|
this.signature = parser3;
|
|
Asn1Encodable asn1Encodable;
|
|
if (asn1Encodable <= (ulong)3L)
|
|
{
|
|
return;
|
|
}
|
|
Asn1SequenceParser parser4 = seq.Parser;
|
|
if (parser4 == 0 || parser4 != 0)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
Asn1Sequence asn1Sequence;
|
|
this.certs = asn1Sequence;
|
|
}
|
|
|
|
// Token: 0x0600C638 RID: 50744 RVA: 0x002D48A8 File Offset: 0x002D2AA8
|
|
[Token(Token = "0x600C638")]
|
|
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20")]
|
|
[Obsolete]
|
|
public ResponseData GetTbsResponseData()
|
|
{
|
|
return this.tbsResponseData;
|
|
}
|
|
|
|
// Token: 0x17001EDE RID: 7902
|
|
// (get) Token: 0x0600C639 RID: 50745 RVA: 0x002D48BC File Offset: 0x002D2ABC
|
|
[Token(Token = "0x17001EDE")]
|
|
public ResponseData TbsResponseData
|
|
{
|
|
[Token(Token = "0x600C639")]
|
|
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20")]
|
|
get
|
|
{
|
|
return this.tbsResponseData;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600C63A RID: 50746 RVA: 0x002D48D0 File Offset: 0x002D2AD0
|
|
[Token(Token = "0x600C63A")]
|
|
[Address(RVA = "0x3F5F40", Offset = "0x3F4D40", VA = "0x1803F5F40")]
|
|
[Obsolete]
|
|
public AlgorithmIdentifier GetSignatureAlgorithm()
|
|
{
|
|
return this.signatureAlgorithm;
|
|
}
|
|
|
|
// Token: 0x17001EDF RID: 7903
|
|
// (get) Token: 0x0600C63B RID: 50747 RVA: 0x002D48E4 File Offset: 0x002D2AE4
|
|
[Token(Token = "0x17001EDF")]
|
|
public AlgorithmIdentifier SignatureAlgorithm
|
|
{
|
|
[Token(Token = "0x600C63B")]
|
|
[Address(RVA = "0x3F5F40", Offset = "0x3F4D40", VA = "0x1803F5F40")]
|
|
get
|
|
{
|
|
return this.signatureAlgorithm;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600C63C RID: 50748 RVA: 0x002D48F8 File Offset: 0x002D2AF8
|
|
[Token(Token = "0x600C63C")]
|
|
[Address(RVA = "0x3F6400", Offset = "0x3F5200", VA = "0x1803F6400")]
|
|
[Obsolete]
|
|
public DerBitString GetSignature()
|
|
{
|
|
return this.signature;
|
|
}
|
|
|
|
// Token: 0x17001EE0 RID: 7904
|
|
// (get) Token: 0x0600C63D RID: 50749 RVA: 0x002D490C File Offset: 0x002D2B0C
|
|
[Token(Token = "0x17001EE0")]
|
|
public DerBitString Signature
|
|
{
|
|
[Token(Token = "0x600C63D")]
|
|
[Address(RVA = "0x3F6400", Offset = "0x3F5200", VA = "0x1803F6400")]
|
|
get
|
|
{
|
|
return this.signature;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600C63E RID: 50750 RVA: 0x002D4920 File Offset: 0x002D2B20
|
|
[Token(Token = "0x600C63E")]
|
|
[Address(RVA = "0x271F280", Offset = "0x271E080", VA = "0x18271F280")]
|
|
public byte[] GetSignatureOctets()
|
|
{
|
|
Asn1Object asn1Object = this.signature.ToAsn1Object();
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600C63F RID: 50751 RVA: 0x002D4940 File Offset: 0x002D2B40
|
|
[Token(Token = "0x600C63F")]
|
|
[Address(RVA = "0x3F63E0", Offset = "0x3F51E0", VA = "0x1803F63E0")]
|
|
[Obsolete]
|
|
public Asn1Sequence GetCerts()
|
|
{
|
|
return this.certs;
|
|
}
|
|
|
|
// Token: 0x17001EE1 RID: 7905
|
|
// (get) Token: 0x0600C640 RID: 50752 RVA: 0x002D4954 File Offset: 0x002D2B54
|
|
[Token(Token = "0x17001EE1")]
|
|
public Asn1Sequence Certs
|
|
{
|
|
[Token(Token = "0x600C640")]
|
|
[Address(RVA = "0x3F63E0", Offset = "0x3F51E0", VA = "0x1803F63E0")]
|
|
get
|
|
{
|
|
return this.certs;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600C641 RID: 50753 RVA: 0x002D4968 File Offset: 0x002D2B68
|
|
[Token(Token = "0x600C641")]
|
|
[Address(RVA = "0x2BBC310", Offset = "0x2BBB110", VA = "0x182BBC310", Slot = "5")]
|
|
public override Asn1Object ToAsn1Object()
|
|
{
|
|
Asn1Encodable[] array = new Asn1Encodable[3];
|
|
ResponseData responseData = this.tbsResponseData;
|
|
if (responseData != 0)
|
|
{
|
|
}
|
|
array[0] = responseData;
|
|
AlgorithmIdentifier algorithmIdentifier = this.signatureAlgorithm;
|
|
if (algorithmIdentifier != 0)
|
|
{
|
|
}
|
|
array[1] = algorithmIdentifier;
|
|
DerBitString derBitString = this.signature;
|
|
if (derBitString != 0)
|
|
{
|
|
}
|
|
array[2] = derBitString;
|
|
Asn1EncodableVector asn1EncodableVector = new Asn1EncodableVector(array);
|
|
if (this.certs != (ulong)0L)
|
|
{
|
|
Asn1Encodable[] array2 = new Asn1Encodable[1];
|
|
Asn1Sequence asn1Sequence = this.certs;
|
|
int num;
|
|
DerTaggedObject derTaggedObject = new DerTaggedObject(true, num, asn1Sequence);
|
|
num = 0;
|
|
if (derTaggedObject != 0)
|
|
{
|
|
}
|
|
array2[0] = derTaggedObject;
|
|
asn1EncodableVector.Add(array2);
|
|
}
|
|
DerSequence derSequence = new DerSequence(asn1EncodableVector);
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x04007DE9 RID: 32233
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4007DE9")]
|
|
private readonly ResponseData tbsResponseData;
|
|
|
|
// Token: 0x04007DEA RID: 32234
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4007DEA")]
|
|
private readonly AlgorithmIdentifier signatureAlgorithm;
|
|
|
|
// Token: 0x04007DEB RID: 32235
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4007DEB")]
|
|
private readonly DerBitString signature;
|
|
|
|
// Token: 0x04007DEC RID: 32236
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4007DEC")]
|
|
private readonly Asn1Sequence certs;
|
|
}
|
|
}
|