1531 lines
66 KiB
C#
1531 lines
66 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Runtime.InteropServices;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
|
|
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: 0x020013A9 RID: 5033
|
|
[Token(Token = "0x20013A9")]
|
|
[StructLayout(3)]
|
|
public class Rfc3280CertPathUtilities
|
|
{
|
|
// Token: 0x06007FFD RID: 32765 RVA: 0x001AE934 File Offset: 0x001ACB34
|
|
[Token(Token = "0x6007FFD")]
|
|
[Address(RVA = "0xCF5220", Offset = "0xCF3C20", VA = "0x180CF5220")]
|
|
internal static void ProcessCrlB2(DistributionPoint dp, object cert, X509Crl crl)
|
|
{
|
|
for (;;)
|
|
{
|
|
DerObjectIdentifier issuingDistributionPoint = X509Extensions.IssuingDistributionPoint;
|
|
IssuingDistributionPoint instance = IssuingDistributionPoint.GetInstance(PkixCertPathValidatorUtilities.GetExtensionValue(crl, issuingDistributionPoint));
|
|
if (instance == 0)
|
|
{
|
|
return;
|
|
}
|
|
if (instance._distributionPoint != (ulong)0L)
|
|
{
|
|
DistributionPointName distributionPoint = IssuingDistributionPoint.GetInstance(instance)._distributionPoint;
|
|
IList list = Platform.CreateArrayList();
|
|
if (distributionPoint.type != 0)
|
|
{
|
|
goto IL_70;
|
|
}
|
|
GeneralName[] names = GeneralNames.GetInstance(distributionPoint.name).GetNames();
|
|
int num = 0;
|
|
int length = names.Length;
|
|
if (num < length)
|
|
{
|
|
num++;
|
|
goto IL_70;
|
|
}
|
|
IL_73:
|
|
int num2;
|
|
if (distributionPoint.type == 1)
|
|
{
|
|
int version = crl.Version;
|
|
byte[] array;
|
|
IEnumerator enumerator = Asn1Sequence.GetInstance(Asn1Object.FromByteArray(array)).GetEnumerator();
|
|
Asn1EncodableVector asn1EncodableVector;
|
|
if (enumerator != 0)
|
|
{
|
|
Asn1Encodable[] array2 = new Asn1Encodable[1];
|
|
if (num2 < enumerator)
|
|
{
|
|
num2 += num2;
|
|
num2++;
|
|
}
|
|
if (array2 != 0)
|
|
{
|
|
ulong num3;
|
|
num3 += (ulong)1L;
|
|
if (array2 == 0 || array2 == 0)
|
|
{
|
|
goto IL_2C0;
|
|
}
|
|
}
|
|
array2[0] = num2;
|
|
asn1EncodableVector.Add(array2);
|
|
}
|
|
Asn1Encodable[] array3 = new Asn1Encodable[1];
|
|
Asn1Encodable name = distributionPoint.name;
|
|
if (name != 0)
|
|
{
|
|
}
|
|
array3[0] = name;
|
|
asn1EncodableVector.Add(array3);
|
|
GeneralName generalName = new GeneralName(X509Name.GetInstance(new DerSequence(asn1EncodableVector)));
|
|
}
|
|
DistributionPointName distributionPoint2 = dp.distributionPoint;
|
|
if (distributionPoint2 == 0)
|
|
{
|
|
GeneralNames cRLIssuer = dp.cRLIssuer;
|
|
if (cRLIssuer == 0)
|
|
{
|
|
continue;
|
|
}
|
|
int length2 = cRLIssuer.GetNames().Length;
|
|
if (num2 >= length2)
|
|
{
|
|
continue;
|
|
}
|
|
if (num2 != 0)
|
|
{
|
|
goto IL_267;
|
|
}
|
|
num2++;
|
|
}
|
|
int type;
|
|
if (distributionPoint2.type == 0)
|
|
{
|
|
GeneralName[] names2 = GeneralNames.GetInstance(distributionPoint2.name).GetNames();
|
|
type = distributionPoint2.type;
|
|
}
|
|
GeneralName[] array5;
|
|
int num4;
|
|
if (type == 1)
|
|
{
|
|
if (dp.cRLIssuer == 0)
|
|
{
|
|
GeneralName[] array4 = new GeneralName[type];
|
|
X509Name x509Name;
|
|
GeneralName generalName2 = new GeneralName(x509Name);
|
|
if (generalName2 != 0)
|
|
{
|
|
}
|
|
array4[0] = generalName2;
|
|
}
|
|
int length3 = array5.Length;
|
|
if (num2 < length3)
|
|
{
|
|
break;
|
|
}
|
|
num4 = 0;
|
|
}
|
|
if (array5 == 0)
|
|
{
|
|
continue;
|
|
}
|
|
int length4 = array5.Length;
|
|
if (num4 >= length4)
|
|
{
|
|
continue;
|
|
}
|
|
if (length4 == 0)
|
|
{
|
|
num4++;
|
|
}
|
|
goto IL_267;
|
|
IL_70:
|
|
num2 = 0;
|
|
goto IL_73;
|
|
}
|
|
IL_267:
|
|
if (cert != 0)
|
|
{
|
|
}
|
|
Asn1Object asn1Object;
|
|
BasicConstraints instance2 = BasicConstraints.GetInstance(asn1Object);
|
|
if ((!instance._onlyContainsUserCerts || instance2 == 0 || !instance2.IsCA()) && (!instance._onlyContainsCACerts || (instance2 != 0 && instance2.IsCA())) && !instance._onlyContainsAttributeCerts)
|
|
{
|
|
return;
|
|
}
|
|
}
|
|
int num5;
|
|
IEnumerator enumerator2 = Asn1Sequence.GetInstance(num5).GetEnumerator();
|
|
Asn1EncodableVector asn1EncodableVector2;
|
|
if (asn1EncodableVector2 != 0)
|
|
{
|
|
Asn1Encodable[] array6 = new Asn1Encodable[1];
|
|
throw new ArrayTypeMismatchException();
|
|
}
|
|
ArrayTypeMismatchException ex;
|
|
string className = ex._className;
|
|
throw new ArrayTypeMismatchException();
|
|
IL_2C0:
|
|
throw new IndexOutOfRangeException();
|
|
}
|
|
|
|
// Token: 0x06007FFE RID: 32766 RVA: 0x001AEC18 File Offset: 0x001ACE18
|
|
[Token(Token = "0x6007FFE")]
|
|
[Address(RVA = "0xCF2E40", Offset = "0xCF1840", VA = "0x180CF2E40")]
|
|
internal static void ProcessCertBC(PkixCertPath certPath, int index, PkixNameConstraintValidator nameConstraintValidator)
|
|
{
|
|
GeneralNames instance2;
|
|
int num3;
|
|
for (;;)
|
|
{
|
|
int num = 0;
|
|
byte[] array;
|
|
if (array == 0)
|
|
{
|
|
}
|
|
int num2 = 0;
|
|
if (array != 0)
|
|
{
|
|
num2 -= index;
|
|
bool flag;
|
|
if (flag)
|
|
{
|
|
}
|
|
byte[] array2;
|
|
Asn1Sequence instance = Asn1Sequence.GetInstance(new Asn1InputStream(array2).ReadObject());
|
|
nameConstraintValidator.CheckPermittedDN(instance);
|
|
nameConstraintValidator.CheckExcludedDN(instance);
|
|
Asn1Object asn1Object;
|
|
instance2 = GeneralNames.GetInstance(asn1Object);
|
|
X509Name instance3 = X509Name.GetInstance(instance);
|
|
DerObjectIdentifier emailAddress = X509Name.EmailAddress;
|
|
IList valueList = instance3.GetValueList(emailAddress);
|
|
GeneralName generalName;
|
|
if (valueList != 0)
|
|
{
|
|
if (valueList != 0 && valueList == 0)
|
|
{
|
|
goto IL_D7;
|
|
}
|
|
generalName = new GeneralName(1, num);
|
|
nameConstraintValidator.checkPermitted(generalName);
|
|
nameConstraintValidator.checkExcluded(generalName);
|
|
}
|
|
num3 = 0;
|
|
if (generalName != 0)
|
|
{
|
|
}
|
|
if (num != -1)
|
|
{
|
|
}
|
|
if (num == 0)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
if (instance2 != 0)
|
|
{
|
|
GeneralName[] names = instance2.GetNames();
|
|
if (num3 < names.Length)
|
|
{
|
|
GeneralName generalName2 = names[num3];
|
|
nameConstraintValidator.checkPermitted(generalName2);
|
|
nameConstraintValidator.checkExcluded(generalName2);
|
|
num3++;
|
|
}
|
|
}
|
|
return;
|
|
IL_D7:
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06007FFF RID: 32767 RVA: 0x001AED04 File Offset: 0x001ACF04
|
|
[Token(Token = "0x6007FFF")]
|
|
[Address(RVA = "0xCF0CB0", Offset = "0xCEF6B0", VA = "0x180CF0CB0")]
|
|
internal static void PrepareNextCertA(PkixCertPath certPath, int index)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06007FFF)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix.Rfc3280CertPathUtilities::PrepareNextCertA(BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix.PkixCertPath,System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_8F:
|
|
stloc:PkixCertPathValidatorException(var_20_9D, newobj:PkixCertPathValidatorException(PkixCertPathValidatorException::.ctor, ldstr:string("IssuerDomainPolicy is anyPolicy"), ldloc:int32[exp:Exception](var_22), ldloc:PkixCertPath(certPath), ldloc:int32(index)))
|
|
stloc:int32(var_22, ldc.i4:int32(0))
|
|
}
|
|
|
|
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.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06008000 RID: 32768 RVA: 0x001AEDB4 File Offset: 0x001ACFB4
|
|
[Token(Token = "0x6008000")]
|
|
[Address(RVA = "0xCF34B0", Offset = "0xCF1EB0", VA = "0x180CF34B0")]
|
|
internal static PkixPolicyNode ProcessCertD(PkixCertPath certPath, int index, ISet acceptablePolicies, PkixPolicyNode validPolicyTree, IList[] policyNodes, int inhibitAnyPolicy)
|
|
{
|
|
for (;;)
|
|
{
|
|
byte[] array;
|
|
if (array == 0)
|
|
{
|
|
}
|
|
if (array != 0)
|
|
{
|
|
array -= index;
|
|
Asn1Object asn1Object;
|
|
Asn1Sequence instance = Asn1Sequence.GetInstance(asn1Object);
|
|
if (instance == 0)
|
|
{
|
|
goto IL_174;
|
|
}
|
|
HashSet hashSet = new HashSet();
|
|
bool flag;
|
|
if (instance.GetEnumerator() != 0)
|
|
{
|
|
PolicyInformation policyInformation;
|
|
DerObjectIdentifier policyIdentifier = policyInformation.policyIdentifier;
|
|
string any_POLICY = Rfc3280CertPathUtilities.ANY_POLICY;
|
|
string identifier = policyIdentifier.identifier;
|
|
if (any_POLICY.Equals(identifier))
|
|
{
|
|
continue;
|
|
}
|
|
ISet qualifierSet = PkixCertPathValidatorUtilities.GetQualifierSet(policyInformation.policyQualifiers);
|
|
while (flag)
|
|
{
|
|
}
|
|
}
|
|
int num = 0;
|
|
if (flag)
|
|
{
|
|
}
|
|
if (num == -1)
|
|
{
|
|
goto IL_8C;
|
|
}
|
|
HashSet hashSet2;
|
|
if (num == 0)
|
|
{
|
|
hashSet2 = new HashSet();
|
|
if (hashSet2 != 0)
|
|
{
|
|
while (hashSet2 == 0)
|
|
{
|
|
}
|
|
goto IL_8C;
|
|
}
|
|
goto IL_94;
|
|
}
|
|
IL_A8:
|
|
bool flag2;
|
|
if (!flag2)
|
|
{
|
|
break;
|
|
}
|
|
HashSet hashSet3;
|
|
if (instance.GetEnumerator() != 0)
|
|
{
|
|
string any_POLICY2 = Rfc3280CertPathUtilities.ANY_POLICY;
|
|
PolicyInformation policyInformation2;
|
|
string identifier2 = policyInformation2.policyIdentifier.identifier;
|
|
if (!any_POLICY2.Equals(identifier2))
|
|
{
|
|
continue;
|
|
}
|
|
ISet qualifierSet2 = PkixCertPathValidatorUtilities.GetQualifierSet(policyInformation2.policyQualifiers);
|
|
if (0 < qualifierSet2 && qualifierSet2 != 0)
|
|
{
|
|
if (qualifierSet2 != 0 && qualifierSet2 != 0 && qualifierSet2 == 0)
|
|
{
|
|
goto IL_1B0;
|
|
}
|
|
while (qualifierSet2 == 0)
|
|
{
|
|
}
|
|
bool flag3;
|
|
while (!flag3)
|
|
{
|
|
}
|
|
if (acceptablePolicies != 0)
|
|
{
|
|
}
|
|
if (acceptablePolicies != (ulong)(-1L))
|
|
{
|
|
ulong num2;
|
|
while (num2 != (ulong)0L)
|
|
{
|
|
}
|
|
hashSet3 = new HashSet();
|
|
IList list = Platform.CreateArrayList();
|
|
}
|
|
}
|
|
}
|
|
PkixPolicyNode pkixPolicyNode;
|
|
if (pkixPolicyNode != 0)
|
|
{
|
|
}
|
|
if (pkixPolicyNode != (ulong)(-1L))
|
|
{
|
|
}
|
|
if (hashSet3 == 0)
|
|
{
|
|
break;
|
|
}
|
|
continue;
|
|
IL_94:
|
|
if (hashSet2 != 0)
|
|
{
|
|
}
|
|
if (hashSet2 != (ulong)(-1L))
|
|
{
|
|
}
|
|
if (hashSet == 0)
|
|
{
|
|
goto IL_A8;
|
|
}
|
|
goto IL_1B0;
|
|
IL_8C:
|
|
if (hashSet2 == 0)
|
|
{
|
|
goto IL_94;
|
|
}
|
|
goto IL_19E;
|
|
}
|
|
}
|
|
int num3 = 0;
|
|
PkixPolicyNode pkixPolicyNode2;
|
|
if (num3 < acceptablePolicies && (acceptablePolicies != 0 || pkixPolicyNode2 != 0))
|
|
{
|
|
num3++;
|
|
}
|
|
DerObjectIdentifier certificatePolicies = X509Extensions.CertificatePolicies;
|
|
if (num3 < acceptablePolicies)
|
|
{
|
|
num3++;
|
|
}
|
|
IL_174:
|
|
throw new NullReferenceException();
|
|
IL_19E:
|
|
throw new NullReferenceException();
|
|
IL_1B0:
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06008001 RID: 32769 RVA: 0x001AEFF0 File Offset: 0x001AD1F0
|
|
[Token(Token = "0x6008001")]
|
|
[Address(RVA = "0xCF4E70", Offset = "0xCF3870", VA = "0x180CF4E70")]
|
|
internal static void ProcessCrlB1(DistributionPoint dp, object cert, X509Crl crl)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06008001)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix.Rfc3280CertPathUtilities::ProcessCrlB1(BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.DistributionPoint,System.Object,BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Crl)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_99:
|
|
stloc:Exception(var_14_A3, newobj:Exception(Exception::.ctor, ldstr:string("Cannot find matching CRL issuer for certificate.")))
|
|
}
|
|
|
|
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 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06008002 RID: 32770 RVA: 0x001AF0A4 File Offset: 0x001AD2A4
|
|
[Token(Token = "0x6008002")]
|
|
[Address(RVA = "0xCF6430", Offset = "0xCF4E30", VA = "0x180CF6430")]
|
|
internal static ReasonsMask ProcessCrlD(X509Crl crl, DistributionPoint dp)
|
|
{
|
|
DerObjectIdentifier issuingDistributionPoint = X509Extensions.IssuingDistributionPoint;
|
|
IssuingDistributionPoint instance = IssuingDistributionPoint.GetInstance(PkixCertPathValidatorUtilities.GetExtensionValue(crl, issuingDistributionPoint));
|
|
if (instance != 0)
|
|
{
|
|
ReasonFlags onlySomeReasons = instance._onlySomeReasons;
|
|
if (onlySomeReasons != 0)
|
|
{
|
|
ReasonFlags reasons = dp.reasons;
|
|
if (reasons != 0)
|
|
{
|
|
int padBits = reasons.PadBits;
|
|
ReasonsMask reasonsMask = new ReasonsMask();
|
|
reasonsMask._reasons = padBits;
|
|
int padBits2 = instance._onlySomeReasons.PadBits;
|
|
return reasonsMask.Intersect(new ReasonsMask
|
|
{
|
|
_reasons = padBits2
|
|
});
|
|
}
|
|
if (onlySomeReasons != 0)
|
|
{
|
|
goto IL_7B;
|
|
}
|
|
}
|
|
}
|
|
if (dp.reasons == (ulong)0L)
|
|
{
|
|
goto IL_C4;
|
|
}
|
|
IL_7B:
|
|
ReasonFlags reasons2 = dp.reasons;
|
|
if (reasons2 != 0)
|
|
{
|
|
int num = reasons2.PadBits;
|
|
new ReasonsMask()._reasons = num;
|
|
}
|
|
ReasonsMask allReasons = ReasonsMask.AllReasons;
|
|
if (instance != 0)
|
|
{
|
|
int num = instance._onlySomeReasons.PadBits;
|
|
new ReasonsMask()._reasons = num;
|
|
}
|
|
IL_C4:
|
|
return ReasonsMask.AllReasons;
|
|
}
|
|
|
|
// Token: 0x06008003 RID: 32771 RVA: 0x001AF188 File Offset: 0x001AD388
|
|
[Token(Token = "0x6008003")]
|
|
[Address(RVA = "0xCF6750", Offset = "0xCF5150", VA = "0x180CF6750")]
|
|
internal static ISet ProcessCrlF(X509Crl crl, object cert, X509Certificate defaultCRLSignCert, AsymmetricKeyParameter defaultCRLSignKey, PkixParameters paramsPKIX, IList certPathCerts)
|
|
{
|
|
Exception ex;
|
|
do
|
|
{
|
|
X509CertStoreSelector x509CertStoreSelector = new X509CertStoreSelector();
|
|
int version = crl.Version;
|
|
x509CertStoreSelector.subject = version;
|
|
IList list = Platform.CreateArrayList();
|
|
ICollection collection = PkixCertPathValidatorUtilities.FindCertificates(x509CertStoreSelector, list);
|
|
CollectionUtilities.AddRange(list, collection);
|
|
ICollection collection2;
|
|
CollectionUtilities.AddRange(list, collection2);
|
|
IList list2 = Platform.CreateArrayList();
|
|
IList list3 = Platform.CreateArrayList();
|
|
if (list3 != 0)
|
|
{
|
|
if (list3 == 0)
|
|
{
|
|
continue;
|
|
}
|
|
PkixCertPathBuilder pkixCertPathBuilder = new PkixCertPathBuilder();
|
|
new X509CertStoreSelector().certificate = list3;
|
|
PkixBuilderParameters pkixBuilderParameters;
|
|
if (pkixBuilderParameters == 0)
|
|
{
|
|
bool isRevocationEnabled = pkixBuilderParameters.IsRevocationEnabled;
|
|
}
|
|
bool isRevocationEnabled2 = pkixBuilderParameters.IsRevocationEnabled;
|
|
string text = pkixCertPathBuilder.ToString();
|
|
}
|
|
HashSet hashSet = new HashSet();
|
|
int num = 0;
|
|
if (0 < hashSet)
|
|
{
|
|
if (hashSet == 0 || hashSet == 0)
|
|
{
|
|
continue;
|
|
}
|
|
int crl_SIGN = Rfc3280CertPathUtilities.CRL_SIGN;
|
|
ex = new Exception("Issuer certificate key usage extension does not permit CRL signing.");
|
|
num++;
|
|
num++;
|
|
}
|
|
}
|
|
while ((ex == 0 && ex == 0) || (ex == 0 && ex != 0));
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06008004 RID: 32772 RVA: 0x001AF2C0 File Offset: 0x001AD4C0
|
|
[Token(Token = "0x6008004")]
|
|
[Address(RVA = "0xCF6FC0", Offset = "0xCF59C0", VA = "0x180CF6FC0")]
|
|
internal static AsymmetricKeyParameter ProcessCrlG(X509Crl crl, ISet keys)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06008004)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.AsymmetricKeyParameter BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix.Rfc3280CertPathUtilities::ProcessCrlG(BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Crl,BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections.ISet)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_3C:
|
|
stloc:Exception(var_4_47, newobj:Exception(Exception::.ctor, ldstr:string("Cannot verify CRL."), ldloc:int32[exp:Exception](var_0_01)))
|
|
}
|
|
|
|
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 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06008005 RID: 32773 RVA: 0x001AF318 File Offset: 0x001AD518
|
|
[Token(Token = "0x6008005")]
|
|
[Address(RVA = "0xCF7210", Offset = "0xCF5C10", VA = "0x180CF7210")]
|
|
internal static X509Crl ProcessCrlH(ISet deltaCrls, AsymmetricKeyParameter key)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06008005)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Crl BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix.Rfc3280CertPathUtilities::ProcessCrlH(BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections.ISet,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.AsymmetricKeyParameter)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_3C:
|
|
stloc:Exception(var_5_47, newobj:Exception(Exception::.ctor, ldstr:string("Cannot verify delta CRL."), ldloc:int32[exp:Exception](var_0_01)))
|
|
}
|
|
|
|
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 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06008006 RID: 32774 RVA: 0x001AF370 File Offset: 0x001AD570
|
|
[Token(Token = "0x6008006")]
|
|
[Address(RVA = "0xCEEA50", Offset = "0xCED450", VA = "0x180CEEA50")]
|
|
private static void CheckCrl(DistributionPoint dp, PkixParameters paramsPKIX, X509Certificate cert, DateTime validDate, X509Certificate defaultCRLSignCert, AsymmetricKeyParameter defaultCRLSignKey, CertStatus certStatus, ReasonsMask reasonMask, IList certPathCerts)
|
|
{
|
|
DateTime utcNow = DateTime.UtcNow;
|
|
bool flag;
|
|
bool flag2;
|
|
if (PkixCertPathValidatorUtilities.GetCompleteCrls(dp, cert, utcNow, paramsPKIX) != 0 && !flag && flag2)
|
|
{
|
|
int num = 0;
|
|
ISet set;
|
|
AsymmetricKeyParameter asymmetricKeyParameter;
|
|
X509Crl x509Crl = Rfc3280CertPathUtilities.ProcessCrlH(set, asymmetricKeyParameter);
|
|
DateTime notBefore = cert.NotBefore;
|
|
if (asymmetricKeyParameter.privateKey)
|
|
{
|
|
asymmetricKeyParameter.privateKey = true;
|
|
}
|
|
DerObjectIdentifier issuingDistributionPoint = X509Extensions.IssuingDistributionPoint;
|
|
DerObjectIdentifier deltaCrlIndicator = X509Extensions.DeltaCrlIndicator;
|
|
if (typeof(X509Extensions).TypeHandle == 0)
|
|
{
|
|
Exception ex = new Exception("CRL contains unsupported critical extensions.");
|
|
throw new NullReferenceException();
|
|
}
|
|
if (num != 0)
|
|
{
|
|
DerObjectIdentifier issuingDistributionPoint2 = X509Extensions.IssuingDistributionPoint;
|
|
DerObjectIdentifier deltaCrlIndicator2 = X509Extensions.DeltaCrlIndicator;
|
|
if (typeof(X509Extensions).TypeHandle == 0)
|
|
{
|
|
Exception ex2 = new Exception("Delta CRL contains unsupported critical extension.");
|
|
throw new NullReferenceException();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x06008007 RID: 32775 RVA: 0x001AF464 File Offset: 0x001AD664
|
|
[Token(Token = "0x6008007")]
|
|
[Address(RVA = "0xCEF1E0", Offset = "0xCEDBE0", VA = "0x180CEF1E0")]
|
|
protected static void CheckCrls(PkixParameters paramsPKIX, X509Certificate cert, DateTime validDate, X509Certificate sign, AsymmetricKeyParameter workingPublicKey, IList certPathCerts)
|
|
{
|
|
CertStatus certStatus;
|
|
do
|
|
{
|
|
DerObjectIdentifier crlDistributionPoints = X509Extensions.CrlDistributionPoints;
|
|
CrlDistPoint instance = CrlDistPoint.GetInstance(PkixCertPathValidatorUtilities.GetExtensionValue(cert, crlDistributionPoints));
|
|
int num = 0;
|
|
PkixCertPathValidatorUtilities.AddAdditionalStoresFromCrlDistributionPoint(instance, paramsPKIX);
|
|
certStatus = new CertStatus();
|
|
int num2 = 0;
|
|
ReasonsMask reasonsMask;
|
|
reasonsMask.FieldGetter(num2, num, sign);
|
|
reasonsMask._reasons = (int)((ulong)0L);
|
|
if (instance != 0)
|
|
{
|
|
DistributionPoint[] distributionPoints = instance.GetDistributionPoints();
|
|
if (distributionPoints != 0)
|
|
{
|
|
int num3 = 0;
|
|
if (num3 < distributionPoints.Length && certStatus.status == 11 && !reasonsMask.IsAllReasons)
|
|
{
|
|
DistributionPoint distributionPoint = distributionPoints[num3];
|
|
num3++;
|
|
}
|
|
}
|
|
}
|
|
if (certStatus.status == 11 && !reasonsMask.IsAllReasons)
|
|
{
|
|
BigInteger serialNumber = cert.SerialNumber;
|
|
byte[] array;
|
|
Asn1Object asn1Object = new Asn1InputStream(array).ReadObject();
|
|
GeneralNames generalNames = new GeneralNames(new GeneralName(4, asn1Object));
|
|
int num4;
|
|
DistributionPointName distributionPointName = new DistributionPointName(num4, generalNames);
|
|
num4 = 0;
|
|
int num5;
|
|
int num6;
|
|
DistributionPoint distributionPoint2 = new DistributionPoint(distributionPointName, num5, num6);
|
|
num6 = 0;
|
|
num5 = 0;
|
|
}
|
|
if (certStatus.status != 11)
|
|
{
|
|
break;
|
|
}
|
|
if (!reasonsMask.IsAllReasons && certStatus.status == 11)
|
|
{
|
|
certStatus.status = (int)((ulong)12L);
|
|
}
|
|
}
|
|
while (certStatus.status == 12);
|
|
DateTimeObject revocationDate = certStatus.revocationDate;
|
|
}
|
|
|
|
// Token: 0x06008008 RID: 32776 RVA: 0x0000220F File Offset: 0x0000040F
|
|
[Token(Token = "0x6008008")]
|
|
[Address(RVA = "0xCEF8F0", Offset = "0xCEE2F0", VA = "0x180CEF8F0")]
|
|
internal static PkixPolicyNode PrepareCertB(PkixCertPath certPath, int index, IList[] policyNodes, PkixPolicyNode validPolicyTree, int policyMapping)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06008009 RID: 32777 RVA: 0x001AF594 File Offset: 0x001AD794
|
|
[Token(Token = "0x6008009")]
|
|
[Address(RVA = "0xCF4B20", Offset = "0xCF3520", VA = "0x180CF4B20")]
|
|
internal static ISet[] ProcessCrlA1ii(DateTime currentDate, PkixParameters paramsPKIX, X509Certificate cert, X509Crl crl)
|
|
{
|
|
HashSet hashSet = new HashSet();
|
|
X509CrlStoreSelector x509CrlStoreSelector = new X509CrlStoreSelector();
|
|
x509CrlStoreSelector.certificateChecking = cert;
|
|
IList list = Platform.CreateArrayList();
|
|
int version = crl.Version;
|
|
x509CrlStoreSelector.Issuers = list;
|
|
x509CrlStoreSelector.completeCrlEnabled = true;
|
|
string text = Rfc3280CertPathUtilities.CrlUtilities.ToString();
|
|
if (text != 0)
|
|
{
|
|
ISet deltaCrls = PkixCertPathValidatorUtilities.GetDeltaCrls(currentDate, paramsPKIX, crl);
|
|
}
|
|
ISet[] array = new ISet[2];
|
|
if (text != 0)
|
|
{
|
|
}
|
|
array[0] = text;
|
|
if (hashSet != 0)
|
|
{
|
|
}
|
|
array[1] = hashSet;
|
|
return array;
|
|
}
|
|
|
|
// Token: 0x0600800A RID: 32778 RVA: 0x001AF620 File Offset: 0x001AD820
|
|
[Token(Token = "0x600800A")]
|
|
[Address(RVA = "0xCF4810", Offset = "0xCF3210", VA = "0x180CF4810")]
|
|
internal static ISet ProcessCrlA1i(DateTime currentDate, PkixParameters paramsPKIX, X509Certificate cert, X509Crl crl)
|
|
{
|
|
if (new HashSet() != 0)
|
|
{
|
|
DerObjectIdentifier freshestCrl = X509Extensions.FreshestCrl;
|
|
CrlDistPoint instance = CrlDistPoint.GetInstance(PkixCertPathValidatorUtilities.GetExtensionValue(cert, freshestCrl));
|
|
if (instance == 0)
|
|
{
|
|
DerObjectIdentifier freshestCrl2 = X509Extensions.FreshestCrl;
|
|
if (CrlDistPoint.GetInstance(PkixCertPathValidatorUtilities.GetExtensionValue(crl, freshestCrl2)) == 0)
|
|
{
|
|
goto IL_44;
|
|
}
|
|
}
|
|
PkixCertPathValidatorUtilities.AddAdditionalStoresFromCrlDistributionPoint(instance, paramsPKIX);
|
|
ISet deltaCrls = PkixCertPathValidatorUtilities.GetDeltaCrls(currentDate, paramsPKIX, crl);
|
|
}
|
|
IL_44:
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600800B RID: 32779 RVA: 0x001AF67C File Offset: 0x001AD87C
|
|
[Token(Token = "0x600800B")]
|
|
[Address(RVA = "0xCF4770", Offset = "0xCF3170", VA = "0x180CF4770")]
|
|
internal static void ProcessCertF(PkixCertPath certPath, int index, PkixPolicyNode validPolicyTree, int explicitPolicy)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600800B)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix.Rfc3280CertPathUtilities::ProcessCertF(BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix.PkixCertPath,System.Int32,BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix.PkixPolicyNode,System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_05:
|
|
stloc:PkixCertPathValidatorException(var_0_12, newobj:PkixCertPathValidatorException(PkixCertPathValidatorException::.ctor, ldstr:string("No valid policy tree found when one expected."), ldloc:int32[exp:Exception](var_1), ldloc:PkixCertPath(certPath), ldloc:int32(index)))
|
|
stloc:int32(var_1, ldc.i4:int32(0))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x0600800C RID: 32780 RVA: 0x001AF6A0 File Offset: 0x001AD8A0
|
|
[Token(Token = "0x600800C")]
|
|
[Address(RVA = "0xCF2890", Offset = "0xCF1290", VA = "0x180CF2890")]
|
|
internal static void ProcessCertA(PkixCertPath certPath, PkixParameters paramsPKIX, int index, AsymmetricKeyParameter workingPublicKey, X509Name workingIssuerName, X509Certificate sign)
|
|
{
|
|
byte[] array;
|
|
do
|
|
{
|
|
if (array == 0)
|
|
{
|
|
}
|
|
}
|
|
while (array == 0);
|
|
DateTime validCertDateFromValidityModel = PkixCertPathValidatorUtilities.GetValidCertDateFromValidityModel(paramsPKIX, certPath, index);
|
|
if (paramsPKIX.ToString() != 0)
|
|
{
|
|
DateTime validCertDateFromValidityModel2 = PkixCertPathValidatorUtilities.GetValidCertDateFromValidityModel(paramsPKIX, certPath, index);
|
|
}
|
|
X509Name issuerPrincipal = PkixCertPathValidatorUtilities.GetIssuerPrincipal(array);
|
|
bool flag;
|
|
if (flag)
|
|
{
|
|
return;
|
|
}
|
|
object[] array2 = new object[5];
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600800D RID: 32781 RVA: 0x001AF760 File Offset: 0x001AD960
|
|
[Token(Token = "0x600800D")]
|
|
[Address(RVA = "0xCF17C0", Offset = "0xCF01C0", VA = "0x180CF17C0")]
|
|
internal static int PrepareNextCertI1(PkixCertPath certPath, int index, int explicitPolicy)
|
|
{
|
|
byte[] array;
|
|
do
|
|
{
|
|
if (array == 0)
|
|
{
|
|
}
|
|
}
|
|
while (array == 0);
|
|
Asn1Object asn1Object;
|
|
Asn1Sequence instance = Asn1Sequence.GetInstance(asn1Object);
|
|
if (instance != 0 && instance.GetEnumerator() != 0)
|
|
{
|
|
Asn1TaggedObject asn1TaggedObject;
|
|
if (asn1TaggedObject.tagNo != 0)
|
|
{
|
|
}
|
|
int num = 0;
|
|
return DerInteger.GetInstance(asn1TaggedObject, num != 0).Value.IntValue;
|
|
}
|
|
return explicitPolicy;
|
|
}
|
|
|
|
// Token: 0x0600800E RID: 32782 RVA: 0x001AF7D8 File Offset: 0x001AD9D8
|
|
[Token(Token = "0x600800E")]
|
|
[Address(RVA = "0xCF1A70", Offset = "0xCF0470", VA = "0x180CF1A70")]
|
|
internal static int PrepareNextCertI2(PkixCertPath certPath, int index, int policyMapping)
|
|
{
|
|
byte[] array;
|
|
do
|
|
{
|
|
if (array == 0)
|
|
{
|
|
}
|
|
}
|
|
while (array == 0);
|
|
Asn1Object asn1Object;
|
|
Asn1Sequence instance = Asn1Sequence.GetInstance(asn1Object);
|
|
if (instance != 0 && instance.GetEnumerator() != 0)
|
|
{
|
|
Asn1TaggedObject asn1TaggedObject;
|
|
if (asn1TaggedObject.tagNo != 1)
|
|
{
|
|
}
|
|
int num = 0;
|
|
return DerInteger.GetInstance(asn1TaggedObject, num != 0).Value.IntValue;
|
|
}
|
|
return policyMapping;
|
|
}
|
|
|
|
// Token: 0x0600800F RID: 32783 RVA: 0x001AF850 File Offset: 0x001ADA50
|
|
[Token(Token = "0x600800F")]
|
|
[Address(RVA = "0xCF10D0", Offset = "0xCEFAD0", VA = "0x180CF10D0")]
|
|
internal static void PrepareNextCertG(PkixCertPath certPath, int index, PkixNameConstraintValidator nameConstraintValidator)
|
|
{
|
|
byte[] array;
|
|
int num;
|
|
do
|
|
{
|
|
if (array == 0)
|
|
{
|
|
}
|
|
num = 0;
|
|
}
|
|
while (array == 0);
|
|
Asn1Object asn1Object;
|
|
Asn1Sequence instance = Asn1Sequence.GetInstance(asn1Object);
|
|
NameConstraints nameConstraints;
|
|
if (instance != 0)
|
|
{
|
|
nameConstraints = new NameConstraints(instance);
|
|
}
|
|
if (nameConstraints != 0)
|
|
{
|
|
Asn1Sequence permitted = nameConstraints.permitted;
|
|
if (permitted != 0)
|
|
{
|
|
nameConstraintValidator.IntersectPermittedSubtree(permitted);
|
|
}
|
|
Asn1Sequence excluded = nameConstraints.excluded;
|
|
if (excluded != 0)
|
|
{
|
|
IEnumerator enumerator = excluded.GetEnumerator();
|
|
if (enumerator != 0)
|
|
{
|
|
if (num < enumerator)
|
|
{
|
|
num += num;
|
|
num++;
|
|
}
|
|
GeneralSubtree generalSubtree;
|
|
nameConstraintValidator.AddExcludedSubtree(generalSubtree);
|
|
generalSubtree += generalSubtree;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x06008010 RID: 32784 RVA: 0x001AF8F0 File Offset: 0x001ADAF0
|
|
[Token(Token = "0x6008010")]
|
|
[Address(RVA = "0xCF1D20", Offset = "0xCF0720", VA = "0x180CF1D20")]
|
|
internal static int PrepareNextCertJ(PkixCertPath certPath, int index, int inhibitAnyPolicy)
|
|
{
|
|
byte[] array;
|
|
do
|
|
{
|
|
if (array == 0)
|
|
{
|
|
}
|
|
}
|
|
while (array == 0);
|
|
Asn1Object asn1Object;
|
|
DerInteger instance = DerInteger.GetInstance(asn1Object);
|
|
if (instance != 0)
|
|
{
|
|
int intValue = instance.Value.IntValue;
|
|
if (intValue < inhibitAnyPolicy)
|
|
{
|
|
return intValue;
|
|
}
|
|
}
|
|
return inhibitAnyPolicy;
|
|
}
|
|
|
|
// Token: 0x06008011 RID: 32785 RVA: 0x001AF938 File Offset: 0x001ADB38
|
|
[Token(Token = "0x6008011")]
|
|
[Address(RVA = "0xCF1F00", Offset = "0xCF0900", VA = "0x180CF1F00")]
|
|
internal static void PrepareNextCertK(PkixCertPath certPath, int index)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06008011)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix.Rfc3280CertPathUtilities::PrepareNextCertK(BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix.PkixCertPath,System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_30:
|
|
stloc:PkixCertPathValidatorException(var_6_3A, newobj:PkixCertPathValidatorException(PkixCertPathValidatorException::.ctor, ldstr:string("Not a CA certificate")))
|
|
}
|
|
|
|
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 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06008012 RID: 32786 RVA: 0x001AF980 File Offset: 0x001ADB80
|
|
[Token(Token = "0x6008012")]
|
|
[Address(RVA = "0xCF2110", Offset = "0xCF0B10", VA = "0x180CF2110")]
|
|
internal static int PrepareNextCertL(PkixCertPath certPath, int index, int maxPathLength)
|
|
{
|
|
for (;;)
|
|
{
|
|
byte[] array;
|
|
if (array == 0)
|
|
{
|
|
}
|
|
if (array != 0)
|
|
{
|
|
bool flag;
|
|
if (flag)
|
|
{
|
|
break;
|
|
}
|
|
if (maxPathLength > 0)
|
|
{
|
|
goto Block_2;
|
|
}
|
|
}
|
|
}
|
|
return maxPathLength;
|
|
Block_2:
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06008013 RID: 32787 RVA: 0x001AF9A8 File Offset: 0x001ADBA8
|
|
[Token(Token = "0x6008013")]
|
|
[Address(RVA = "0xCF2270", Offset = "0xCF0C70", VA = "0x180CF2270")]
|
|
internal static int PrepareNextCertM(PkixCertPath certPath, int index, int maxPathLength)
|
|
{
|
|
byte[] array;
|
|
do
|
|
{
|
|
if (array == 0)
|
|
{
|
|
}
|
|
}
|
|
while (array == 0);
|
|
Asn1Object asn1Object;
|
|
BasicConstraints instance = BasicConstraints.GetInstance(asn1Object);
|
|
if (instance != 0)
|
|
{
|
|
BigInteger pathLenConstraint = instance.PathLenConstraint;
|
|
if (pathLenConstraint != 0)
|
|
{
|
|
int intValue = pathLenConstraint.IntValue;
|
|
}
|
|
}
|
|
return maxPathLength;
|
|
}
|
|
|
|
// Token: 0x06008014 RID: 32788 RVA: 0x001AF9F0 File Offset: 0x001ADBF0
|
|
[Token(Token = "0x6008014")]
|
|
[Address(RVA = "0xCF2440", Offset = "0xCF0E40", VA = "0x180CF2440")]
|
|
internal static void PrepareNextCertN(PkixCertPath certPath, int index)
|
|
{
|
|
for (;;)
|
|
{
|
|
if ("{il2cpp array field local2->}" == typeof(X509Certificate).TypeHandle)
|
|
{
|
|
}
|
|
byte[] array;
|
|
if (array != 0)
|
|
{
|
|
if ("{il2cpp array field local2->}" == typeof(X509Certificate).TypeHandle)
|
|
{
|
|
}
|
|
if (array != 0)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
int key_CERT_SIGN = Rfc3280CertPathUtilities.KEY_CERT_SIGN;
|
|
}
|
|
|
|
// Token: 0x06008015 RID: 32789 RVA: 0x001AFA30 File Offset: 0x001ADC30
|
|
[Token(Token = "0x6008015")]
|
|
[Address(RVA = "0xCF2600", Offset = "0xCF1000", VA = "0x180CF2600")]
|
|
internal static void PrepareNextCertO(PkixCertPath certPath, int index, ISet criticalExtensions, IList pathCheckers)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06008015)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix.Rfc3280CertPathUtilities::PrepareNextCertO(BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix.PkixCertPath,System.Int32,BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections.ISet,System.Collections.IList)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_2C:
|
|
stloc:PkixCertPathValidatorException(var_5_3A, newobj:PkixCertPathValidatorException(PkixCertPathValidatorException::.ctor, ldstr:string("Certificate has unsupported critical extension."), ldloc:int32[exp:Exception](var_7), ldloc:PkixCertPath(certPath), ldloc:int32(index)))
|
|
stloc:int32(var_7, ldc.i4:int32(0))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06008016 RID: 32790 RVA: 0x001AFA7C File Offset: 0x001ADC7C
|
|
[Token(Token = "0x6008016")]
|
|
[Address(RVA = "0xCF1460", Offset = "0xCEFE60", VA = "0x180CF1460")]
|
|
internal static int PrepareNextCertH1(PkixCertPath certPath, int index, int explicitPolicy)
|
|
{
|
|
byte[] array;
|
|
do
|
|
{
|
|
if (array == 0)
|
|
{
|
|
}
|
|
}
|
|
while (array == 0);
|
|
bool flag;
|
|
if (!flag && explicitPolicy != 0)
|
|
{
|
|
return explicitPolicy - 1;
|
|
}
|
|
return explicitPolicy;
|
|
}
|
|
|
|
// Token: 0x06008017 RID: 32791 RVA: 0x001AFAAC File Offset: 0x001ADCAC
|
|
[Token(Token = "0x6008017")]
|
|
[Address(RVA = "0xCF1580", Offset = "0xCEFF80", VA = "0x180CF1580")]
|
|
internal static int PrepareNextCertH2(PkixCertPath certPath, int index, int policyMapping)
|
|
{
|
|
byte[] array;
|
|
do
|
|
{
|
|
if (array == 0)
|
|
{
|
|
}
|
|
}
|
|
while (array == 0);
|
|
bool flag;
|
|
if (!flag && policyMapping != 0)
|
|
{
|
|
return policyMapping - 1;
|
|
}
|
|
return policyMapping;
|
|
}
|
|
|
|
// Token: 0x06008018 RID: 32792 RVA: 0x001AFADC File Offset: 0x001ADCDC
|
|
[Token(Token = "0x6008018")]
|
|
[Address(RVA = "0xCF16A0", Offset = "0xCF00A0", VA = "0x180CF16A0")]
|
|
internal static int PrepareNextCertH3(PkixCertPath certPath, int index, int inhibitAnyPolicy)
|
|
{
|
|
byte[] array;
|
|
do
|
|
{
|
|
if (array == 0)
|
|
{
|
|
}
|
|
}
|
|
while (array == 0);
|
|
bool flag;
|
|
if (!flag && inhibitAnyPolicy != 0)
|
|
{
|
|
return inhibitAnyPolicy - 1;
|
|
}
|
|
return inhibitAnyPolicy;
|
|
}
|
|
|
|
// Token: 0x06008019 RID: 32793 RVA: 0x001AFB0C File Offset: 0x001ADD0C
|
|
[Token(Token = "0x6008019")]
|
|
[Address(RVA = "0xCF75D0", Offset = "0xCF5FD0", VA = "0x180CF75D0")]
|
|
internal static int WrapupCertA(int explicitPolicy, X509Certificate cert)
|
|
{
|
|
if (PkixCertPathValidatorUtilities.IsSelfIssued(cert) || explicitPolicy == 0)
|
|
{
|
|
}
|
|
return explicitPolicy;
|
|
}
|
|
|
|
// Token: 0x0600801A RID: 32794 RVA: 0x001AFB28 File Offset: 0x001ADD28
|
|
[Token(Token = "0x600801A")]
|
|
[Address(RVA = "0xCF7640", Offset = "0xCF6040", VA = "0x180CF7640")]
|
|
internal static int WrapupCertB(PkixCertPath certPath, int index, int explicitPolicy)
|
|
{
|
|
for (;;)
|
|
{
|
|
byte[] array;
|
|
if (array == 0)
|
|
{
|
|
}
|
|
if (array != 0)
|
|
{
|
|
Asn1Object asn1Object;
|
|
Asn1Sequence instance = Asn1Sequence.GetInstance(asn1Object);
|
|
if (instance == 0)
|
|
{
|
|
return explicitPolicy;
|
|
}
|
|
IEnumerator enumerator = instance.GetEnumerator();
|
|
if (enumerator == 0)
|
|
{
|
|
return explicitPolicy;
|
|
}
|
|
if (enumerator != 0)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
DerInteger derInteger;
|
|
int intValue = derInteger.Value.IntValue;
|
|
while (intValue != 0)
|
|
{
|
|
}
|
|
return intValue;
|
|
}
|
|
|
|
// Token: 0x0600801B RID: 32795 RVA: 0x001AFB94 File Offset: 0x001ADD94
|
|
[Token(Token = "0x600801B")]
|
|
[Address(RVA = "0xCF7940", Offset = "0xCF6340", VA = "0x180CF7940")]
|
|
internal static void WrapupCertF(PkixCertPath certPath, int index, IList pathCheckers, ISet criticalExtensions)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600801B)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix.Rfc3280CertPathUtilities::WrapupCertF(BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix.PkixCertPath,System.Int32,System.Collections.IList,BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections.ISet)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_20:
|
|
stloc:PkixCertPathValidatorException(var_5_2E, newobj:PkixCertPathValidatorException(PkixCertPathValidatorException::.ctor, ldstr:string("Certificate has unsupported critical extension"), ldloc:int32[exp:Exception](var_7), ldloc:PkixCertPath(certPath), ldloc:int32(index)))
|
|
stloc:int32(var_7, ldc.i4:int32(0))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x0600801C RID: 32796 RVA: 0x001AFBD4 File Offset: 0x001ADDD4
|
|
[Token(Token = "0x600801C")]
|
|
[Address(RVA = "0xCF7BA0", Offset = "0xCF65A0", VA = "0x180CF7BA0")]
|
|
internal static PkixPolicyNode WrapupCertG(PkixCertPath certPath, PkixParameters paramsPKIX, ISet userInitialPolicySet, int index, IList[] policyNodes, PkixPolicyNode validPolicyTree, ISet acceptablePolicies)
|
|
{
|
|
string text2;
|
|
do
|
|
{
|
|
if (0 != 0)
|
|
{
|
|
uint num3;
|
|
if (!PkixCertPathValidatorUtilities.IsAnyPolicy(userInitialPolicySet))
|
|
{
|
|
HashSet hashSet = new HashSet();
|
|
int num = 0;
|
|
int num2 = 0;
|
|
if (num2 < hashSet)
|
|
{
|
|
string any_POLICY = Rfc3280CertPathUtilities.ANY_POLICY;
|
|
bool isEmpty = hashSet.IsEmpty;
|
|
bool flag;
|
|
if (!flag)
|
|
{
|
|
goto IL_52;
|
|
}
|
|
string any_POLICY2 = Rfc3280CertPathUtilities.ANY_POLICY;
|
|
bool flag2;
|
|
while (flag2)
|
|
{
|
|
}
|
|
num3 += (uint)1;
|
|
if (num3 != (uint)0)
|
|
{
|
|
}
|
|
if (num3 != (uint)(-1))
|
|
{
|
|
goto IL_52;
|
|
}
|
|
IL_58:
|
|
if (hashSet == 0)
|
|
{
|
|
goto IL_5C;
|
|
}
|
|
continue;
|
|
IL_52:
|
|
num2++;
|
|
goto IL_58;
|
|
}
|
|
IL_5C:
|
|
num++;
|
|
if (hashSet != 0 && hashSet.IsEmpty)
|
|
{
|
|
continue;
|
|
}
|
|
PkixPolicyNode pkixPolicyNode;
|
|
if (pkixPolicyNode == 0)
|
|
{
|
|
break;
|
|
}
|
|
int i = 0;
|
|
while (i >= (int)num3)
|
|
{
|
|
}
|
|
i++;
|
|
}
|
|
string text;
|
|
if (text == 0)
|
|
{
|
|
break;
|
|
}
|
|
if (text != 0)
|
|
{
|
|
continue;
|
|
}
|
|
HashSet hashSet2 = new HashSet();
|
|
int num4 = 0;
|
|
if (num4 < hashSet2)
|
|
{
|
|
string any_POLICY3 = Rfc3280CertPathUtilities.ANY_POLICY;
|
|
bool isEmpty2 = hashSet2.IsEmpty;
|
|
bool flag3;
|
|
if (!flag3)
|
|
{
|
|
goto IL_CA;
|
|
}
|
|
num3 += (uint)1;
|
|
if (num3 != (uint)0)
|
|
{
|
|
}
|
|
if (num3 != (uint)(-1))
|
|
{
|
|
goto IL_CA;
|
|
}
|
|
IL_D0:
|
|
if (any_POLICY3 == 0)
|
|
{
|
|
goto IL_D8;
|
|
}
|
|
continue;
|
|
IL_CA:
|
|
num4++;
|
|
goto IL_D0;
|
|
}
|
|
IL_D8:
|
|
if (num3 != (uint)0)
|
|
{
|
|
}
|
|
num3 += (uint)1;
|
|
if (num3 != (uint)0)
|
|
{
|
|
}
|
|
if (num3 != (uint)(-1))
|
|
{
|
|
}
|
|
if (num4 != 0)
|
|
{
|
|
continue;
|
|
}
|
|
if (num4 == 0)
|
|
{
|
|
break;
|
|
}
|
|
int j = 0;
|
|
while (j >= (int)num3)
|
|
{
|
|
}
|
|
j++;
|
|
}
|
|
}
|
|
while (text2 != 0);
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600801D RID: 32797 RVA: 0x001AFCF8 File Offset: 0x001ADEF8
|
|
[Token(Token = "0x600801D")]
|
|
[Address(RVA = "0xCF5F90", Offset = "0xCF4990", VA = "0x180CF5F90")]
|
|
internal static void ProcessCrlC(X509Crl deltaCRL, X509Crl completeCRL, PkixParameters pkixParams)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600801D)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix.Rfc3280CertPathUtilities::ProcessCrlC(BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Crl,BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Crl,BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix.PkixParameters)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_84:
|
|
stloc:Exception(var_12_8E, newobj:Exception(Exception::.ctor, ldstr:string("CRL authority key identifier is null.")))
|
|
}
|
|
|
|
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.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.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.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x0600801E RID: 32798 RVA: 0x001AFD94 File Offset: 0x001ADF94
|
|
[Token(Token = "0x600801E")]
|
|
[Address(RVA = "0xCF7470", Offset = "0xCF5E70", VA = "0x180CF7470")]
|
|
internal static void ProcessCrlI(DateTime validDate, X509Crl deltacrl, object cert, CertStatus certStatus, PkixParameters pkixParams)
|
|
{
|
|
if (deltacrl != 0)
|
|
{
|
|
PkixCertPathValidatorUtilities.GetCertStatus(validDate, deltacrl, cert, certStatus);
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600801F RID: 32799 RVA: 0x001AFDB4 File Offset: 0x001ADFB4
|
|
[Token(Token = "0x600801F")]
|
|
[Address(RVA = "0xCF7530", Offset = "0xCF5F30", VA = "0x180CF7530")]
|
|
internal static void ProcessCrlJ(DateTime validDate, X509Crl completecrl, object cert, CertStatus certStatus)
|
|
{
|
|
if (certStatus.status == 11)
|
|
{
|
|
PkixCertPathValidatorUtilities.GetCertStatus(validDate, completecrl, cert, certStatus);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06008020 RID: 32800 RVA: 0x001AFDDC File Offset: 0x001ADFDC
|
|
[Token(Token = "0x6008020")]
|
|
[Address(RVA = "0xCF45B0", Offset = "0xCF2FB0", VA = "0x180CF45B0")]
|
|
internal static PkixPolicyNode ProcessCertE(PkixCertPath certPath, int index, PkixPolicyNode validPolicyTree)
|
|
{
|
|
byte[] array;
|
|
do
|
|
{
|
|
if (array == 0)
|
|
{
|
|
}
|
|
}
|
|
while (array == 0);
|
|
Asn1Object asn1Object;
|
|
Asn1Sequence instance = Asn1Sequence.GetInstance(asn1Object);
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06008021 RID: 32801 RVA: 0x001AFE08 File Offset: 0x001AE008
|
|
[Token(Token = "0x6008021")]
|
|
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
|
public Rfc3280CertPathUtilities()
|
|
{
|
|
}
|
|
|
|
// Token: 0x06008022 RID: 32802 RVA: 0x001AFE1C File Offset: 0x001AE01C
|
|
// Note: this type is marked as 'beforefieldinit'.
|
|
[Token(Token = "0x6008022")]
|
|
[Address(RVA = "0xCF87C0", Offset = "0xCF71C0", VA = "0x180CF87C0")]
|
|
static Rfc3280CertPathUtilities()
|
|
{
|
|
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";
|
|
Rfc3280CertPathUtilities.CrlReasons = array;
|
|
}
|
|
|
|
// Token: 0x04005AD0 RID: 23248
|
|
[Token(Token = "0x4005AD0")]
|
|
private static readonly PkixCrlUtilities CrlUtilities = new PkixCrlUtilities();
|
|
|
|
// Token: 0x04005AD1 RID: 23249
|
|
[Token(Token = "0x4005AD1")]
|
|
internal static readonly string ANY_POLICY = "2.5.29.32.0";
|
|
|
|
// Token: 0x04005AD2 RID: 23250
|
|
[Token(Token = "0x4005AD2")]
|
|
internal static readonly int KEY_CERT_SIGN;
|
|
|
|
// Token: 0x04005AD3 RID: 23251
|
|
[Token(Token = "0x4005AD3")]
|
|
internal static readonly int CRL_SIGN;
|
|
|
|
// Token: 0x04005AD4 RID: 23252
|
|
[Token(Token = "0x4005AD4")]
|
|
internal static readonly string[] CrlReasons;
|
|
}
|
|
}
|