This commit is contained in:
niko
2026-04-11 22:19:20 +02:00
parent 45b857ff11
commit 8fc35183db
17034 changed files with 2863552 additions and 0 deletions
@@ -0,0 +1,325 @@
using System;
using System.Collections;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509;
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp
{
// Token: 0x020019C0 RID: 6592
[Token(Token = "0x20019C0")]
public class BasicOcspResp : X509ExtensionBase
{
// Token: 0x06009D79 RID: 40313 RVA: 0x002104D0 File Offset: 0x0020E6D0
[Token(Token = "0x6009D79")]
[Address(RVA = "0x28B4E60", Offset = "0x28B3C60", VA = "0x1828B4E60")]
public BasicOcspResp(BasicOcspResponse resp)
{
this.resp = resp;
ResponseData tbsResponseData = resp.tbsResponseData;
this.data = tbsResponseData;
}
// Token: 0x06009D7A RID: 40314 RVA: 0x00210500 File Offset: 0x0020E700
[Token(Token = "0x6009D7A")]
[Address(RVA = "0x28B4AD0", Offset = "0x28B38D0", VA = "0x1828B4AD0")]
public byte[] GetTbsResponseData()
{
return this.data.GetDerEncoded();
}
// Token: 0x1700190A RID: 6410
// (get) Token: 0x06009D7B RID: 40315 RVA: 0x00210520 File Offset: 0x0020E720
[Token(Token = "0x1700190A")]
public int Version
{
[Token(Token = "0x6009D7B")]
[Address(RVA = "0x28B5200", Offset = "0x28B4000", VA = "0x1828B5200")]
get
{
int intValue = this.data.version.Value.IntValue;
return intValue + 1;
}
}
// Token: 0x1700190B RID: 6411
// (get) Token: 0x06009D7C RID: 40316 RVA: 0x00210550 File Offset: 0x0020E750
[Token(Token = "0x1700190B")]
public RespID ResponderId
{
[Token(Token = "0x6009D7C")]
[Address(RVA = "0x28B4ED0", Offset = "0x28B3CD0", VA = "0x1828B4ED0")]
get
{
ResponderID responderID = this.data.responderID;
RespID respID;
respID.id = responderID;
return respID;
}
}
// Token: 0x1700190C RID: 6412
// (get) Token: 0x06009D7D RID: 40317 RVA: 0x00210578 File Offset: 0x0020E778
[Token(Token = "0x1700190C")]
public DateTime ProducedAt
{
[Token(Token = "0x6009D7D")]
[Address(RVA = "0x28B4EA0", Offset = "0x28B3CA0", VA = "0x1828B4EA0")]
get
{
return this.data.producedAt.ToDateTime();
}
}
// Token: 0x1700190D RID: 6413
// (get) Token: 0x06009D7E RID: 40318 RVA: 0x0021059C File Offset: 0x0020E79C
[Token(Token = "0x1700190D")]
public SingleResp[] Responses
{
[Token(Token = "0x6009D7E")]
[Address(RVA = "0x28B4F40", Offset = "0x28B3D40", VA = "0x1828B4F40")]
get
{
Asn1Sequence responses = this.data.responses;
Asn1Encodable asn1Encodable;
SingleResp[] array = new SingleResp[asn1Encodable];
int num = 0;
if (num != array.Length)
{
Asn1SequenceParser parser = responses.Parser;
SingleResp singleResp;
SingleResponse singleResponse;
singleResp.resp = singleResponse;
num++;
array[0] = singleResp;
}
return array;
}
}
// Token: 0x1700190E RID: 6414
// (get) Token: 0x06009D7F RID: 40319 RVA: 0x002105EC File Offset: 0x0020E7EC
[Token(Token = "0x1700190E")]
public X509Extensions ResponseExtensions
{
[Token(Token = "0x6009D7F")]
[Address(RVA = "0x460DC0", Offset = "0x45FBC0", VA = "0x180460DC0")]
get
{
return this.data.responseExtensions;
}
}
// Token: 0x06009D80 RID: 40320 RVA: 0x0021060C File Offset: 0x0020E80C
[Token(Token = "0x6009D80")]
[Address(RVA = "0x460DC0", Offset = "0x45FBC0", VA = "0x180460DC0", Slot = "8")]
protected override X509Extensions GetX509Extensions()
{
return this.data.responseExtensions;
}
// Token: 0x1700190F RID: 6415
// (get) Token: 0x06009D81 RID: 40321 RVA: 0x0021062C File Offset: 0x0020E82C
[Token(Token = "0x1700190F")]
public string SignatureAlgName
{
[Token(Token = "0x6009D81")]
[Address(RVA = "0x28B5080", Offset = "0x28B3E80", VA = "0x1828B5080")]
get
{
Asn1Object asn1Object = this.resp.signatureAlgorithm.ToAsn1Object();
IDictionary oids = OcspUtilities.oids;
IDictionary oids2 = OcspUtilities.oids;
throw new NullReferenceException();
}
}
// Token: 0x17001910 RID: 6416
// (get) Token: 0x06009D82 RID: 40322 RVA: 0x0021065C File Offset: 0x0020E85C
[Token(Token = "0x17001910")]
public string SignatureAlgOid
{
[Token(Token = "0x6009D82")]
[Address(RVA = "0x162D8C0", Offset = "0x162C6C0", VA = "0x18162D8C0")]
get
{
Asn1Object asn1Object = this.resp.signatureAlgorithm.ToAsn1Object();
throw new NullReferenceException();
}
}
// Token: 0x06009D83 RID: 40323 RVA: 0x00210680 File Offset: 0x0020E880
[Token(Token = "0x6009D83")]
[Address(RVA = "0x28B4A70", Offset = "0x28B3870", VA = "0x1828B4A70")]
[Obsolete]
public RespData GetResponseData()
{
ResponseData responseData = this.data;
RespData respData;
respData.data = responseData;
return respData;
}
// Token: 0x06009D84 RID: 40324 RVA: 0x0021069C File Offset: 0x0020E89C
[Token(Token = "0x6009D84")]
[Address(RVA = "0x162C470", Offset = "0x162B270", VA = "0x18162C470")]
public byte[] GetSignature()
{
return this.resp.GetSignatureOctets();
}
// Token: 0x06009D85 RID: 40325 RVA: 0x002106BC File Offset: 0x0020E8BC
[Token(Token = "0x6009D85")]
[Address(RVA = "0x28B4480", Offset = "0x28B3280", VA = "0x1828B4480")]
private IList GetCertList()
{
IList list;
for (;;)
{
int num = 0;
list = Platform.CreateArrayList();
Asn1Sequence certs = this.resp.certs;
if (certs == 0)
{
break;
}
IEnumerator enumerator = certs.GetEnumerator();
if (enumerator != 0)
{
if (enumerator == 0)
{
}
if (enumerator == 0)
{
goto IL_61;
}
byte[] array;
if (new X509CertificateParser().ReadCertificate(array) != 0)
{
}
if (num == 0)
{
break;
}
}
}
return list;
IL_61:
throw new NullReferenceException();
}
// Token: 0x06009D86 RID: 40326 RVA: 0x00210730 File Offset: 0x0020E930
[Token(Token = "0x6009D86")]
[Address(RVA = "0x28B47F0", Offset = "0x28B35F0", VA = "0x1828B47F0")]
public X509Certificate[] GetCerts()
{
X509Certificate[] array;
int num;
do
{
IList certList = this.GetCertList();
array = new X509Certificate[certList];
num = 0;
if (num < certList)
{
num += num;
num++;
}
if (num >= array)
{
return array;
}
uint num2;
if (num < (int)num2)
{
num += num;
num++;
}
if (num == 0)
{
break;
}
ulong num3;
num3 += num3;
num3 += num3;
}
while (num == 0 || num == 0);
num++;
array[0] = num;
return array;
}
// Token: 0x06009D87 RID: 40327 RVA: 0x0021079C File Offset: 0x0020E99C
[Token(Token = "0x6009D87")]
[Address(RVA = "0x28B4710", Offset = "0x28B3510", VA = "0x1828B4710")]
public IX509Store GetCertificates(string type)
{
string text = "Certificate/" + type;
X509CollectionStoreParameters x509CollectionStoreParameters = new X509CollectionStoreParameters(this.GetCertList());
return X509StoreFactory.Create(text, x509CollectionStoreParameters);
}
// Token: 0x06009D88 RID: 40328 RVA: 0x002107D8 File Offset: 0x0020E9D8
[Token(Token = "0x6009D88")]
[Address(RVA = "0x28B4B70", Offset = "0x28B3970", VA = "0x1828B4B70")]
public bool Verify(AsymmetricKeyParameter publicKey)
{
Asn1Object asn1Object = this.resp.signatureAlgorithm.ToAsn1Object();
IDictionary oids = OcspUtilities.oids;
IDictionary oids2 = OcspUtilities.oids;
int length = this.data.GetDerEncoded().Length;
byte[] signatureOctets = this.resp.GetSignatureOctets();
int num = 0;
string text;
OcspException ex = new OcspException(text, num);
throw new NullReferenceException();
}
// Token: 0x06009D89 RID: 40329 RVA: 0x00210864 File Offset: 0x0020EA64
[Token(Token = "0x6009D89")]
[Address(RVA = "0x16362F0", Offset = "0x16350F0", VA = "0x1816362F0")]
public byte[] GetEncoded()
{
return this.resp.GetEncoded();
}
// Token: 0x06009D8A RID: 40330 RVA: 0x00210884 File Offset: 0x0020EA84
[Token(Token = "0x6009D8A")]
[Address(RVA = "0x28B43C0", Offset = "0x28B31C0", VA = "0x1828B43C0", Slot = "0")]
public override bool Equals(object obj)
{
if (obj != this)
{
if (obj != 0 && obj != 0)
{
Asn1Object asn1Object = this.resp.ToAsn1Object();
}
}
return true;
}
// Token: 0x06009D8B RID: 40331 RVA: 0x002108B4 File Offset: 0x0020EAB4
[Token(Token = "0x6009D8B")]
[Address(RVA = "0x4DA700", Offset = "0x4D9500", VA = "0x1804DA700", Slot = "2")]
public override int GetHashCode()
{
Asn1Object asn1Object = this.resp.ToAsn1Object();
throw new NullReferenceException();
}
// Token: 0x040069FC RID: 27132
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x40069FC")]
private readonly BasicOcspResponse resp;
// Token: 0x040069FD RID: 27133
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x40069FD")]
private readonly ResponseData data;
}
}
@@ -0,0 +1,377 @@
using System;
using System.Collections;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Security;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp
{
// Token: 0x020019C1 RID: 6593
[Token(Token = "0x20019C1")]
public class BasicOcspRespGenerator
{
// Token: 0x06009D8C RID: 40332 RVA: 0x002108D4 File Offset: 0x0020EAD4
[Token(Token = "0x6009D8C")]
[Address(RVA = "0x28B4260", Offset = "0x28B3060", VA = "0x1828B4260")]
public BasicOcspRespGenerator(RespID responderID)
{
IList list = Platform.CreateArrayList();
this.list = list;
base..ctor();
this.responderID = responderID;
}
// Token: 0x06009D8D RID: 40333 RVA: 0x00210900 File Offset: 0x0020EB00
[Token(Token = "0x6009D8D")]
[Address(RVA = "0x28B42D0", Offset = "0x28B30D0", VA = "0x1828B42D0")]
public BasicOcspRespGenerator(AsymmetricKeyParameter publicKey)
{
IList list = Platform.CreateArrayList();
this.list = list;
base..ctor();
RespID respID = new RespID(publicKey);
this.responderID = respID;
}
// Token: 0x06009D8E RID: 40334 RVA: 0x00210930 File Offset: 0x0020EB30
[Token(Token = "0x6009D8E")]
[Address(RVA = "0x28B3630", Offset = "0x28B2430", VA = "0x1828B3630")]
public void AddResponse(CertificateID certID, CertificateStatus certStatus)
{
IList list = this.list;
DateTime utcNow = DateTime.UtcNow;
int num;
BasicOcspRespGenerator.ResponseObject responseObject = new BasicOcspRespGenerator.ResponseObject(certID, certStatus, utcNow, num);
num = 0;
throw new NullReferenceException();
}
// Token: 0x06009D8F RID: 40335 RVA: 0x00210960 File Offset: 0x0020EB60
[Token(Token = "0x6009D8F")]
[Address(RVA = "0x28B33B0", Offset = "0x28B21B0", VA = "0x1828B33B0")]
public void AddResponse(CertificateID certID, CertificateStatus certStatus, X509Extensions singleExtensions)
{
IList list = this.list;
DateTime utcNow = DateTime.UtcNow;
BasicOcspRespGenerator.ResponseObject responseObject = new BasicOcspRespGenerator.ResponseObject(certID, certStatus, utcNow, singleExtensions);
throw new NullReferenceException();
}
// Token: 0x06009D90 RID: 40336 RVA: 0x0021098C File Offset: 0x0020EB8C
[Token(Token = "0x6009D90")]
[Address(RVA = "0x28B3490", Offset = "0x28B2290", VA = "0x1828B3490")]
public void AddResponse(CertificateID certID, CertificateStatus certStatus, DateTime nextUpdate, X509Extensions singleExtensions)
{
IList list = this.list;
DateTime utcNow = DateTime.UtcNow;
throw new NullReferenceException();
}
// Token: 0x06009D91 RID: 40337 RVA: 0x002109B0 File Offset: 0x0020EBB0
[Token(Token = "0x6009D91")]
[Address(RVA = "0x28B3570", Offset = "0x28B2370", VA = "0x1828B3570")]
public void AddResponse(CertificateID certID, CertificateStatus certStatus, DateTime thisUpdate, DateTime nextUpdate, X509Extensions singleExtensions)
{
IList list = this.list;
throw new NullReferenceException();
}
// Token: 0x06009D92 RID: 40338 RVA: 0x002109CC File Offset: 0x0020EBCC
[Token(Token = "0x6009D92")]
[Address(RVA = "0x3F7210", Offset = "0x3F6010", VA = "0x1803F7210")]
public void SetResponseExtensions(X509Extensions responseExtensions)
{
this.responseExtensions = responseExtensions;
}
// Token: 0x06009D93 RID: 40339 RVA: 0x002109E0 File Offset: 0x0020EBE0
[Token(Token = "0x6009D93")]
[Address(RVA = "0x28B3710", Offset = "0x28B2510", VA = "0x1828B3710")]
private BasicOcspResp GenerateResponse(ISignatureFactory signatureCalculator, X509Certificate[] chain, DateTime producedAt)
{
Asn1EncodableVector asn1EncodableVector;
byte[] derEncoded;
for (;;)
{
IList list = this.list;
if (asn1EncodableVector != 0)
{
break;
}
int num = 0;
ArrayTypeMismatchException ex;
if (ex != 0)
{
}
if (num != 0)
{
goto IL_127;
}
DerGeneralizedTime derGeneralizedTime = new DerGeneralizedTime(producedAt);
DerSequence derSequence = new DerSequence(asn1EncodableVector);
ResponseData responseData;
derEncoded = responseData.GetDerEncoded();
if (derEncoded != 0 && derEncoded != 0)
{
goto Block_4;
}
}
if (asn1EncodableVector == 0)
{
}
if (asn1EncodableVector != 0)
{
Asn1Encodable[] array = new Asn1Encodable[1];
throw new ArrayTypeMismatchException();
}
throw new NullReferenceException();
Block_4:
DerBitString derBitString = new DerBitString(derEncoded);
ISet noParams = OcspUtilities.noParams;
int num2 = 0;
if (chain != 0 && chain.Length != num2)
{
int num3 = 0;
Asn1EncodableVector asn1EncodableVector2;
if (num3 != chain.Length)
{
Asn1Encodable[] array2 = new Asn1Encodable[1];
AsymmetricKeyParameter publicKey = chain[num3].GetPublicKey();
Asn1Object asn1Object;
X509CertificateStructure instance = X509CertificateStructure.GetInstance(asn1Object);
if (instance != 0)
{
}
array2[0] = instance;
asn1EncodableVector2.Add(array2);
num3++;
}
DerSequence derSequence2 = new DerSequence(asn1EncodableVector2);
}
BasicOcspResp basicOcspResp;
BasicOcspResponse basicOcspResponse;
basicOcspResp.resp = basicOcspResponse;
ResponseData tbsResponseData = basicOcspResponse.tbsResponseData;
basicOcspResp.data = tbsResponseData;
return basicOcspResp;
IL_127:
throw new IndexOutOfRangeException();
}
// Token: 0x06009D94 RID: 40340 RVA: 0x00210B38 File Offset: 0x0020ED38
[Token(Token = "0x6009D94")]
[Address(RVA = "0x28B4000", Offset = "0x28B2E00", VA = "0x1828B4000")]
public BasicOcspResp Generate(string signingAlgorithm, AsymmetricKeyParameter privateKey, X509Certificate[] chain, DateTime thisUpdate)
{
/*
An exception occurred when decompiling this method (06009D94)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp.BasicOcspResp BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp.BasicOcspRespGenerator::Generate(System.String,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.AsymmetricKeyParameter,BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Certificate[],System.DateTime)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_12:
stloc:ArgumentException(var_5_1C, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("no signing algorithm specified")))
}
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: 0x06009D95 RID: 40341 RVA: 0x00210B64 File Offset: 0x0020ED64
[Token(Token = "0x6009D95")]
[Address(RVA = "0x28B4180", Offset = "0x28B2F80", VA = "0x1828B4180")]
public BasicOcspResp Generate(string signingAlgorithm, AsymmetricKeyParameter privateKey, X509Certificate[] chain, DateTime producedAt, SecureRandom random)
{
/*
An exception occurred when decompiling this method (06009D95)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp.BasicOcspResp BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp.BasicOcspRespGenerator::Generate(System.String,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.AsymmetricKeyParameter,BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Certificate[],System.DateTime,BestHTTP.SecureProtocol.Org.BouncyCastle.Security.SecureRandom)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_06:
stloc:ArgumentException(var_4_10, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("no signing algorithm specified")))
}
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: 0x06009D96 RID: 40342 RVA: 0x00210B84 File Offset: 0x0020ED84
[Token(Token = "0x6009D96")]
[Address(RVA = "0x28B40E0", Offset = "0x28B2EE0", VA = "0x1828B40E0")]
public BasicOcspResp Generate(ISignatureFactory signatureCalculatorFactory, X509Certificate[] chain, DateTime producedAt)
{
/*
An exception occurred when decompiling this method (06009D96)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp.BasicOcspResp BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp.BasicOcspRespGenerator::Generate(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ISignatureFactory,BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Certificate[],System.DateTime)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_0E:
stloc:ArgumentException(var_1_18, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("no signature calculator specified")))
}
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: 0x17001911 RID: 6417
// (get) Token: 0x06009D97 RID: 40343 RVA: 0x00210BAC File Offset: 0x0020EDAC
[Token(Token = "0x17001911")]
public IEnumerable SignatureAlgNames
{
[Token(Token = "0x6009D97")]
[Address(RVA = "0x28B4370", Offset = "0x28B3170", VA = "0x1828B4370")]
get
{
return OcspUtilities.AlgNames;
}
}
// Token: 0x040069FE RID: 27134
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x40069FE")]
private readonly IList list;
// Token: 0x040069FF RID: 27135
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x40069FF")]
private X509Extensions responseExtensions;
// Token: 0x04006A00 RID: 27136
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x4006A00")]
private RespID responderID;
// Token: 0x020019C2 RID: 6594
[Token(Token = "0x20019C2")]
private class ResponseObject
{
// Token: 0x06009D98 RID: 40344 RVA: 0x00210BC0 File Offset: 0x0020EDC0
[Token(Token = "0x6009D98")]
[Address(RVA = "0x28CAC80", Offset = "0x28C9A80", VA = "0x1828CAC80")]
public ResponseObject(CertificateID certId, CertificateStatus certStatus, DateTime thisUpdate, X509Extensions extensions)
{
DerGeneralizedTime derGeneralizedTime = new DerGeneralizedTime(thisUpdate);
}
// Token: 0x06009D99 RID: 40345 RVA: 0x00210BD8 File Offset: 0x0020EDD8
[Token(Token = "0x6009D99")]
[Address(RVA = "0x28CAD20", Offset = "0x28C9B20", VA = "0x1828CAD20")]
public ResponseObject(CertificateID certId, CertificateStatus certStatus, DateTime thisUpdate, DateTime nextUpdate, X509Extensions extensions)
{
DerGeneralizedTime derGeneralizedTime = new DerGeneralizedTime(thisUpdate);
}
// Token: 0x06009D9A RID: 40346 RVA: 0x00210BEC File Offset: 0x0020EDEC
[Token(Token = "0x6009D9A")]
[Address(RVA = "0x28CA9C0", Offset = "0x28C97C0", VA = "0x1828CA9C0")]
private ResponseObject(CertificateID certId, CertificateStatus certStatus, DerGeneralizedTime thisUpdate, DerGeneralizedTime nextUpdate, X509Extensions extensions)
{
do
{
base..ctor();
this.certId = certId;
if (certStatus == 0)
{
goto IL_5B;
}
if (certStatus != 0)
{
goto IL_4A;
}
}
while (certStatus == 0);
BigInteger bigInteger;
CrlReason crlReason = new CrlReason(bigInteger.IntValue);
byte[] bytes = crlReason.bytes;
DateTime dateTime;
CertStatus certStatus2 = new CertStatus(new RevokedInfo(new DerGeneralizedTime(dateTime), crlReason));
IL_4A:
DerNull instance = DerNull.Instance;
CertStatus certStatus3 = new CertStatus(2, instance);
IL_5B:
CertStatus certStatus4 = new CertStatus();
this.certStatus = certStatus4;
this.nextUpdate = 0;
this.extensions = 0;
this.thisUpdate = thisUpdate;
}
// Token: 0x06009D9B RID: 40347 RVA: 0x00210C84 File Offset: 0x0020EE84
[Token(Token = "0x6009D9B")]
[Address(RVA = "0x28CA910", Offset = "0x28C9710", VA = "0x1828CA910")]
public SingleResponse ToResponse()
{
CertID id = this.certId.id;
DerGeneralizedTime derGeneralizedTime = this.thisUpdate;
DerGeneralizedTime derGeneralizedTime2 = this.nextUpdate;
CertStatus certStatus = this.certStatus;
X509Extensions x509Extensions = this.extensions;
return new SingleResponse(id, certStatus, derGeneralizedTime, derGeneralizedTime2, x509Extensions);
}
// Token: 0x04006A01 RID: 27137
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006A01")]
internal CertificateID certId;
// Token: 0x04006A02 RID: 27138
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4006A02")]
internal CertStatus certStatus;
// Token: 0x04006A03 RID: 27139
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x4006A03")]
internal DerGeneralizedTime thisUpdate;
// Token: 0x04006A04 RID: 27140
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x4006A04")]
internal DerGeneralizedTime nextUpdate;
// Token: 0x04006A05 RID: 27141
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x4006A05")]
internal X509Extensions extensions;
}
}
}
@@ -0,0 +1,186 @@
using System;
using System.IO;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp
{
// Token: 0x020019C3 RID: 6595
[Token(Token = "0x20019C3")]
public class CertificateID
{
// Token: 0x06009D9C RID: 40348 RVA: 0x00210CCC File Offset: 0x0020EECC
[Token(Token = "0x6009D9C")]
[Address(RVA = "0x28B5760", Offset = "0x28B4560", VA = "0x1828B5760")]
public CertificateID(CertID id)
{
/*
An exception occurred when decompiling this method (06009D9C)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp.CertificateID::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp.CertID)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_12:
stloc:ArgumentNullException(var_0_1C, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("id")))
}
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: 0x06009D9D RID: 40349 RVA: 0x00210CF8 File Offset: 0x0020EEF8
[Token(Token = "0x6009D9D")]
[Address(RVA = "0x28B57E0", Offset = "0x28B45E0", VA = "0x1828B57E0")]
public CertificateID(string hashAlgorithm, X509Certificate issuerCert, BigInteger serialNumber)
{
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(hashAlgorithm);
DerNull instance = DerNull.Instance;
AlgorithmIdentifier algorithmIdentifier = new AlgorithmIdentifier(derObjectIdentifier, instance);
DerInteger derInteger = new DerInteger(serialNumber);
CertID certID = CertificateID.CreateCertID(algorithmIdentifier, issuerCert, derInteger);
this.id = certID;
}
// Token: 0x17001912 RID: 6418
// (get) Token: 0x06009D9E RID: 40350 RVA: 0x00210D3C File Offset: 0x0020EF3C
[Token(Token = "0x17001912")]
public string HashAlgOid
{
[Token(Token = "0x6009D9E")]
[Address(RVA = "0x28B58F0", Offset = "0x28B46F0", VA = "0x1828B58F0")]
get
{
Asn1Object asn1Object = this.id.hashAlgorithm.ToAsn1Object();
throw new NullReferenceException();
}
}
// Token: 0x06009D9F RID: 40351 RVA: 0x00210D60 File Offset: 0x0020EF60
[Token(Token = "0x6009D9F")]
[Address(RVA = "0x28B56D0", Offset = "0x28B44D0", VA = "0x1828B56D0")]
public byte[] GetIssuerNameHash()
{
Stream octetStream = ((Asn1OctetStringParser)this.id.issuerNameHash).GetOctetStream();
throw new NullReferenceException();
}
// Token: 0x06009DA0 RID: 40352 RVA: 0x00210D84 File Offset: 0x0020EF84
[Token(Token = "0x6009DA0")]
[Address(RVA = "0x28B5690", Offset = "0x28B4490", VA = "0x1828B5690")]
public byte[] GetIssuerKeyHash()
{
Stream octetStream = ((Asn1OctetStringParser)this.id.issuerKeyHash).GetOctetStream();
throw new NullReferenceException();
}
// Token: 0x17001913 RID: 6419
// (get) Token: 0x06009DA1 RID: 40353 RVA: 0x00210DA8 File Offset: 0x0020EFA8
[Token(Token = "0x17001913")]
public BigInteger SerialNumber
{
[Token(Token = "0x6009DA1")]
[Address(RVA = "0x1B2C400", Offset = "0x1B2B200", VA = "0x181B2C400")]
get
{
return this.id.serialNumber.Value;
}
}
// Token: 0x06009DA2 RID: 40354 RVA: 0x00210DCC File Offset: 0x0020EFCC
[Token(Token = "0x6009DA2")]
[Address(RVA = "0x28B5710", Offset = "0x28B4510", VA = "0x1828B5710")]
public bool MatchesIssuer(X509Certificate issuerCert)
{
CertID certID = this.id;
DerInteger serialNumber = certID.serialNumber;
Asn1Object asn1Object = CertificateID.CreateCertID(certID.hashAlgorithm, issuerCert, serialNumber).ToAsn1Object();
throw new NullReferenceException();
}
// Token: 0x06009DA3 RID: 40355 RVA: 0x00210E00 File Offset: 0x0020F000
[Token(Token = "0x6009DA3")]
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20")]
public CertID ToAsn1Object()
{
return this.id;
}
// Token: 0x06009DA4 RID: 40356 RVA: 0x00210E14 File Offset: 0x0020F014
[Token(Token = "0x6009DA4")]
[Address(RVA = "0x28B5540", Offset = "0x28B4340", VA = "0x1828B5540", Slot = "0")]
public override bool Equals(object obj)
{
if (obj != this)
{
if (obj != 0 && obj != 0)
{
CertID certID = this.id;
Asn1Object asn1Object = certID.ToAsn1Object();
Asn1Object asn1Object2 = certID.ToAsn1Object();
return asn1Object.Asn1Equals(asn1Object2);
}
}
return true;
}
// Token: 0x06009DA5 RID: 40357 RVA: 0x00210E58 File Offset: 0x0020F058
[Token(Token = "0x6009DA5")]
[Address(RVA = "0x28B5650", Offset = "0x28B4450", VA = "0x1828B5650", Slot = "2")]
public override int GetHashCode()
{
return this.id.ToAsn1Object().Asn1GetHashCode();
}
// Token: 0x06009DA6 RID: 40358 RVA: 0x00210E7C File Offset: 0x0020F07C
[Token(Token = "0x6009DA6")]
[Address(RVA = "0x28B5450", Offset = "0x28B4250", VA = "0x1828B5450")]
public static CertificateID DeriveCertificateID(CertificateID original, BigInteger newSerialNumber)
{
CertID certID = original.id;
Asn1OctetString issuerNameHash = certID.issuerNameHash;
AlgorithmIdentifier hashAlgorithm = certID.hashAlgorithm;
Asn1OctetString issuerKeyHash = certID.issuerKeyHash;
DerInteger derInteger = new DerInteger(newSerialNumber);
return new CertificateID(new CertID(hashAlgorithm, issuerNameHash, issuerKeyHash, derInteger));
}
// Token: 0x06009DA7 RID: 40359 RVA: 0x00210EC4 File Offset: 0x0020F0C4
[Token(Token = "0x6009DA7")]
[Address(RVA = "0x28B5240", Offset = "0x28B4040", VA = "0x1828B5240")]
private static CertID CreateCertID(AlgorithmIdentifier hashAlg, X509Certificate issuerCert, DerInteger serialNumber)
{
Asn1Object asn1Object = hashAlg.ToAsn1Object();
byte[] encoded = PrincipalUtilities.GetSubjectX509Principal(issuerCert).GetEncoded();
SubjectPublicKeyInfo subjectPublicKeyInfo;
byte[] octets = subjectPublicKeyInfo.keyData.GetOctets();
byte[] array;
DerOctetString derOctetString = new DerOctetString(array);
byte[] array2;
DerOctetString derOctetString2 = new DerOctetString(array2);
return new CertID(hashAlg, derOctetString, derOctetString2, serialNumber);
}
// Token: 0x04006A06 RID: 27142
[Token(Token = "0x4006A06")]
public const string HashSha1 = "1.3.14.3.2.26";
// Token: 0x04006A07 RID: 27143
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006A07")]
private readonly CertID id;
}
}
@@ -0,0 +1,30 @@
using System;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp
{
// Token: 0x020019C4 RID: 6596
[Token(Token = "0x20019C4")]
public abstract class CertificateStatus
{
// Token: 0x06009DA8 RID: 40360 RVA: 0x00210F4C File Offset: 0x0020F14C
[Token(Token = "0x6009DA8")]
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
protected CertificateStatus()
{
}
// Token: 0x06009DA9 RID: 40361 RVA: 0x0000220F File Offset: 0x0000040F
// Note: this type is marked as 'beforefieldinit'.
[Token(Token = "0x6009DA9")]
[Address(RVA = "0x402080", Offset = "0x400E80", VA = "0x180402080")]
static CertificateStatus()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x04006A08 RID: 27144
[Token(Token = "0x4006A08")]
public static readonly CertificateStatus Good;
}
}
@@ -0,0 +1,73 @@
using System;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp
{
// Token: 0x020019CA RID: 6602
[Token(Token = "0x20019CA")]
public class OCSPRespGenerator
{
// Token: 0x06009DD5 RID: 40405 RVA: 0x00211898 File Offset: 0x0020FA98
[Token(Token = "0x6009DD5")]
[Address(RVA = "0x28C52A0", Offset = "0x28C40A0", VA = "0x1828C52A0")]
public OcspResp Generate(int status, object response)
{
while (response != 0)
{
if (response == 0)
{
OcspException ex = new OcspException("unknown response object");
throw new NullReferenceException();
}
if (response != 0)
{
byte[] array;
DerOctetString derOctetString = new DerOctetString(array);
ResponseBytes responseBytes = new ResponseBytes(OcspObjectIdentifiers.PkixOcspBasic, derOctetString);
OcspResponseStatus ocspResponseStatus = new OcspResponseStatus(status);
OcspResponse ocspResponse = new OcspResponse(status);
break;
}
}
int num;
OcspResponse ocspResponse2 = new OcspResponse(new OcspResponseStatus(status), num);
num = 0;
OcspResp ocspResp;
ocspResp.resp = ocspResponse2;
return ocspResp;
}
// Token: 0x06009DD6 RID: 40406 RVA: 0x0021191C File Offset: 0x0020FB1C
[Token(Token = "0x6009DD6")]
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
public OCSPRespGenerator()
{
}
// Token: 0x04006A10 RID: 27152
[Token(Token = "0x4006A10")]
public const int Successful = 0;
// Token: 0x04006A11 RID: 27153
[Token(Token = "0x4006A11")]
public const int MalformedRequest = 1;
// Token: 0x04006A12 RID: 27154
[Token(Token = "0x4006A12")]
public const int InternalError = 2;
// Token: 0x04006A13 RID: 27155
[Token(Token = "0x4006A13")]
public const int TryLater = 3;
// Token: 0x04006A14 RID: 27156
[Token(Token = "0x4006A14")]
public const int SigRequired = 5;
// Token: 0x04006A15 RID: 27157
[Token(Token = "0x4006A15")]
public const int Unauthorized = 6;
}
}
@@ -0,0 +1,18 @@
using System;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp
{
// Token: 0x020019CB RID: 6603
[Token(Token = "0x20019CB")]
[Obsolete]
public abstract class OcscpRespStatus : OcspRespStatus
{
// Token: 0x06009DD7 RID: 40407 RVA: 0x00211930 File Offset: 0x0020FB30
[Token(Token = "0x6009DD7")]
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
protected OcscpRespStatus()
{
}
}
}
@@ -0,0 +1,34 @@
using System;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp
{
// Token: 0x020019C5 RID: 6597
[Token(Token = "0x20019C5")]
[Serializable]
public class OcspException : Exception
{
// Token: 0x06009DAA RID: 40362 RVA: 0x00210F60 File Offset: 0x0020F160
[Token(Token = "0x6009DAA")]
[Address(RVA = "0x28C5510", Offset = "0x28C4310", VA = "0x1828C5510")]
public OcspException()
{
}
// Token: 0x06009DAB RID: 40363 RVA: 0x00210F74 File Offset: 0x0020F174
[Token(Token = "0x6009DAB")]
[Address(RVA = "0x28C5570", Offset = "0x28C4370", VA = "0x1828C5570")]
public OcspException(string message)
: base(message)
{
}
// Token: 0x06009DAC RID: 40364 RVA: 0x00210F88 File Offset: 0x0020F188
[Token(Token = "0x6009DAC")]
[Address(RVA = "0x28C55E0", Offset = "0x28C43E0", VA = "0x1828C55E0")]
public OcspException(string message, Exception e)
: base(message, e)
{
}
}
}
@@ -0,0 +1,311 @@
using System;
using System.Collections;
using System.IO;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509;
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp
{
// Token: 0x020019C6 RID: 6598
[Token(Token = "0x20019C6")]
public class OcspReq : X509ExtensionBase
{
// Token: 0x06009DAD RID: 40365 RVA: 0x00210FA0 File Offset: 0x0020F1A0
[Token(Token = "0x6009DAD")]
[Address(RVA = "0x462000", Offset = "0x460E00", VA = "0x180462000")]
public OcspReq(OcspRequest req)
{
this.req = req;
}
// Token: 0x06009DAE RID: 40366 RVA: 0x00210FBC File Offset: 0x0020F1BC
[Token(Token = "0x6009DAE")]
[Address(RVA = "0x28C6EF0", Offset = "0x28C5CF0", VA = "0x1828C6EF0")]
public OcspReq(byte[] req)
{
Asn1InputStream asn1InputStream = new Asn1InputStream(req);
}
// Token: 0x06009DAF RID: 40367 RVA: 0x00210FD0 File Offset: 0x0020F1D0
[Token(Token = "0x6009DAF")]
[Address(RVA = "0x28C6E80", Offset = "0x28C5C80", VA = "0x1828C6E80")]
public OcspReq(Stream inStr)
{
Asn1InputStream asn1InputStream = new Asn1InputStream(inStr);
}
// Token: 0x06009DB0 RID: 40368 RVA: 0x00210FE4 File Offset: 0x0020F1E4
[Token(Token = "0x6009DB0")]
[Address(RVA = "0x28C6F60", Offset = "0x28C5D60", VA = "0x1828C6F60")]
private OcspReq(Asn1InputStream aIn)
{
OcspRequest instance = OcspRequest.GetInstance(aIn.ReadObject());
this.req = instance;
}
// Token: 0x06009DB1 RID: 40369 RVA: 0x00211020 File Offset: 0x0020F220
[Token(Token = "0x6009DB1")]
[Address(RVA = "0x28C6B10", Offset = "0x28C5910", VA = "0x1828C6B10")]
public byte[] GetTbsRequest()
{
return this.req.tbsRequest.GetEncoded();
}
// Token: 0x17001914 RID: 6420
// (get) Token: 0x06009DB2 RID: 40370 RVA: 0x0021104C File Offset: 0x0020F24C
[Token(Token = "0x17001914")]
public int Version
{
[Token(Token = "0x6009DB2")]
[Address(RVA = "0x1636AA0", Offset = "0x16358A0", VA = "0x181636AA0")]
get
{
int intValue = this.req.tbsRequest.version.Value.IntValue;
return intValue + 1;
}
}
// Token: 0x17001915 RID: 6421
// (get) Token: 0x06009DB3 RID: 40371 RVA: 0x00211080 File Offset: 0x0020F280
[Token(Token = "0x17001915")]
public GeneralName RequestorName
{
[Token(Token = "0x6009DB3")]
[Address(RVA = "0x28C70C0", Offset = "0x28C5EC0", VA = "0x1828C70C0")]
get
{
return GeneralName.GetInstance(this.req.tbsRequest.requestorName);
}
}
// Token: 0x06009DB4 RID: 40372 RVA: 0x002110A8 File Offset: 0x0020F2A8
[Token(Token = "0x6009DB4")]
[Address(RVA = "0x28C6990", Offset = "0x28C5790", VA = "0x1828C6990")]
public Req[] GetRequestList()
{
Asn1Sequence requestList = this.req.tbsRequest.requestList;
Asn1Encodable asn1Encodable;
Req[] array = new Req[asn1Encodable];
int num = 0;
if (num != array.Length)
{
Asn1SequenceParser parser = requestList.Parser;
Req req;
Request request;
req.req = request;
num++;
array[0] = req;
}
return array;
}
// Token: 0x17001916 RID: 6422
// (get) Token: 0x06009DB5 RID: 40373 RVA: 0x00211100 File Offset: 0x0020F300
[Token(Token = "0x17001916")]
public X509Extensions RequestExtensions
{
[Token(Token = "0x6009DB5")]
[Address(RVA = "0x28C6BC0", Offset = "0x28C59C0", VA = "0x1828C6BC0")]
get
{
return X509Extensions.GetInstance(this.req.tbsRequest.requestExtensions);
}
}
// Token: 0x06009DB6 RID: 40374 RVA: 0x00211128 File Offset: 0x0020F328
[Token(Token = "0x6009DB6")]
[Address(RVA = "0x28C6BC0", Offset = "0x28C59C0", VA = "0x1828C6BC0", Slot = "8")]
protected override X509Extensions GetX509Extensions()
{
return X509Extensions.GetInstance(this.req.tbsRequest.requestExtensions);
}
// Token: 0x17001917 RID: 6423
// (get) Token: 0x06009DB7 RID: 40375 RVA: 0x00211150 File Offset: 0x0020F350
[Token(Token = "0x17001917")]
public string SignatureAlgOid
{
[Token(Token = "0x6009DB7")]
[Address(RVA = "0x28C70F0", Offset = "0x28C5EF0", VA = "0x1828C70F0")]
get
{
Signature optionalSignature = this.req.optionalSignature;
if (optionalSignature != 0)
{
Asn1Object asn1Object = optionalSignature.signatureAlgorithm.ToAsn1Object();
}
throw new NullReferenceException();
}
}
// Token: 0x06009DB8 RID: 40376 RVA: 0x00211180 File Offset: 0x0020F380
[Token(Token = "0x6009DB8")]
[Address(RVA = "0x28C6AD0", Offset = "0x28C58D0", VA = "0x1828C6AD0")]
public byte[] GetSignature()
{
Signature optionalSignature = this.req.optionalSignature;
if (optionalSignature != 0)
{
return optionalSignature.GetSignatureOctets();
}
throw new NullReferenceException();
}
// Token: 0x06009DB9 RID: 40377 RVA: 0x002111AC File Offset: 0x0020F3AC
[Token(Token = "0x6009DB9")]
[Address(RVA = "0x28C6370", Offset = "0x28C5170", VA = "0x1828C6370")]
private IList GetCertList()
{
IList list;
for (;;)
{
int num = 0;
list = Platform.CreateArrayList();
Asn1Sequence certs = this.req.optionalSignature.certs;
if (certs == 0)
{
break;
}
IEnumerator enumerator = certs.GetEnumerator();
if (enumerator != 0)
{
if (enumerator == 0)
{
}
if (enumerator == 0)
{
goto IL_66;
}
byte[] array;
if (new X509CertificateParser().ReadCertificate(array) != 0)
{
}
if (num == 0)
{
break;
}
}
}
return list;
IL_66:
throw new NullReferenceException();
}
// Token: 0x06009DBA RID: 40378 RVA: 0x00211224 File Offset: 0x0020F424
[Token(Token = "0x6009DBA")]
[Address(RVA = "0x28C66F0", Offset = "0x28C54F0", VA = "0x1828C66F0")]
public X509Certificate[] GetCerts()
{
while (this.req.optionalSignature > (ulong)0L)
{
IList certList = this.GetCertList();
X509Certificate[] array = new X509Certificate[certList];
int num = 0;
if (num < certList)
{
num += num;
num++;
}
if (num < array)
{
uint num2;
if (num < (int)num2)
{
num += num;
num++;
}
if (num != 0)
{
ulong num3;
num3 += num3;
num3 += num3;
if (num == 0 || num == 0)
{
continue;
}
}
num++;
array[0] = num;
}
return array;
}
throw new NullReferenceException();
}
// Token: 0x06009DBB RID: 40379 RVA: 0x002112A0 File Offset: 0x0020F4A0
[Token(Token = "0x6009DBB")]
[Address(RVA = "0x28C65E0", Offset = "0x28C53E0", VA = "0x1828C65E0")]
public IX509Store GetCertificates(string type)
{
if (this.req.optionalSignature > (ulong)0L)
{
string text = "Certificate/" + type;
X509CollectionStoreParameters x509CollectionStoreParameters = new X509CollectionStoreParameters(this.GetCertList());
return X509StoreFactory.Create(text, x509CollectionStoreParameters);
}
throw new NullReferenceException();
}
// Token: 0x17001918 RID: 6424
// (get) Token: 0x06009DBC RID: 40380 RVA: 0x002112E4 File Offset: 0x0020F4E4
[Token(Token = "0x17001918")]
public bool IsSigned
{
[Token(Token = "0x6009DBC")]
[Address(RVA = "0x28C70A0", Offset = "0x28C5EA0", VA = "0x1828C70A0")]
get
{
OcspRequest ocspRequest = this.req;
throw new NullReferenceException();
}
}
// Token: 0x06009DBD RID: 40381 RVA: 0x00211300 File Offset: 0x0020F500
[Token(Token = "0x6009DBD")]
[Address(RVA = "0x28C6C30", Offset = "0x28C5A30", VA = "0x1828C6C30")]
public bool Verify(AsymmetricKeyParameter publicKey)
{
/*
An exception occurred when decompiling this method (06009DBD)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp.OcspReq::Verify(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.AsymmetricKeyParameter)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_B7:
stloc:OcspException(var_9_C1, newobj:OcspException(OcspException::.ctor, ldstr:string("attempt to Verify signature on unsigned object")))
}
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: 0x06009DBE RID: 40382 RVA: 0x002113D0 File Offset: 0x0020F5D0
[Token(Token = "0x6009DBE")]
[Address(RVA = "0x16362F0", Offset = "0x16350F0", VA = "0x1816362F0")]
public byte[] GetEncoded()
{
return this.req.GetEncoded();
}
// Token: 0x04006A09 RID: 27145
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006A09")]
private OcspRequest req;
}
}
@@ -0,0 +1,253 @@
using System;
using System.Collections;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Security;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp
{
// Token: 0x020019C7 RID: 6599
[Token(Token = "0x20019C7")]
public class OcspReqGenerator
{
// Token: 0x06009DBF RID: 40383 RVA: 0x002113F0 File Offset: 0x0020F5F0
[Token(Token = "0x6009DBF")]
[Address(RVA = "0x28C5700", Offset = "0x28C4500", VA = "0x1828C5700")]
public void AddRequest(CertificateID certId)
{
IList list = this.list;
OcspReqGenerator.RequestObject requestObject;
requestObject.certId = certId;
requestObject.extensions = (ulong)0L;
throw new NullReferenceException();
}
// Token: 0x06009DC0 RID: 40384 RVA: 0x0021141C File Offset: 0x0020F61C
[Token(Token = "0x6009DC0")]
[Address(RVA = "0x28C5660", Offset = "0x28C4460", VA = "0x1828C5660")]
public void AddRequest(CertificateID certId, X509Extensions singleRequestExtensions)
{
IList list = this.list;
OcspReqGenerator.RequestObject requestObject;
requestObject.certId = certId;
requestObject.extensions = singleRequestExtensions;
throw new NullReferenceException();
}
// Token: 0x06009DC1 RID: 40385 RVA: 0x00211444 File Offset: 0x0020F644
[Token(Token = "0x6009DC1")]
[Address(RVA = "0x28C6200", Offset = "0x28C5000", VA = "0x1828C6200")]
public void SetRequestorName(X509Name requestorName)
{
GeneralName generalName = new GeneralName(4, requestorName);
this.requestorName = generalName;
}
// Token: 0x06009DC2 RID: 40386 RVA: 0x00211460 File Offset: 0x0020F660
[Token(Token = "0x6009DC2")]
[Address(RVA = "0x3F7210", Offset = "0x3F6010", VA = "0x1803F7210")]
public void SetRequestorName(GeneralName requestorName)
{
this.requestorName = requestorName;
}
// Token: 0x06009DC3 RID: 40387 RVA: 0x00211474 File Offset: 0x0020F674
[Token(Token = "0x6009DC3")]
[Address(RVA = "0x460F90", Offset = "0x45FD90", VA = "0x180460F90")]
public void SetRequestExtensions(X509Extensions requestExtensions)
{
this.requestExtensions = requestExtensions;
}
// Token: 0x06009DC4 RID: 40388 RVA: 0x00211488 File Offset: 0x0020F688
[Token(Token = "0x6009DC4")]
[Address(RVA = "0x28C5790", Offset = "0x28C4590", VA = "0x1828C5790")]
private OcspReq GenerateRequest(DerObjectIdentifier signingAlgorithm, AsymmetricKeyParameter privateKey, X509Certificate[] chain, SecureRandom random)
{
Asn1EncodableVector asn1EncodableVector;
int num2;
DerSequence derSequence;
TbsRequest tbsRequest;
for (;;)
{
int num = 0;
IList list = this.list;
if (asn1EncodableVector != 0)
{
break;
}
num2 = 0;
ArrayTypeMismatchException ex;
if (ex != 0)
{
}
if (num != 0)
{
goto IL_132;
}
GeneralName generalName = this.requestorName;
derSequence = new DerSequence(asn1EncodableVector);
X509Extensions x509Extensions = this.requestExtensions;
tbsRequest = new TbsRequest(generalName, derSequence, x509Extensions);
if (tbsRequest == 0)
{
goto IL_102;
}
if (this.requestorName != (ulong)0L)
{
goto Block_4;
}
}
if (asn1EncodableVector == 0)
{
}
if (asn1EncodableVector != 0)
{
Asn1Encodable[] array = new Asn1Encodable[1];
throw new ArrayTypeMismatchException();
}
throw new NullReferenceException();
Block_4:
DerInteger version = tbsRequest.version;
if (derSequence == 0)
{
}
int length = tbsRequest.GetEncoded().Length;
if (chain == 0 || chain.Length == 0)
{
throw new NullReferenceException();
}
if (num2 != chain.Length)
{
Asn1Encodable[] array2 = new Asn1Encodable[1];
AsymmetricKeyParameter publicKey = chain[num2].GetPublicKey();
Asn1Object asn1Object;
X509CertificateStructure instance = X509CertificateStructure.GetInstance(asn1Object);
throw new ArrayTypeMismatchException();
}
Asn1EncodableVector asn1EncodableVector2;
DerSequence derSequence2 = new DerSequence(asn1EncodableVector2);
IL_102:
OcspReq ocspReq;
OcspRequest ocspRequest;
ocspReq.req = ocspRequest;
return ocspReq;
IL_132:
throw new NullReferenceException();
}
// Token: 0x06009DC5 RID: 40389 RVA: 0x002115EC File Offset: 0x0020F7EC
[Token(Token = "0x6009DC5")]
[Address(RVA = "0x28C61D0", Offset = "0x28C4FD0", VA = "0x1828C61D0")]
public OcspReq Generate()
{
OcspReq ocspReq;
return ocspReq;
}
// Token: 0x06009DC6 RID: 40390 RVA: 0x002115FC File Offset: 0x0020F7FC
[Token(Token = "0x6009DC6")]
[Address(RVA = "0x28C5F20", Offset = "0x28C4D20", VA = "0x1828C5F20")]
public OcspReq Generate(string signingAlgorithm, AsymmetricKeyParameter privateKey, X509Certificate[] chain)
{
int num = 0;
return this.Generate(signingAlgorithm, privateKey, chain, num);
}
// Token: 0x06009DC7 RID: 40391 RVA: 0x00211618 File Offset: 0x0020F818
[Token(Token = "0x6009DC7")]
[Address(RVA = "0x28C5F40", Offset = "0x28C4D40", VA = "0x1828C5F40")]
public OcspReq Generate(string signingAlgorithm, AsymmetricKeyParameter privateKey, X509Certificate[] chain, SecureRandom random)
{
if (signingAlgorithm != 0)
{
string text = Platform.ToUpperInvariant(signingAlgorithm);
IDictionary algorithms = OcspUtilities.algorithms;
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(text);
IDictionary algorithms2 = OcspUtilities.algorithms;
IDictionary algorithms3 = OcspUtilities.algorithms;
OcspReq ocspReq;
return ocspReq;
}
ArgumentException ex = new ArgumentException("no signing algorithm specified");
throw new NullReferenceException();
}
// Token: 0x17001919 RID: 6425
// (get) Token: 0x06009DC8 RID: 40392 RVA: 0x00211674 File Offset: 0x0020F874
[Token(Token = "0x17001919")]
public IEnumerable SignatureAlgNames
{
[Token(Token = "0x6009DC8")]
[Address(RVA = "0x28C6320", Offset = "0x28C5120", VA = "0x1828C6320")]
get
{
return OcspUtilities.AlgNames;
}
}
// Token: 0x06009DC9 RID: 40393 RVA: 0x00211688 File Offset: 0x0020F888
[Token(Token = "0x6009DC9")]
[Address(RVA = "0x28C62C0", Offset = "0x28C50C0", VA = "0x1828C62C0")]
public OcspReqGenerator()
{
IList list = Platform.CreateArrayList();
this.list = list;
base..ctor();
}
// Token: 0x04006A0A RID: 27146
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006A0A")]
private IList list;
// Token: 0x04006A0B RID: 27147
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4006A0B")]
private GeneralName requestorName;
// Token: 0x04006A0C RID: 27148
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x4006A0C")]
private X509Extensions requestExtensions;
// Token: 0x020019C8 RID: 6600
[Token(Token = "0x20019C8")]
private class RequestObject
{
// Token: 0x06009DCA RID: 40394 RVA: 0x002116AC File Offset: 0x0020F8AC
[Token(Token = "0x6009DCA")]
[Address(RVA = "0x4089A0", Offset = "0x4077A0", VA = "0x1804089A0")]
public RequestObject(CertificateID certId, X509Extensions extensions)
{
this.certId = certId;
this.extensions = extensions;
}
// Token: 0x06009DCB RID: 40395 RVA: 0x002116D0 File Offset: 0x0020F8D0
[Token(Token = "0x6009DCB")]
[Address(RVA = "0x28CA3E0", Offset = "0x28C91E0", VA = "0x1828CA3E0")]
public Request ToRequest()
{
CertID id = this.certId.id;
X509Extensions x509Extensions = this.extensions;
return new Request(id, x509Extensions);
}
// Token: 0x04006A0D RID: 27149
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006A0D")]
internal CertificateID certId;
// Token: 0x04006A0E RID: 27150
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4006A0E")]
internal X509Extensions extensions;
}
}
}
@@ -0,0 +1,117 @@
using System;
using System.IO;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp
{
// Token: 0x020019C9 RID: 6601
[Token(Token = "0x20019C9")]
public class OcspResp
{
// Token: 0x06009DCC RID: 40396 RVA: 0x00211700 File Offset: 0x0020F900
[Token(Token = "0x6009DCC")]
[Address(RVA = "0x3FFB80", Offset = "0x3FE980", VA = "0x1803FFB80")]
public OcspResp(OcspResponse resp)
{
this.resp = resp;
}
// Token: 0x06009DCD RID: 40397 RVA: 0x0021171C File Offset: 0x0020F91C
[Token(Token = "0x6009DCD")]
[Address(RVA = "0x28C7490", Offset = "0x28C6290", VA = "0x1828C7490")]
public OcspResp(byte[] resp)
{
Asn1InputStream asn1InputStream = new Asn1InputStream(resp);
}
// Token: 0x06009DCE RID: 40398 RVA: 0x00211730 File Offset: 0x0020F930
[Token(Token = "0x6009DCE")]
[Address(RVA = "0x28C7500", Offset = "0x28C6300", VA = "0x1828C7500")]
public OcspResp(Stream inStr)
{
Asn1InputStream asn1InputStream = new Asn1InputStream(inStr);
}
// Token: 0x06009DCF RID: 40399 RVA: 0x00211744 File Offset: 0x0020F944
[Token(Token = "0x6009DCF")]
[Address(RVA = "0x28C73B0", Offset = "0x28C61B0", VA = "0x1828C73B0")]
private OcspResp(Asn1InputStream aIn)
{
OcspResponse instance = OcspResponse.GetInstance(aIn.ReadObject());
this.resp = instance;
}
// Token: 0x1700191A RID: 6426
// (get) Token: 0x06009DD0 RID: 40400 RVA: 0x00211780 File Offset: 0x0020F980
[Token(Token = "0x1700191A")]
public int Status
{
[Token(Token = "0x6009DD0")]
[Address(RVA = "0x28C7570", Offset = "0x28C6370", VA = "0x1828C7570")]
get
{
return this.resp.responseStatus.Value.IntValue;
}
}
// Token: 0x06009DD1 RID: 40401 RVA: 0x002117A8 File Offset: 0x0020F9A8
[Token(Token = "0x6009DD1")]
[Address(RVA = "0x28C7200", Offset = "0x28C6000", VA = "0x1828C7200")]
public object GetResponseObject()
{
ResponseBytes responseBytes = this.resp.responseBytes;
if (responseBytes != 0)
{
DerObjectIdentifier responseType = responseBytes.responseType;
Asn1OctetString response = responseBytes.response;
Stream octetStream = responseBytes.response.GetOctetStream();
Asn1Object asn1Object;
BasicOcspResponse instance = BasicOcspResponse.GetInstance(asn1Object);
BasicOcspResp basicOcspResp;
basicOcspResp.resp = instance;
ResponseData tbsResponseData = instance.tbsResponseData;
basicOcspResp.data = tbsResponseData;
}
throw new NullReferenceException();
}
// Token: 0x06009DD2 RID: 40402 RVA: 0x00211828 File Offset: 0x0020FA28
[Token(Token = "0x6009DD2")]
[Address(RVA = "0x16362F0", Offset = "0x16350F0", VA = "0x1816362F0")]
public byte[] GetEncoded()
{
return this.resp.GetEncoded();
}
// Token: 0x06009DD3 RID: 40403 RVA: 0x00211848 File Offset: 0x0020FA48
[Token(Token = "0x6009DD3")]
[Address(RVA = "0x28C7140", Offset = "0x28C5F40", VA = "0x1828C7140", Slot = "0")]
public override bool Equals(object obj)
{
if (obj != this)
{
if (obj != 0 && obj != 0)
{
Asn1Object asn1Object = this.resp.ToAsn1Object();
}
}
return true;
}
// Token: 0x06009DD4 RID: 40404 RVA: 0x00211878 File Offset: 0x0020FA78
[Token(Token = "0x6009DD4")]
[Address(RVA = "0x4DA700", Offset = "0x4D9500", VA = "0x1804DA700", Slot = "2")]
public override int GetHashCode()
{
Asn1Object asn1Object = this.resp.ToAsn1Object();
throw new NullReferenceException();
}
// Token: 0x04006A0F RID: 27151
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006A0F")]
private OcspResponse resp;
}
}
@@ -0,0 +1,41 @@
using System;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp
{
// Token: 0x020019CC RID: 6604
[Token(Token = "0x20019CC")]
public abstract class OcspRespStatus
{
// Token: 0x06009DD8 RID: 40408 RVA: 0x00211944 File Offset: 0x0020FB44
[Token(Token = "0x6009DD8")]
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
protected OcspRespStatus()
{
}
// Token: 0x04006A16 RID: 27158
[Token(Token = "0x4006A16")]
public const int Successful = 0;
// Token: 0x04006A17 RID: 27159
[Token(Token = "0x4006A17")]
public const int MalformedRequest = 1;
// Token: 0x04006A18 RID: 27160
[Token(Token = "0x4006A18")]
public const int InternalError = 2;
// Token: 0x04006A19 RID: 27161
[Token(Token = "0x4006A19")]
public const int TryLater = 3;
// Token: 0x04006A1A RID: 27162
[Token(Token = "0x4006A1A")]
public const int SigRequired = 5;
// Token: 0x04006A1B RID: 27163
[Token(Token = "0x4006A1B")]
public const int Unauthorized = 6;
}
}
@@ -0,0 +1,194 @@
using System;
using System.Collections;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.CryptoPro;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Nist;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.TeleTrust;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp
{
// Token: 0x020019CD RID: 6605
[Token(Token = "0x20019CD")]
internal class OcspUtilities
{
// Token: 0x06009DD9 RID: 40409 RVA: 0x00211958 File Offset: 0x0020FB58
[Token(Token = "0x6009DD9")]
[Address(RVA = "0x28C7960", Offset = "0x28C6760", VA = "0x1828C7960")]
static OcspUtilities()
{
IDictionary dictionary = Platform.CreateHashtable();
OcspUtilities.algorithms = dictionary;
OcspUtilities.oids = Platform.CreateHashtable();
OcspUtilities.noParams = new HashSet();
IDictionary dictionary2 = OcspUtilities.algorithms;
DerObjectIdentifier md2WithRsaEncryption = PkcsObjectIdentifiers.MD2WithRsaEncryption;
IDictionary dictionary3 = OcspUtilities.algorithms;
DerObjectIdentifier md2WithRsaEncryption2 = PkcsObjectIdentifiers.MD2WithRsaEncryption;
IDictionary dictionary4 = OcspUtilities.algorithms;
DerObjectIdentifier md5WithRsaEncryption = PkcsObjectIdentifiers.MD5WithRsaEncryption;
IDictionary dictionary5 = OcspUtilities.algorithms;
DerObjectIdentifier md5WithRsaEncryption2 = PkcsObjectIdentifiers.MD5WithRsaEncryption;
IDictionary dictionary6 = OcspUtilities.algorithms;
DerObjectIdentifier sha1WithRsaEncryption = PkcsObjectIdentifiers.Sha1WithRsaEncryption;
IDictionary dictionary7 = OcspUtilities.algorithms;
DerObjectIdentifier sha1WithRsaEncryption2 = PkcsObjectIdentifiers.Sha1WithRsaEncryption;
IDictionary dictionary8 = OcspUtilities.algorithms;
DerObjectIdentifier sha224WithRsaEncryption = PkcsObjectIdentifiers.Sha224WithRsaEncryption;
IDictionary dictionary9 = OcspUtilities.algorithms;
DerObjectIdentifier sha224WithRsaEncryption2 = PkcsObjectIdentifiers.Sha224WithRsaEncryption;
IDictionary dictionary10 = OcspUtilities.algorithms;
DerObjectIdentifier sha256WithRsaEncryption = PkcsObjectIdentifiers.Sha256WithRsaEncryption;
IDictionary dictionary11 = OcspUtilities.algorithms;
DerObjectIdentifier sha256WithRsaEncryption2 = PkcsObjectIdentifiers.Sha256WithRsaEncryption;
IDictionary dictionary12 = OcspUtilities.algorithms;
DerObjectIdentifier sha384WithRsaEncryption = PkcsObjectIdentifiers.Sha384WithRsaEncryption;
IDictionary dictionary13 = OcspUtilities.algorithms;
DerObjectIdentifier sha384WithRsaEncryption2 = PkcsObjectIdentifiers.Sha384WithRsaEncryption;
IDictionary dictionary14 = OcspUtilities.algorithms;
DerObjectIdentifier sha512WithRsaEncryption = PkcsObjectIdentifiers.Sha512WithRsaEncryption;
IDictionary dictionary15 = OcspUtilities.algorithms;
DerObjectIdentifier sha512WithRsaEncryption2 = PkcsObjectIdentifiers.Sha512WithRsaEncryption;
IDictionary dictionary16 = OcspUtilities.algorithms;
DerObjectIdentifier rsaSignatureWithRipeMD = TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD160;
IDictionary dictionary17 = OcspUtilities.algorithms;
DerObjectIdentifier rsaSignatureWithRipeMD2 = TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD160;
IDictionary dictionary18 = OcspUtilities.algorithms;
DerObjectIdentifier rsaSignatureWithRipeMD3 = TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD128;
IDictionary dictionary19 = OcspUtilities.algorithms;
DerObjectIdentifier rsaSignatureWithRipeMD4 = TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD128;
IDictionary dictionary20 = OcspUtilities.algorithms;
DerObjectIdentifier rsaSignatureWithRipeMD5 = TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD256;
IDictionary dictionary21 = OcspUtilities.algorithms;
DerObjectIdentifier rsaSignatureWithRipeMD6 = TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD256;
IDictionary dictionary22 = OcspUtilities.algorithms;
DerObjectIdentifier idDsaWithSha = X9ObjectIdentifiers.IdDsaWithSha1;
IDictionary dictionary23 = OcspUtilities.algorithms;
DerObjectIdentifier idDsaWithSha2 = X9ObjectIdentifiers.IdDsaWithSha1;
IDictionary dictionary24 = OcspUtilities.algorithms;
DerObjectIdentifier dsaWithSha = NistObjectIdentifiers.DsaWithSha224;
IDictionary dictionary25 = OcspUtilities.algorithms;
DerObjectIdentifier dsaWithSha2 = NistObjectIdentifiers.DsaWithSha256;
IDictionary dictionary26 = OcspUtilities.algorithms;
DerObjectIdentifier ecdsaWithSha = X9ObjectIdentifiers.ECDsaWithSha1;
IDictionary dictionary27 = OcspUtilities.algorithms;
DerObjectIdentifier ecdsaWithSha2 = X9ObjectIdentifiers.ECDsaWithSha1;
IDictionary dictionary28 = OcspUtilities.algorithms;
DerObjectIdentifier ecdsaWithSha3 = X9ObjectIdentifiers.ECDsaWithSha224;
IDictionary dictionary29 = OcspUtilities.algorithms;
DerObjectIdentifier ecdsaWithSha4 = X9ObjectIdentifiers.ECDsaWithSha256;
IDictionary dictionary30 = OcspUtilities.algorithms;
DerObjectIdentifier ecdsaWithSha5 = X9ObjectIdentifiers.ECDsaWithSha384;
IDictionary dictionary31 = OcspUtilities.algorithms;
DerObjectIdentifier ecdsaWithSha6 = X9ObjectIdentifiers.ECDsaWithSha512;
IDictionary dictionary32 = OcspUtilities.algorithms;
DerObjectIdentifier gostR3411x94WithGostR3410x = CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x94;
IDictionary dictionary33 = OcspUtilities.algorithms;
DerObjectIdentifier gostR3411x94WithGostR3410x2 = CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x94;
IDictionary dictionary34 = OcspUtilities.oids;
IDictionary dictionary35 = OcspUtilities.oids;
IDictionary dictionary36 = OcspUtilities.oids;
IDictionary dictionary37 = OcspUtilities.oids;
IDictionary dictionary38 = OcspUtilities.oids;
IDictionary dictionary39 = OcspUtilities.oids;
IDictionary dictionary40 = OcspUtilities.oids;
IDictionary dictionary41 = OcspUtilities.oids;
IDictionary dictionary42 = OcspUtilities.oids;
IDictionary dictionary43 = OcspUtilities.oids;
IDictionary dictionary44 = OcspUtilities.oids;
IDictionary dictionary45 = OcspUtilities.oids;
IDictionary dictionary46 = OcspUtilities.oids;
IDictionary dictionary47 = OcspUtilities.oids;
IDictionary dictionary48 = OcspUtilities.oids;
IDictionary dictionary49 = OcspUtilities.oids;
IDictionary dictionary50 = OcspUtilities.oids;
IDictionary dictionary51 = OcspUtilities.oids;
IDictionary dictionary52 = OcspUtilities.oids;
IDictionary dictionary53 = OcspUtilities.oids;
IDictionary dictionary54 = OcspUtilities.oids;
IDictionary dictionary55 = OcspUtilities.oids;
ISet set = OcspUtilities.noParams;
ISet set2 = OcspUtilities.noParams;
ISet set3 = OcspUtilities.noParams;
ISet set4 = OcspUtilities.noParams;
ISet set5 = OcspUtilities.noParams;
ISet set6 = OcspUtilities.noParams;
ISet set7 = OcspUtilities.noParams;
ISet set8 = OcspUtilities.noParams;
throw new NullReferenceException();
}
// Token: 0x06009DDA RID: 40410 RVA: 0x00211C20 File Offset: 0x0020FE20
[Token(Token = "0x6009DDA")]
[Address(RVA = "0x28C76C0", Offset = "0x28C64C0", VA = "0x1828C76C0")]
internal static DerObjectIdentifier GetAlgorithmOid(string algorithmName)
{
string text = Platform.ToUpperInvariant(algorithmName);
IDictionary dictionary = OcspUtilities.algorithms;
if (text == 0)
{
return new DerObjectIdentifier(text);
}
IDictionary dictionary2 = OcspUtilities.algorithms;
IDictionary dictionary3 = OcspUtilities.algorithms;
throw new NullReferenceException();
}
// Token: 0x06009DDB RID: 40411 RVA: 0x00211C5C File Offset: 0x0020FE5C
[Token(Token = "0x6009DDB")]
[Address(RVA = "0x28C75B0", Offset = "0x28C63B0", VA = "0x1828C75B0")]
internal static string GetAlgorithmName(DerObjectIdentifier oid)
{
IDictionary dictionary = OcspUtilities.oids;
return oid.identifier;
}
// Token: 0x06009DDC RID: 40412 RVA: 0x00211C84 File Offset: 0x0020FE84
[Token(Token = "0x6009DDC")]
[Address(RVA = "0x28C7840", Offset = "0x28C6640", VA = "0x1828C7840")]
internal static AlgorithmIdentifier GetSigAlgID(DerObjectIdentifier sigOid)
{
ISet set = OcspUtilities.noParams;
DerNull instance = DerNull.Instance;
return new AlgorithmIdentifier(sigOid, instance);
}
// Token: 0x1700191B RID: 6427
// (get) Token: 0x06009DDD RID: 40413 RVA: 0x00211CB4 File Offset: 0x0020FEB4
[Token(Token = "0x1700191B")]
internal static IEnumerable AlgNames
{
[Token(Token = "0x6009DDD")]
[Address(RVA = "0x28C8C50", Offset = "0x28C7A50", VA = "0x1828C8C50")]
get
{
IDictionary dictionary = OcspUtilities.algorithms;
throw new NullReferenceException();
}
}
// Token: 0x06009DDE RID: 40414 RVA: 0x00211CCC File Offset: 0x0020FECC
[Token(Token = "0x6009DDE")]
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
public OcspUtilities()
{
}
// Token: 0x04006A1C RID: 27164
[Token(Token = "0x4006A1C")]
private static readonly IDictionary algorithms;
// Token: 0x04006A1D RID: 27165
[Token(Token = "0x4006A1D")]
private static readonly IDictionary oids;
// Token: 0x04006A1E RID: 27166
[Token(Token = "0x4006A1E")]
private static readonly ISet noParams;
}
}
@@ -0,0 +1,55 @@
using System;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp
{
// Token: 0x020019CE RID: 6606
[Token(Token = "0x20019CE")]
public class Req : X509ExtensionBase
{
// Token: 0x06009DDF RID: 40415 RVA: 0x00211CE0 File Offset: 0x0020FEE0
[Token(Token = "0x6009DDF")]
[Address(RVA = "0x462000", Offset = "0x460E00", VA = "0x180462000")]
public Req(Request req)
{
this.req = req;
}
// Token: 0x06009DE0 RID: 40416 RVA: 0x00211CFC File Offset: 0x0020FEFC
[Token(Token = "0x6009DE0")]
[Address(RVA = "0x28CA370", Offset = "0x28C9170", VA = "0x1828CA370")]
public CertificateID GetCertID()
{
return new CertificateID(this.req.reqCert);
}
// Token: 0x1700191C RID: 6428
// (get) Token: 0x06009DE1 RID: 40417 RVA: 0x00211D20 File Offset: 0x0020FF20
[Token(Token = "0x1700191C")]
public X509Extensions SingleRequestExtensions
{
[Token(Token = "0x6009DE1")]
[Address(RVA = "0x434BE0", Offset = "0x4339E0", VA = "0x180434BE0")]
get
{
return this.req.singleRequestExtensions;
}
}
// Token: 0x06009DE2 RID: 40418 RVA: 0x00211D40 File Offset: 0x0020FF40
[Token(Token = "0x6009DE2")]
[Address(RVA = "0x434BE0", Offset = "0x4339E0", VA = "0x180434BE0", Slot = "8")]
protected override X509Extensions GetX509Extensions()
{
return this.req.singleRequestExtensions;
}
// Token: 0x04006A1F RID: 27167
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006A1F")]
private Request req;
}
}
@@ -0,0 +1,107 @@
using System;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp
{
// Token: 0x020019CF RID: 6607
[Token(Token = "0x20019CF")]
public class RespData : X509ExtensionBase
{
// Token: 0x06009DE3 RID: 40419 RVA: 0x00211D60 File Offset: 0x0020FF60
[Token(Token = "0x6009DE3")]
[Address(RVA = "0x462000", Offset = "0x460E00", VA = "0x180462000")]
public RespData(ResponseData data)
{
this.data = data;
}
// Token: 0x1700191D RID: 6429
// (get) Token: 0x06009DE4 RID: 40420 RVA: 0x00211D7C File Offset: 0x0020FF7C
[Token(Token = "0x1700191D")]
public int Version
{
[Token(Token = "0x6009DE4")]
[Address(RVA = "0x28CA640", Offset = "0x28C9440", VA = "0x1828CA640")]
get
{
int intValue = this.data.version.Value.IntValue;
return intValue + 1;
}
}
// Token: 0x06009DE5 RID: 40421 RVA: 0x00211DAC File Offset: 0x0020FFAC
[Token(Token = "0x6009DE5")]
[Address(RVA = "0x28CA460", Offset = "0x28C9260", VA = "0x1828CA460")]
public RespID GetResponderId()
{
ResponderID responderID = this.data.responderID;
RespID respID;
respID.id = responderID;
return respID;
}
// Token: 0x1700191E RID: 6430
// (get) Token: 0x06009DE6 RID: 40422 RVA: 0x00211DD4 File Offset: 0x0020FFD4
[Token(Token = "0x1700191E")]
public DateTime ProducedAt
{
[Token(Token = "0x6009DE6")]
[Address(RVA = "0x28CA610", Offset = "0x28C9410", VA = "0x1828CA610")]
get
{
return this.data.producedAt.ToDateTime();
}
}
// Token: 0x06009DE7 RID: 40423 RVA: 0x00211DF8 File Offset: 0x0020FFF8
[Token(Token = "0x6009DE7")]
[Address(RVA = "0x28CA4D0", Offset = "0x28C92D0", VA = "0x1828CA4D0")]
public SingleResp[] GetResponses()
{
Asn1Sequence responses = this.data.responses;
Asn1Encodable asn1Encodable;
SingleResp[] array = new SingleResp[asn1Encodable];
int num = 0;
if (num != array.Length)
{
Asn1SequenceParser parser = responses.Parser;
SingleResp singleResp;
SingleResponse singleResponse;
singleResp.resp = singleResponse;
num++;
array[0] = singleResp;
}
return array;
}
// Token: 0x1700191F RID: 6431
// (get) Token: 0x06009DE8 RID: 40424 RVA: 0x00211E48 File Offset: 0x00210048
[Token(Token = "0x1700191F")]
public X509Extensions ResponseExtensions
{
[Token(Token = "0x6009DE8")]
[Address(RVA = "0x532820", Offset = "0x531620", VA = "0x180532820")]
get
{
return this.data.responseExtensions;
}
}
// Token: 0x06009DE9 RID: 40425 RVA: 0x00211E68 File Offset: 0x00210068
[Token(Token = "0x6009DE9")]
[Address(RVA = "0x532820", Offset = "0x531620", VA = "0x180532820", Slot = "8")]
protected override X509Extensions GetX509Extensions()
{
return this.data.responseExtensions;
}
// Token: 0x04006A20 RID: 27168
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006A20")]
internal readonly ResponseData data;
}
}
@@ -0,0 +1,81 @@
using System;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Security;
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp
{
// Token: 0x020019D0 RID: 6608
[Token(Token = "0x20019D0")]
public class RespID
{
// Token: 0x06009DEA RID: 40426 RVA: 0x00211E88 File Offset: 0x00210088
[Token(Token = "0x6009DEA")]
[Address(RVA = "0x3FFB80", Offset = "0x3FE980", VA = "0x1803FFB80")]
public RespID(ResponderID id)
{
this.id = id;
}
// Token: 0x06009DEB RID: 40427 RVA: 0x00211EA4 File Offset: 0x002100A4
[Token(Token = "0x6009DEB")]
[Address(RVA = "0x28CA8A0", Offset = "0x28C96A0", VA = "0x1828CA8A0")]
public RespID(X509Name name)
{
ResponderID responderID = new ResponderID(name);
this.id = responderID;
}
// Token: 0x06009DEC RID: 40428 RVA: 0x00211EC8 File Offset: 0x002100C8
[Token(Token = "0x6009DEC")]
[Address(RVA = "0x28CA740", Offset = "0x28C9540", VA = "0x1828CA740")]
public RespID(AsymmetricKeyParameter publicKey)
{
byte[] octets = SubjectPublicKeyInfoFactory.CreateSubjectPublicKeyInfo(publicKey).keyData.GetOctets();
DerOctetString derOctetString = new DerOctetString(DigestUtilities.CalculateDigest("SHA1", octets));
ResponderID responderID = new ResponderID(derOctetString);
this.id = responderID;
}
// Token: 0x06009DED RID: 40429 RVA: 0x00211F2C File Offset: 0x0021012C
[Token(Token = "0x6009DED")]
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20")]
public ResponderID ToAsn1Object()
{
return this.id;
}
// Token: 0x06009DEE RID: 40430 RVA: 0x00211F40 File Offset: 0x00210140
[Token(Token = "0x6009DEE")]
[Address(RVA = "0x28CA680", Offset = "0x28C9480", VA = "0x1828CA680", Slot = "0")]
public override bool Equals(object obj)
{
if (obj != this)
{
if (obj != 0 && obj != 0)
{
Asn1Object asn1Object = this.id.ToAsn1Object();
}
}
return true;
}
// Token: 0x06009DEF RID: 40431 RVA: 0x00211F70 File Offset: 0x00210170
[Token(Token = "0x6009DEF")]
[Address(RVA = "0x4DA700", Offset = "0x4D9500", VA = "0x1804DA700", Slot = "2")]
public override int GetHashCode()
{
Asn1Object asn1Object = this.id.ToAsn1Object();
throw new NullReferenceException();
}
// Token: 0x04006A21 RID: 27169
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006A21")]
internal readonly ResponderID id;
}
}
@@ -0,0 +1,98 @@
using System;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp
{
// Token: 0x020019D1 RID: 6609
[Token(Token = "0x20019D1")]
public class RevokedStatus : CertificateStatus
{
// Token: 0x06009DF0 RID: 40432 RVA: 0x00211F90 File Offset: 0x00210190
[Token(Token = "0x6009DF0")]
[Address(RVA = "0x28CAEC0", Offset = "0x28C9CC0", VA = "0x1828CAEC0")]
public RevokedStatus(RevokedInfo info)
{
this.info = info;
}
// Token: 0x06009DF1 RID: 40433 RVA: 0x00211FAC File Offset: 0x002101AC
[Token(Token = "0x6009DF1")]
[Address(RVA = "0x28CADE0", Offset = "0x28C9BE0", VA = "0x1828CADE0")]
public RevokedStatus(DateTime revocationDate, int reason)
{
DerGeneralizedTime derGeneralizedTime = new DerGeneralizedTime(revocationDate);
CrlReason crlReason = new CrlReason(reason);
RevokedInfo revokedInfo = new RevokedInfo(derGeneralizedTime, crlReason);
this.info = revokedInfo;
}
// Token: 0x17001920 RID: 6432
// (get) Token: 0x06009DF2 RID: 40434 RVA: 0x00211FDC File Offset: 0x002101DC
[Token(Token = "0x17001920")]
public DateTime RevocationTime
{
[Token(Token = "0x6009DF2")]
[Address(RVA = "0x28CAFC0", Offset = "0x28C9DC0", VA = "0x1828CAFC0")]
get
{
return this.info.revocationTime.ToDateTime();
}
}
// Token: 0x17001921 RID: 6433
// (get) Token: 0x06009DF3 RID: 40435 RVA: 0x00212000 File Offset: 0x00210200
[Token(Token = "0x17001921")]
public bool HasRevocationReason
{
[Token(Token = "0x6009DF3")]
[Address(RVA = "0x28C70A0", Offset = "0x28C5EA0", VA = "0x1828C70A0")]
get
{
RevokedInfo revokedInfo = this.info;
throw new NullReferenceException();
}
}
// Token: 0x17001922 RID: 6434
// (get) Token: 0x06009DF4 RID: 40436 RVA: 0x0021201C File Offset: 0x0021021C
[Token(Token = "0x17001922")]
public int RevocationReason
{
[Token(Token = "0x6009DF4")]
[Address(RVA = "0x28CAF30", Offset = "0x28C9D30", VA = "0x1828CAF30")]
get
{
/*
An exception occurred when decompiling this method (06009DF4)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp.RevokedStatus::get_RevocationReason()
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_22:
stloc:InvalidOperationException(var_1_2C, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("attempt to get a reason where none is available")))
}
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: 0x04006A22 RID: 27170
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006A22")]
internal readonly RevokedInfo info;
}
}
@@ -0,0 +1,107 @@
using System;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Date;
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp
{
// Token: 0x020019D2 RID: 6610
[Token(Token = "0x20019D2")]
public class SingleResp : X509ExtensionBase
{
// Token: 0x06009DF5 RID: 40437 RVA: 0x00212058 File Offset: 0x00210258
[Token(Token = "0x6009DF5")]
[Address(RVA = "0x462000", Offset = "0x460E00", VA = "0x180462000")]
public SingleResp(SingleResponse resp)
{
this.resp = resp;
}
// Token: 0x06009DF6 RID: 40438 RVA: 0x00212074 File Offset: 0x00210274
[Token(Token = "0x6009DF6")]
[Address(RVA = "0x28CAFF0", Offset = "0x28C9DF0", VA = "0x1828CAFF0")]
public CertificateID GetCertID()
{
return new CertificateID(this.resp.certID);
}
// Token: 0x06009DF7 RID: 40439 RVA: 0x00212098 File Offset: 0x00210298
[Token(Token = "0x6009DF7")]
[Address(RVA = "0x28CB060", Offset = "0x28C9E60", VA = "0x1828CB060")]
public object GetCertStatus()
{
CertStatus certStatus = this.resp.certStatus;
int tagNo = certStatus.tagNo;
if (tagNo != 0)
{
if (tagNo != 1)
{
UnknownStatus unknownStatus = new UnknownStatus();
}
RevokedInfo instance = RevokedInfo.GetInstance(certStatus.value);
RevokedStatus revokedStatus;
revokedStatus.info = instance;
}
throw new NullReferenceException();
}
// Token: 0x17001923 RID: 6435
// (get) Token: 0x06009DF8 RID: 40440 RVA: 0x002120E4 File Offset: 0x002102E4
[Token(Token = "0x17001923")]
public DateTime ThisUpdate
{
[Token(Token = "0x6009DF8")]
[Address(RVA = "0x28CB220", Offset = "0x28CA020", VA = "0x1828CB220")]
get
{
return this.resp.thisUpdate.ToDateTime();
}
}
// Token: 0x17001924 RID: 6436
// (get) Token: 0x06009DF9 RID: 40441 RVA: 0x00212108 File Offset: 0x00210308
[Token(Token = "0x17001924")]
public DateTimeObject NextUpdate
{
[Token(Token = "0x6009DF9")]
[Address(RVA = "0x28CB190", Offset = "0x28C9F90", VA = "0x1828CB190")]
get
{
DerGeneralizedTime nextUpdate = this.resp.nextUpdate;
if (nextUpdate == 0)
{
}
return new DateTimeObject(nextUpdate.ToDateTime());
}
}
// Token: 0x17001925 RID: 6437
// (get) Token: 0x06009DFA RID: 40442 RVA: 0x00212138 File Offset: 0x00210338
[Token(Token = "0x17001925")]
public X509Extensions SingleExtensions
{
[Token(Token = "0x6009DFA")]
[Address(RVA = "0x42FC20", Offset = "0x42EA20", VA = "0x18042FC20")]
get
{
return this.resp.singleExtensions;
}
}
// Token: 0x06009DFB RID: 40443 RVA: 0x00212158 File Offset: 0x00210358
[Token(Token = "0x6009DFB")]
[Address(RVA = "0x42FC20", Offset = "0x42EA20", VA = "0x18042FC20", Slot = "8")]
protected override X509Extensions GetX509Extensions()
{
return this.resp.singleExtensions;
}
// Token: 0x04006A23 RID: 27171
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006A23")]
internal readonly SingleResponse resp;
}
}
@@ -0,0 +1,17 @@
using System;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Ocsp
{
// Token: 0x020019D3 RID: 6611
[Token(Token = "0x20019D3")]
public class UnknownStatus : CertificateStatus
{
// Token: 0x06009DFC RID: 40444 RVA: 0x00212178 File Offset: 0x00210378
[Token(Token = "0x6009DFC")]
[Address(RVA = "0x28CB250", Offset = "0x28CA050", VA = "0x1828CB250")]
public UnknownStatus()
{
}
}
}