Files
niko 8fc35183db a
2026-04-11 22:19:20 +02:00

891 lines
31 KiB
C#

using System;
using System.Collections;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Date;
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509;
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix
{
// Token: 0x0200197F RID: 6527
[Token(Token = "0x200197F")]
public class PkixCertPathValidatorUtilities
{
// Token: 0x06009B33 RID: 39731 RVA: 0x00202A94 File Offset: 0x00200C94
[Token(Token = "0x6009B33")]
[Address(RVA = "0x1CCBD30", Offset = "0x1CCAB30", VA = "0x181CCBD30")]
internal static TrustAnchor FindTrustAnchor(X509Certificate cert, ISet trustAnchors)
{
/*
An exception occurred when decompiling this method (06009B33)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix.TrustAnchor BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix.PkixCertPathValidatorUtilities::FindTrustAnchor(BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Certificate,BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections.ISet)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_95:
stloc:Exception(var_9_A0, newobj:Exception(Exception::.ctor, ldstr:string("TrustAnchor found but certificate validation failed."), ldloc:int32[exp:Exception](var_1_03)))
}
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: 0x06009B34 RID: 39732 RVA: 0x00202B44 File Offset: 0x00200D44
[Token(Token = "0x6009B34")]
[Address(RVA = "0x1CCE1E0", Offset = "0x1CCCFE0", VA = "0x181CCE1E0")]
internal static bool IsIssuerTrustAnchor(X509Certificate cert, ISet trustAnchors)
{
/*
An exception occurred when decompiling this method (06009B34)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix.PkixCertPathValidatorUtilities::IsIssuerTrustAnchor(BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Certificate,BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections.ISet)
---> System.Exception: Basic block has to end with unconditional control flow.
{
Block_0:
stloc:TrustAnchor(var_0_07, call:TrustAnchor(PkixCertPathValidatorUtilities::FindTrustAnchor, ldloc:X509Certificate(cert), ldloc:ISet(trustAnchors)))
}
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: 0x06009B35 RID: 39733 RVA: 0x00202B5C File Offset: 0x00200D5C
[Token(Token = "0x6009B35")]
[Address(RVA = "0x1CCB130", Offset = "0x1CC9F30", VA = "0x181CCB130")]
internal static void AddAdditionalStoresFromAltNames(X509Certificate cert, PkixParameters pkixParams)
{
while (cert.GetSubjectAlternativeNames() != 0)
{
ICollection subjectAlternativeNames = cert.GetSubjectAlternativeNames();
if (subjectAlternativeNames == 0)
{
break;
}
if (subjectAlternativeNames != 0)
{
int num;
while (num == 0)
{
}
if (num == 0 || num != 0)
{
break;
}
}
}
}
// Token: 0x06009B36 RID: 39734 RVA: 0x00202B90 File Offset: 0x00200D90
[Token(Token = "0x6009B36")]
[Address(RVA = "0x1CCE0C0", Offset = "0x1CCCEC0", VA = "0x181CCE0C0")]
internal static DateTime GetValidDate(PkixParameters paramsPKIX)
{
return DateTime.UtcNow;
}
// Token: 0x06009B37 RID: 39735 RVA: 0x00202BAC File Offset: 0x00200DAC
[Token(Token = "0x6009B37")]
[Address(RVA = "0x1CCD540", Offset = "0x1CCC340", VA = "0x181CCD540")]
internal static X509Name GetIssuerPrincipal(object cert)
{
for (;;)
{
if (cert == 0)
{
if (cert != 0 && cert != 0)
{
break;
}
}
else if (cert != 0 && cert != 0)
{
goto Block_4;
}
}
X509Name[] array;
return array[0];
Block_4:
throw new NullReferenceException();
}
// Token: 0x06009B38 RID: 39736 RVA: 0x00202BE4 File Offset: 0x00200DE4
[Token(Token = "0x6009B38")]
[Address(RVA = "0x1CCE270", Offset = "0x1CCD070", VA = "0x181CCE270")]
internal static bool IsSelfIssued(X509Certificate cert)
{
X509Name issuerDN = cert.IssuerDN;
BigInteger serialNumber = cert.SerialNumber;
bool flag;
return flag;
}
// Token: 0x06009B39 RID: 39737 RVA: 0x00202C08 File Offset: 0x00200E08
[Token(Token = "0x6009B39")]
[Address(RVA = "0x1CCC0E0", Offset = "0x1CCAEE0", VA = "0x181CCC0E0")]
internal static AlgorithmIdentifier GetAlgorithmIdentifier(AsymmetricKeyParameter key)
{
return SubjectPublicKeyInfoFactory.CreateSubjectPublicKeyInfo(key).algID;
}
// Token: 0x06009B3A RID: 39738 RVA: 0x00202C28 File Offset: 0x00200E28
[Token(Token = "0x6009B3A")]
[Address(RVA = "0x1CCE140", Offset = "0x1CCCF40", VA = "0x181CCE140")]
internal static bool IsAnyPolicy(ISet policySet)
{
bool flag;
return policySet == 0 || flag;
}
// Token: 0x06009B3B RID: 39739 RVA: 0x00202C3C File Offset: 0x00200E3C
[Token(Token = "0x6009B3B")]
[Address(RVA = "0x1CCAF90", Offset = "0x1CC9D90", VA = "0x181CCAF90")]
internal static void AddAdditionalStoreFromLocation(string location, PkixParameters pkixParams)
{
if (pkixParams.GetStores() != 0)
{
if (!Platform.StartsWith(location, "ldap://"))
{
}
string text = location.Substring(7);
}
}
// Token: 0x06009B3C RID: 39740 RVA: 0x00202CAC File Offset: 0x00200EAC
[Token(Token = "0x6009B3C")]
[Address(RVA = "0x1CCDC70", Offset = "0x1CCCA70", VA = "0x181CCDC70")]
private static BigInteger GetSerialNumber(object cert)
{
while ((cert == 0 && (cert == 0 || cert == 0)) || cert == 0 || cert == 0)
{
}
throw new NullReferenceException();
}
// Token: 0x06009B3D RID: 39741 RVA: 0x00202CE0 File Offset: 0x00200EE0
[Token(Token = "0x6009B3D")]
[Address(RVA = "0x1CCDA70", Offset = "0x1CCC870", VA = "0x181CCDA70")]
internal static ISet GetQualifierSet(Asn1Sequence qualifiers)
{
int num;
do
{
num = 0;
HashSet hashSet = new HashSet();
if (qualifiers == 0)
{
break;
}
IEnumerator enumerator = qualifiers.GetEnumerator();
if (enumerator != 0)
{
if (enumerator == 0)
{
}
if (enumerator == 0)
{
goto IL_36;
}
}
PolicyQualifierInfo policyQualifierInfo;
if (policyQualifierInfo != 0)
{
}
}
while (num != 0);
throw new NullReferenceException();
IL_36:
throw new NullReferenceException();
}
// Token: 0x06009B3E RID: 39742 RVA: 0x00202D28 File Offset: 0x00200F28
[Token(Token = "0x6009B3E")]
[Address(RVA = "0x1CCF590", Offset = "0x1CCE390", VA = "0x181CCF590")]
internal static PkixPolicyNode RemovePolicyNode(PkixPolicyNode validPolicyTree, IList[] policyNodes, PkixPolicyNode _node)
{
if (validPolicyTree != 0)
{
PkixCertPathValidatorUtilities.RemovePolicyNodeRecurse(policyNodes, _node);
return validPolicyTree;
}
throw new NullReferenceException();
}
// Token: 0x06009B3F RID: 39743 RVA: 0x00202D70 File Offset: 0x00200F70
[Token(Token = "0x6009B3F")]
[Address(RVA = "0x1CCF350", Offset = "0x1CCE150", VA = "0x181CCF350")]
private static void RemovePolicyNodeRecurse(IList[] policyNodes, PkixPolicyNode _node)
{
int num;
do
{
num = 0;
string text = _node.ToString();
IList list = policyNodes[text];
if (_node.ValidPolicy == 0)
{
break;
}
int depth = _node.Depth;
int num2;
if (depth != 0)
{
if (depth == 0)
{
}
num2 = 0;
if (depth == 0)
{
goto IL_40;
}
}
if (num2 != 0)
{
}
}
while (num != 0);
return;
IL_40:
throw new NullReferenceException();
}
// Token: 0x06009B40 RID: 39744 RVA: 0x00202DC4 File Offset: 0x00200FC4
[Token(Token = "0x6009B40")]
[Address(RVA = "0x1CCE2D0", Offset = "0x1CCD0D0", VA = "0x181CCE2D0")]
internal static void PrepareNextCertB1(int i, IList[] policyNodes, string id_p, IDictionary m_idp, X509Certificate cert)
{
IList list = policyNodes[i];
bool flag;
while (!flag)
{
}
}
// Token: 0x06009B41 RID: 39745 RVA: 0x00202E68 File Offset: 0x00201068
[Token(Token = "0x6009B41")]
[Address(RVA = "0x1CCEA30", Offset = "0x1CCD830", VA = "0x181CCEA30")]
internal static PkixPolicyNode PrepareNextCertB2(int i, IList[] policyNodes, string id_p, PkixPolicyNode validPolicyTree)
{
int num;
do
{
num = 0;
IList list = Platform.CreateArrayList(policyNodes[i]);
if (list != 0)
{
if (list == 0)
{
continue;
}
bool flag;
if (!flag)
{
num++;
}
IList list2 = policyNodes[i];
int num2 = i - 1;
IList list3 = policyNodes[num2];
PkixPolicyNode pkixPolicyNode;
if (num < num2 && pkixPolicyNode != 0)
{
num++;
}
}
}
while (num != 0);
return validPolicyTree;
}
// Token: 0x06009B42 RID: 39746 RVA: 0x00202EC8 File Offset: 0x002010C8
[Token(Token = "0x6009B42")]
[Address(RVA = "0x1CCC180", Offset = "0x1CCAF80", VA = "0x181CCC180")]
internal static void GetCertStatus(DateTime validDate, X509Crl crl, object cert, CertStatus certStatus)
{
Asn1Object asn1Object;
do
{
if (asn1Object == 0)
{
}
}
while (asn1Object == 0);
X509Crl x509Crl = new X509Crl(CertificateList.GetInstance(asn1Object));
BigInteger serialNumber = PkixCertPathValidatorUtilities.GetSerialNumber(cert);
if (x509Crl.NextUpdate != 0)
{
int num = 0;
if (!PkixCertPathValidatorUtilities.GetIssuerPrincipal(cert).Equivalent(num, true))
{
int version = crl.Version;
bool flag;
if (!flag)
{
return;
}
}
bool flag2;
DerEnumerated instance;
if (flag2)
{
Asn1Object asn1Object2;
instance = DerEnumerated.GetInstance(asn1Object2);
}
DateTime dateTime;
if (instance < dateTime)
{
if (instance == 0)
{
goto IL_B7;
}
BigInteger value = instance.Value;
int num2 = 0;
if (!value.TestBit(num2) && !instance.Value.TestBit(1) && !instance.Value.TestBit(2) && !instance.Value.TestBit(8))
{
return;
}
}
if (instance != 0)
{
goto IL_C0;
}
IL_B7:
certStatus.status = (int)((ulong)0L);
IL_C0:
int sign = instance.Value.sign;
certStatus.status = sign;
DateTime dateTime2;
DateTimeObject dateTimeObject = new DateTimeObject(dateTime2);
certStatus.revocationDate = dateTimeObject;
}
}
// Token: 0x06009B43 RID: 39747 RVA: 0x00202FD0 File Offset: 0x002011D0
[Token(Token = "0x6009B43")]
[Address(RVA = "0x1CCD6F0", Offset = "0x1CCC4F0", VA = "0x181CCD6F0")]
internal static AsymmetricKeyParameter GetNextWorkingKey(IList certs, int index)
{
int num;
int num2;
int num3;
for (;;)
{
num = 0;
if (num == 0 || num == 0)
{
goto IL_35;
}
num2 = 0;
if (num != 0)
{
num3 = index + 1;
if (num3 < num2 && num2 != 0)
{
break;
}
}
}
if (num2 == 0)
{
num3++;
}
DsaPublicKeyParameters dsaPublicKeyParameters = new DsaPublicKeyParameters(num, num2);
IL_35:
throw new NullReferenceException();
}
// Token: 0x06009B44 RID: 39748 RVA: 0x00203018 File Offset: 0x00201218
[Token(Token = "0x6009B44")]
[Address(RVA = "0x1CCDE10", Offset = "0x1CCCC10", VA = "0x181CCDE10")]
internal static DateTime GetValidCertDateFromValidityModel(PkixParameters paramsPkix, PkixCertPath certPath, int index)
{
if (index > 0 && index == 0)
{
DerGeneralizedTime instance = DerGeneralizedTime.GetInstance(IsisMttObjectIdentifiers.IdIsisMtt);
if (instance != 0)
{
return instance.ToDateTime();
}
}
return PkixCertPathValidatorUtilities.GetValidDate(paramsPkix);
}
// Token: 0x06009B45 RID: 39749 RVA: 0x00203050 File Offset: 0x00201250
[Token(Token = "0x6009B45")]
[Address(RVA = "0x1CCB840", Offset = "0x1CCA640", VA = "0x181CCB840")]
internal static ICollection FindCertificates(X509CertStoreSelector certSelect, IList certStores)
{
int num;
do
{
num = 0;
HashSet hashSet = new HashSet();
if (hashSet != 0)
{
if (hashSet != 0 && hashSet == 0)
{
goto IL_4F;
}
if (hashSet != 0)
{
}
if ((uint)(-1) != 0U)
{
}
if (num != 0)
{
goto IL_43;
}
if ((ulong)((uint)(-1)) != (ulong)(-1L))
{
}
}
if ((uint)(-1) != 0U)
{
}
}
while (num != 0);
throw new NullReferenceException();
IL_43:
throw new NullReferenceException();
IL_4F:
throw new NullReferenceException();
}
// Token: 0x06009B46 RID: 39750 RVA: 0x002030B4 File Offset: 0x002012B4
[Token(Token = "0x6009B46")]
[Address(RVA = "0x1CCCB60", Offset = "0x1CCB960", VA = "0x181CCCB60")]
internal static void GetCrlIssuersFromDistributionPoint(DistributionPoint dp, ICollection issuerPrincipals, X509CrlStoreSelector selector, PkixParameters pkixParams)
{
/*
An exception occurred when decompiling this method (06009B46)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix.PkixCertPathValidatorUtilities::GetCrlIssuersFromDistributionPoint(BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.DistributionPoint,System.Collections.ICollection,BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store.X509CrlStoreSelector,BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix.PkixParameters)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_AD:
stloc:Exception(var_8_B7, newobj:Exception(Exception::.ctor, ldstr:string("CRL issuer is omitted from distribution point but no distributionPoint field present.")))
}
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: 0x06009B47 RID: 39751 RVA: 0x0020317C File Offset: 0x0020137C
[Token(Token = "0x6009B47")]
[Address(RVA = "0x1CCC5E0", Offset = "0x1CCB3E0", VA = "0x181CCC5E0")]
internal static ISet GetCompleteCrls(DistributionPoint dp, object cert, DateTime currentDate, PkixParameters paramsPKIX)
{
for (;;)
{
X509CrlStoreSelector x509CrlStoreSelector = new X509CrlStoreSelector();
HashSet hashSet = new HashSet();
if (cert != 0)
{
if (cert != 0)
{
if (cert == 0 || cert == 0)
{
continue;
}
}
}
IL_29:
X509Name issuerPrincipal = PkixCertPathValidatorUtilities.GetIssuerPrincipal(cert);
PkixCertPathValidatorUtilities.GetCrlIssuersFromDistributionPoint(dp, hashSet, x509CrlStoreSelector, paramsPKIX);
if (cert == 0)
{
goto IL_59;
}
if (cert == 0)
{
int num = 0;
if (cert == 0)
{
goto IL_59;
}
if (num != 0)
{
x509CrlStoreSelector.attrCertChecking = num;
goto IL_59;
}
continue;
}
IL_6D:
int num2 = 0;
if (cert != 0)
{
x509CrlStoreSelector.certificateChecking = cert;
goto IL_7B;
}
continue;
IL_59:
x509CrlStoreSelector.completeCrlEnabled = true;
if (PkixCertPathValidatorUtilities.CrlUtilities.ToString() == 0)
{
goto IL_6D;
}
IL_7B:
if (num2 == 0)
{
break;
}
continue;
goto IL_29;
}
throw new IndexOutOfRangeException();
}
// Token: 0x06009B48 RID: 39752 RVA: 0x00203224 File Offset: 0x00201424
[Token(Token = "0x6009B48")]
[Address(RVA = "0x1CCCF40", Offset = "0x1CCBD40", VA = "0x181CCCF40")]
internal static ISet GetDeltaCrls(DateTime currentDate, PkixParameters paramsPKIX, X509Crl completeCRL)
{
int num;
do
{
num = 0;
X509CrlStoreSelector x509CrlStoreSelector = new X509CrlStoreSelector();
IList list = Platform.CreateArrayList();
int version = completeCRL.Version;
x509CrlStoreSelector.Issuers = list;
DerObjectIdentifier crlNumber = X509Extensions.CrlNumber;
Asn1Object extensionValue = PkixCertPathValidatorUtilities.GetExtensionValue(completeCRL, crlNumber);
if (extensionValue != 0)
{
BigInteger positiveValue = DerInteger.GetInstance(extensionValue).PositiveValue;
}
DerObjectIdentifier issuingDistributionPoint = X509Extensions.IssuingDistributionPoint;
Asn1Object extensionValue2 = PkixCertPathValidatorUtilities.GetExtensionValue(completeCRL, issuingDistributionPoint);
byte[] derEncoded;
if (extensionValue2 != 0)
{
derEncoded = extensionValue2.GetDerEncoded();
}
if (num == 0)
{
}
BigInteger one = BigInteger.One;
BigInteger bigInteger;
x509CrlStoreSelector.minCrlNumber = bigInteger;
x509CrlStoreSelector.IssuingDistributionPoint = derEncoded;
x509CrlStoreSelector.issuingDistributionPointEnabled = true;
x509CrlStoreSelector.maxBaseCrlNumber = num;
string text = PkixCertPathValidatorUtilities.CrlUtilities.ToString();
HashSet hashSet = new HashSet();
bool flag;
if (hashSet != 0)
{
if (hashSet == 0)
{
}
if (hashSet == 0)
{
goto IL_CD;
}
while (!flag)
{
}
}
if (flag)
{
}
}
while (num != 0);
throw new NullReferenceException();
IL_CD:
throw new NullReferenceException();
}
// Token: 0x06009B49 RID: 39753 RVA: 0x00203304 File Offset: 0x00201504
[Token(Token = "0x6009B49")]
[Address(RVA = "0x1CCFBC0", Offset = "0x1CCE9C0", VA = "0x181CCFBC0")]
private static bool isDeltaCrl(X509Crl crl)
{
ISet nonCriticalExtensionOids = crl.GetNonCriticalExtensionOids();
DerObjectIdentifier deltaCrlIndicator = X509Extensions.DeltaCrlIndicator;
throw new NullReferenceException();
}
// Token: 0x06009B4A RID: 39754 RVA: 0x00203324 File Offset: 0x00201524
[Token(Token = "0x6009B4A")]
[Address(RVA = "0x1CCB530", Offset = "0x1CCA330", VA = "0x181CCB530")]
internal static ICollection FindCertificates(X509AttrCertStoreSelector certSelect, IList certStores)
{
int num;
do
{
num = 0;
HashSet hashSet = new HashSet();
if (hashSet != 0)
{
if (hashSet != 0 && hashSet == 0)
{
goto IL_4F;
}
if (hashSet != 0)
{
}
if ((uint)(-1) != 0U)
{
}
if (num != 0)
{
goto IL_43;
}
if ((ulong)((uint)(-1)) != (ulong)(-1L))
{
}
}
if ((uint)(-1) != 0U)
{
}
}
while (num != 0);
throw new NullReferenceException();
IL_43:
throw new NullReferenceException();
IL_4F:
throw new NullReferenceException();
}
// Token: 0x06009B4B RID: 39755 RVA: 0x00203388 File Offset: 0x00201588
[Token(Token = "0x6009B4B")]
[Address(RVA = "0x1CCB320", Offset = "0x1CCA120", VA = "0x181CCB320")]
internal static void AddAdditionalStoresFromCrlDistributionPoint(CrlDistPoint crldp, PkixParameters pkixParams)
{
if (crldp != 0)
{
DistributionPoint[] distributionPoints = crldp.GetDistributionPoints();
int num = 0;
int num2 = 0;
int length = distributionPoints.Length;
if (num2 < length)
{
DistributionPointName distributionPoint = distributionPoints[num].distributionPoint;
if (distributionPoint != 0 && distributionPoint.type == 0)
{
GeneralName[] names = GeneralNames.GetInstance(distributionPoint.name).GetNames();
int num3 = 0;
if (num3 < names.Length)
{
GeneralName generalName = names[num3];
if (generalName.tag == 6)
{
PkixCertPathValidatorUtilities.AddAdditionalStoreFromLocation(DerIA5String.GetInstance(generalName.obj).GetString(), pkixParams);
}
num3++;
}
}
num++;
}
}
}
// Token: 0x06009B4C RID: 39756 RVA: 0x00203430 File Offset: 0x00201630
[Token(Token = "0x6009B4C")]
[Address(RVA = "0x1CCEE00", Offset = "0x1CCDC00", VA = "0x181CCEE00")]
internal static bool ProcessCertD1i(int index, IList[] policyNodes, DerObjectIdentifier pOid, ISet pq)
{
int num;
int num2;
do
{
num = index - 1;
IList list = policyNodes[num];
num2 = 0;
if (0 >= num)
{
goto IL_40;
}
}
while (num == 0);
num2++;
HashSet hashSet = new HashSet();
IList list2 = Platform.CreateArrayList();
string identifier = pOid.identifier;
IList list3 = policyNodes[index];
return true;
IL_40:
throw new NullReferenceException();
}
// Token: 0x06009B4D RID: 39757 RVA: 0x00203484 File Offset: 0x00201684
[Token(Token = "0x6009B4D")]
[Address(RVA = "0x1CCF090", Offset = "0x1CCDE90", VA = "0x181CCF090")]
internal static void ProcessCertD1ii(int index, IList[] policyNodes, DerObjectIdentifier _poid, ISet _pq)
{
int num;
int num2;
do
{
num = index - 1;
IList list = policyNodes[num];
num2 = 0;
if (0 >= num)
{
return;
}
if (num == 0)
{
}
}
while (num == 0);
string any_POLICY = PkixCertPathValidatorUtilities.ANY_POLICY;
bool flag;
if (!flag)
{
num2++;
}
HashSet hashSet = new HashSet();
IList list2 = Platform.CreateArrayList();
string identifier = _poid.identifier;
IList list3 = policyNodes[index];
}
// Token: 0x06009B4E RID: 39758 RVA: 0x002034E8 File Offset: 0x002016E8
[Token(Token = "0x6009B4E")]
[Address(RVA = "0x1CCBB50", Offset = "0x1CCA950", VA = "0x181CCBB50")]
internal static ICollection FindIssuerCerts(X509Certificate cert, PkixBuilderParameters pkixParams)
{
X509CertStoreSelector x509CertStoreSelector = new X509CertStoreSelector();
HashSet hashSet = new HashSet();
BigInteger serialNumber = cert.SerialNumber;
x509CertStoreSelector.subject = serialNumber;
IList additionalStores = pkixParams.GetAdditionalStores();
ICollection collection = PkixCertPathValidatorUtilities.FindCertificates(x509CertStoreSelector, additionalStores);
throw new NullReferenceException();
}
// Token: 0x06009B4F RID: 39759 RVA: 0x00203538 File Offset: 0x00201738
[Token(Token = "0x6009B4F")]
[Address(RVA = "0x1CCD460", Offset = "0x1CCC260", VA = "0x181CCD460")]
internal static Asn1Object GetExtensionValue(IX509Extension ext, DerObjectIdentifier oid)
{
int num = 0;
num += num;
num++;
Asn1Object asn1Object;
return asn1Object;
}
// Token: 0x06009B50 RID: 39760 RVA: 0x00203560 File Offset: 0x00201760
[Token(Token = "0x6009B50")]
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
public PkixCertPathValidatorUtilities()
{
}
// Token: 0x06009B51 RID: 39761 RVA: 0x00203574 File Offset: 0x00201774
// Note: this type is marked as 'beforefieldinit'.
[Token(Token = "0x6009B51")]
[Address(RVA = "0x1CCF6D0", Offset = "0x1CCE4D0", VA = "0x181CCF6D0")]
static PkixCertPathValidatorUtilities()
{
string[] array = new string[11];
if ("unspecified" != 0)
{
}
array[0] = "unspecified";
if ("keyCompromise" != 0)
{
}
array[1] = "keyCompromise";
if ("cACompromise" != 0)
{
}
array[2] = "cACompromise";
if ("affiliationChanged" != 0)
{
}
array[3] = "affiliationChanged";
if ("superseded" != 0)
{
}
array[4] = "superseded";
if ("cessationOfOperation" != 0)
{
}
array[5] = "cessationOfOperation";
if ("certificateHold" != 0)
{
}
array[6] = "certificateHold";
if ("unknown" != 0)
{
}
array[7] = "unknown";
if ("removeFromCRL" != 0)
{
}
array[8] = "removeFromCRL";
if ("privilegeWithdrawn" != 0)
{
}
array[9] = "privilegeWithdrawn";
if ("aACompromise" != 0)
{
}
array[10] = "aACompromise";
PkixCertPathValidatorUtilities.crlReasons = array;
}
// Token: 0x040068E4 RID: 26852
[Token(Token = "0x40068E4")]
private static readonly PkixCrlUtilities CrlUtilities = new PkixCrlUtilities();
// Token: 0x040068E5 RID: 26853
[Token(Token = "0x40068E5")]
internal static readonly string ANY_POLICY = "2.5.29.32.0";
// Token: 0x040068E6 RID: 26854
[Token(Token = "0x40068E6")]
internal static readonly string CRL_NUMBER = X509Extensions.CrlNumber.identifier;
// Token: 0x040068E7 RID: 26855
[Token(Token = "0x40068E7")]
internal static readonly int KEY_CERT_SIGN;
// Token: 0x040068E8 RID: 26856
[Token(Token = "0x40068E8")]
internal static readonly int CRL_SIGN;
// Token: 0x040068E9 RID: 26857
[Token(Token = "0x40068E9")]
internal static readonly string[] crlReasons;
}
}