scripts
This commit is contained in:
+438
@@ -0,0 +1,438 @@
|
||||
using System;
|
||||
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.Security;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x0200131B RID: 4891
|
||||
[Token(Token = "0x200131B")]
|
||||
[StructLayout(3)]
|
||||
public class AttributeCertificateHolder : IX509Selector, ICloneable
|
||||
{
|
||||
// Token: 0x06007A80 RID: 31360 RVA: 0x00197398 File Offset: 0x00195598
|
||||
[Token(Token = "0x6007A80")]
|
||||
[Address(RVA = "0x2024AE0", Offset = "0x20234E0", VA = "0x182024AE0")]
|
||||
internal AttributeCertificateHolder(Asn1Sequence seq)
|
||||
{
|
||||
Holder instance = Holder.GetInstance(seq);
|
||||
this.holder = instance;
|
||||
}
|
||||
|
||||
// Token: 0x06007A81 RID: 31361 RVA: 0x001973BC File Offset: 0x001955BC
|
||||
[Token(Token = "0x6007A81")]
|
||||
[Address(RVA = "0x2024B10", Offset = "0x2023510", VA = "0x182024B10")]
|
||||
public AttributeCertificateHolder(X509Name issuerName, BigInteger serialNumber)
|
||||
{
|
||||
GeneralNames generalNames = this.GenerateGeneralNames(issuerName);
|
||||
DerInteger derInteger = new DerInteger(serialNumber);
|
||||
Holder holder = new Holder(new IssuerSerial(generalNames, derInteger));
|
||||
this.holder = holder;
|
||||
}
|
||||
|
||||
// Token: 0x06007A82 RID: 31362 RVA: 0x001973F4 File Offset: 0x001955F4
|
||||
[Token(Token = "0x6007A82")]
|
||||
[Address(RVA = "0x2024980", Offset = "0x2023380", VA = "0x182024980")]
|
||||
public AttributeCertificateHolder(X509Certificate cert)
|
||||
{
|
||||
X509Name issuerX509Principal = PrincipalUtilities.GetIssuerX509Principal(cert);
|
||||
GeneralNames generalNames = this.GenerateGeneralNames(issuerX509Principal);
|
||||
int version = cert.Version;
|
||||
DerInteger derInteger;
|
||||
Holder holder = new Holder(new IssuerSerial(generalNames, derInteger));
|
||||
this.holder = holder;
|
||||
}
|
||||
|
||||
// Token: 0x06007A83 RID: 31363 RVA: 0x0019743C File Offset: 0x0019563C
|
||||
[Token(Token = "0x6007A83")]
|
||||
[Address(RVA = "0x2024900", Offset = "0x2023300", VA = "0x182024900")]
|
||||
public AttributeCertificateHolder(X509Name principal)
|
||||
{
|
||||
Holder holder = new Holder(this.GenerateGeneralNames(principal));
|
||||
this.holder = holder;
|
||||
}
|
||||
|
||||
// Token: 0x06007A84 RID: 31364 RVA: 0x00197464 File Offset: 0x00195664
|
||||
[Token(Token = "0x6007A84")]
|
||||
[Address(RVA = "0x2024BE0", Offset = "0x20235E0", VA = "0x182024BE0")]
|
||||
public AttributeCertificateHolder(int digestedObjectType, string digestAlgorithm, string otherObjectTypeID, byte[] objectDigest)
|
||||
{
|
||||
int num = 0;
|
||||
base.FieldGetter(num, digestAlgorithm, otherObjectTypeID);
|
||||
AlgorithmIdentifier algorithmIdentifier = new AlgorithmIdentifier(new DerObjectIdentifier(digestAlgorithm));
|
||||
byte[] array;
|
||||
Holder holder = new Holder(new ObjectDigestInfo(digestedObjectType, otherObjectTypeID, algorithmIdentifier, array));
|
||||
this.holder = holder;
|
||||
}
|
||||
|
||||
// Token: 0x170013F4 RID: 5108
|
||||
// (get) Token: 0x06007A85 RID: 31365 RVA: 0x001974A0 File Offset: 0x001956A0
|
||||
[Token(Token = "0x170013F4")]
|
||||
public int DigestedObjectType
|
||||
{
|
||||
[Token(Token = "0x6007A85")]
|
||||
[Address(RVA = "0x2024D50", Offset = "0x2023750", VA = "0x182024D50")]
|
||||
get
|
||||
{
|
||||
ObjectDigestInfo objectDigestInfo = this.holder.objectDigestInfo;
|
||||
if (objectDigestInfo == 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return objectDigestInfo.digestedObjectType.Value.IntValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170013F5 RID: 5109
|
||||
// (get) Token: 0x06007A86 RID: 31366 RVA: 0x001974D8 File Offset: 0x001956D8
|
||||
[Token(Token = "0x170013F5")]
|
||||
public string DigestAlgorithm
|
||||
{
|
||||
[Token(Token = "0x6007A86")]
|
||||
[Address(RVA = "0x2024D00", Offset = "0x2023700", VA = "0x182024D00")]
|
||||
get
|
||||
{
|
||||
ObjectDigestInfo objectDigestInfo = this.holder.objectDigestInfo;
|
||||
if (objectDigestInfo == 0)
|
||||
{
|
||||
}
|
||||
Asn1Object asn1Object = objectDigestInfo.digestAlgorithm.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007A87 RID: 31367 RVA: 0x00197508 File Offset: 0x00195708
|
||||
[Token(Token = "0x6007A87")]
|
||||
[Address(RVA = "0x2023F20", Offset = "0x2022920", VA = "0x182023F20")]
|
||||
public byte[] GetObjectDigest()
|
||||
{
|
||||
ObjectDigestInfo objectDigestInfo = this.holder.objectDigestInfo;
|
||||
if (objectDigestInfo == 0)
|
||||
{
|
||||
}
|
||||
Asn1Object asn1Object = objectDigestInfo.objectDigest.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x170013F6 RID: 5110
|
||||
// (get) Token: 0x06007A88 RID: 31368 RVA: 0x00197538 File Offset: 0x00195738
|
||||
[Token(Token = "0x170013F6")]
|
||||
public string OtherObjectTypeID
|
||||
{
|
||||
[Token(Token = "0x6007A88")]
|
||||
[Address(RVA = "0x2024DA0", Offset = "0x20237A0", VA = "0x182024DA0")]
|
||||
get
|
||||
{
|
||||
ObjectDigestInfo objectDigestInfo = this.holder.objectDigestInfo;
|
||||
if (objectDigestInfo == 0)
|
||||
{
|
||||
}
|
||||
return objectDigestInfo.otherObjectTypeID.identifier;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007A89 RID: 31369 RVA: 0x00197568 File Offset: 0x00195768
|
||||
[Token(Token = "0x6007A89")]
|
||||
[Address(RVA = "0x2023CA0", Offset = "0x20226A0", VA = "0x182023CA0")]
|
||||
private GeneralNames GenerateGeneralNames(X509Name principal)
|
||||
{
|
||||
return new GeneralNames(new GeneralName(principal));
|
||||
}
|
||||
|
||||
// Token: 0x06007A8A RID: 31370 RVA: 0x00197580 File Offset: 0x00195780
|
||||
[Token(Token = "0x6007A8A")]
|
||||
[Address(RVA = "0x20247B0", Offset = "0x20231B0", VA = "0x1820247B0")]
|
||||
private bool MatchesDN(X509Name subject, GeneralNames targets)
|
||||
{
|
||||
GeneralName[] names = targets.GetNames();
|
||||
int num = 0;
|
||||
int length = names.Length;
|
||||
if (num != length)
|
||||
{
|
||||
GeneralName generalName = names[num];
|
||||
if (generalName.tag == 4)
|
||||
{
|
||||
if (!X509Name.GetInstance(generalName.obj).Equivalent(subject))
|
||||
{
|
||||
}
|
||||
return true;
|
||||
}
|
||||
num++;
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007A8B RID: 31371 RVA: 0x001975D4 File Offset: 0x001957D4
|
||||
[Token(Token = "0x6007A8B")]
|
||||
[Address(RVA = "0x2023D90", Offset = "0x2022790", VA = "0x182023D90")]
|
||||
private object[] GetNames(GeneralName[] names)
|
||||
{
|
||||
int num = 0;
|
||||
int length = names.Length;
|
||||
if (num != length)
|
||||
{
|
||||
GeneralName generalName = names[num];
|
||||
num++;
|
||||
}
|
||||
object[] array = new object[num];
|
||||
int length2 = names.Length;
|
||||
if (num != length2)
|
||||
{
|
||||
GeneralName generalName2 = names[num];
|
||||
if (generalName2.tag == 4)
|
||||
{
|
||||
num++;
|
||||
X509Name instance = X509Name.GetInstance(generalName2.obj);
|
||||
throw new ArrayTypeMismatchException();
|
||||
}
|
||||
num++;
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x06007A8C RID: 31372 RVA: 0x00197650 File Offset: 0x00195850
|
||||
[Token(Token = "0x6007A8C")]
|
||||
[Address(RVA = "0x2023F60", Offset = "0x2022960", VA = "0x182023F60")]
|
||||
private X509Name[] GetPrincipals(GeneralNames names)
|
||||
{
|
||||
GeneralName[] names2 = names.GetNames();
|
||||
int num = 0;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
int length = names2.Length;
|
||||
if (num3 != length)
|
||||
{
|
||||
GeneralName generalName = names2[num2];
|
||||
num2++;
|
||||
}
|
||||
object[] array = new object[num];
|
||||
int num4 = 0;
|
||||
int num5 = 0;
|
||||
int num6 = 0;
|
||||
int length2 = names2.Length;
|
||||
if (num6 != length2)
|
||||
{
|
||||
GeneralName generalName2 = names2[num5];
|
||||
if (generalName2.tag == 4)
|
||||
{
|
||||
num4++;
|
||||
X509Name instance = X509Name.GetInstance(generalName2.obj);
|
||||
throw new ArrayTypeMismatchException();
|
||||
}
|
||||
num5++;
|
||||
}
|
||||
int num7 = 0;
|
||||
int num8 = 0;
|
||||
int num9 = 0;
|
||||
int length3 = array.Length;
|
||||
if (num9 != length3)
|
||||
{
|
||||
if (array[num8] == 0)
|
||||
{
|
||||
}
|
||||
num8++;
|
||||
}
|
||||
X509Name[] array2 = new X509Name[num7];
|
||||
int num10 = 0;
|
||||
int num11 = 0;
|
||||
int num12 = 0;
|
||||
int length4 = array.Length;
|
||||
if (num12 != length4)
|
||||
{
|
||||
object obj = array[num11];
|
||||
if (obj != 0 && obj != 0)
|
||||
{
|
||||
num10++;
|
||||
throw new ArrayTypeMismatchException();
|
||||
}
|
||||
num11++;
|
||||
}
|
||||
return array2;
|
||||
}
|
||||
|
||||
// Token: 0x06007A8D RID: 31373 RVA: 0x00197774 File Offset: 0x00195974
|
||||
[Token(Token = "0x6007A8D")]
|
||||
[Address(RVA = "0x2023D10", Offset = "0x2022710", VA = "0x182023D10")]
|
||||
public X509Name[] GetEntityNames()
|
||||
{
|
||||
GeneralNames entityName = this.holder.entityName;
|
||||
if (entityName == 0)
|
||||
{
|
||||
}
|
||||
return this.GetPrincipals(entityName);
|
||||
}
|
||||
|
||||
// Token: 0x06007A8E RID: 31374 RVA: 0x001977A0 File Offset: 0x001959A0
|
||||
[Token(Token = "0x6007A8E")]
|
||||
[Address(RVA = "0x2023D50", Offset = "0x2022750", VA = "0x182023D50")]
|
||||
public X509Name[] GetIssuer()
|
||||
{
|
||||
IssuerSerial baseCertificateID = this.holder.baseCertificateID;
|
||||
if (baseCertificateID == 0)
|
||||
{
|
||||
}
|
||||
GeneralNames issuer = baseCertificateID.issuer;
|
||||
return this.GetPrincipals(issuer);
|
||||
}
|
||||
|
||||
// Token: 0x170013F7 RID: 5111
|
||||
// (get) Token: 0x06007A8F RID: 31375 RVA: 0x001977D4 File Offset: 0x001959D4
|
||||
[Token(Token = "0x170013F7")]
|
||||
public BigInteger SerialNumber
|
||||
{
|
||||
[Token(Token = "0x6007A8F")]
|
||||
[Address(RVA = "0x2024DE0", Offset = "0x20237E0", VA = "0x182024DE0")]
|
||||
get
|
||||
{
|
||||
IssuerSerial baseCertificateID = this.holder.baseCertificateID;
|
||||
if (baseCertificateID == 0)
|
||||
{
|
||||
}
|
||||
return baseCertificateID.serial.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007A90 RID: 31376 RVA: 0x00197804 File Offset: 0x00195A04
|
||||
[Token(Token = "0x6007A90")]
|
||||
[Address(RVA = "0x2023AB0", Offset = "0x20224B0", VA = "0x182023AB0", Slot = "5")]
|
||||
public object Clone()
|
||||
{
|
||||
Asn1Object asn1Object;
|
||||
do
|
||||
{
|
||||
asn1Object = this.holder.ToAsn1Object();
|
||||
if (asn1Object == 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (asn1Object == 0);
|
||||
Holder instance = Holder.GetInstance(asn1Object);
|
||||
AttributeCertificateHolder attributeCertificateHolder;
|
||||
attributeCertificateHolder.holder = instance;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007A91 RID: 31377 RVA: 0x0019783C File Offset: 0x00195A3C
|
||||
[Token(Token = "0x6007A91")]
|
||||
[Address(RVA = "0x20242C0", Offset = "0x2022CC0", VA = "0x1820242C0")]
|
||||
public bool Match(X509Certificate x509Cert)
|
||||
{
|
||||
Holder holder = this.holder;
|
||||
IssuerSerial baseCertificateID = holder.baseCertificateID;
|
||||
if (baseCertificateID == 0)
|
||||
{
|
||||
if (holder.entityName != baseCertificateID)
|
||||
{
|
||||
X509Name subjectX509Principal = PrincipalUtilities.GetSubjectX509Principal(x509Cert);
|
||||
GeneralNames entityName = this.holder.entityName;
|
||||
if (this.MatchesDN(subjectX509Principal, entityName))
|
||||
{
|
||||
}
|
||||
}
|
||||
if (this.holder.objectDigestInfo != (ulong)0L)
|
||||
{
|
||||
ObjectDigestInfo objectDigestInfo = this.holder.objectDigestInfo;
|
||||
if (objectDigestInfo == 0)
|
||||
{
|
||||
}
|
||||
Asn1Object asn1Object = objectDigestInfo.digestAlgorithm.ToAsn1Object();
|
||||
ObjectDigestInfo objectDigestInfo2 = this.holder.objectDigestInfo;
|
||||
if (objectDigestInfo2 == 0)
|
||||
{
|
||||
goto IL_A6;
|
||||
}
|
||||
if (objectDigestInfo2.digestedObjectType.Value.IntValue == 0)
|
||||
{
|
||||
SubjectPublicKeyInfo subjectPublicKeyInfo;
|
||||
int length = subjectPublicKeyInfo.GetEncoded().Length;
|
||||
goto IL_A6;
|
||||
}
|
||||
IL_DF:
|
||||
bool flag;
|
||||
while (!flag)
|
||||
{
|
||||
}
|
||||
goto IL_E4;
|
||||
IL_A6:
|
||||
IDigest digest;
|
||||
byte[] array = DigestUtilities.DoFinal(digest);
|
||||
ObjectDigestInfo objectDigestInfo3 = this.holder.objectDigestInfo;
|
||||
byte[] octets;
|
||||
if (objectDigestInfo3 != 0)
|
||||
{
|
||||
octets = objectDigestInfo3.objectDigest.GetOctets();
|
||||
}
|
||||
flag = Arrays.AreEqual(array, octets);
|
||||
if (!flag)
|
||||
{
|
||||
goto IL_DF;
|
||||
}
|
||||
}
|
||||
}
|
||||
IL_E4:
|
||||
BigInteger value = baseCertificateID.serial.Value;
|
||||
if (x509Cert.Version != 0)
|
||||
{
|
||||
X509Name issuerX509Principal = PrincipalUtilities.GetIssuerX509Principal(x509Cert);
|
||||
GeneralNames issuer = this.holder.baseCertificateID.issuer;
|
||||
bool flag2 = this.MatchesDN(issuerX509Principal, issuer);
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007A92 RID: 31378 RVA: 0x00197A04 File Offset: 0x00195C04
|
||||
[Token(Token = "0x6007A92")]
|
||||
[Address(RVA = "0x2023B90", Offset = "0x2022590", VA = "0x182023B90", Slot = "0")]
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
while (obj != this)
|
||||
{
|
||||
if (obj != 0 && obj != 0)
|
||||
{
|
||||
if (obj == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
Asn1Object asn1Object = this.holder.ToAsn1Object();
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x06007A93 RID: 31379 RVA: 0x00197A3C File Offset: 0x00195C3C
|
||||
[Token(Token = "0x6007A93")]
|
||||
[Address(RVA = "0x528AC0", Offset = "0x5274C0", VA = "0x180528AC0", Slot = "2")]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
Asn1Object asn1Object = this.holder.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007A94 RID: 31380 RVA: 0x00197A5C File Offset: 0x00195C5C
|
||||
[Token(Token = "0x6007A94")]
|
||||
[Address(RVA = "0x20246D0", Offset = "0x20230D0", VA = "0x1820246D0", Slot = "4")]
|
||||
public bool Match(object obj)
|
||||
{
|
||||
while (obj != 0 && obj != 0)
|
||||
{
|
||||
if (obj != 0)
|
||||
{
|
||||
bool flag;
|
||||
return flag;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04005833 RID: 22579
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005833")]
|
||||
internal readonly Holder holder;
|
||||
}
|
||||
}
|
||||
+226
@@ -0,0 +1,226 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x0200131C RID: 4892
|
||||
[Token(Token = "0x200131C")]
|
||||
[StructLayout(3)]
|
||||
public class AttributeCertificateIssuer : IX509Selector, ICloneable
|
||||
{
|
||||
// Token: 0x06007A95 RID: 31381 RVA: 0x00197A7C File Offset: 0x00195C7C
|
||||
[Token(Token = "0x6007A95")]
|
||||
[Address(RVA = "0x5294A0", Offset = "0x527EA0", VA = "0x1805294A0")]
|
||||
public AttributeCertificateIssuer(AttCertIssuer issuer)
|
||||
{
|
||||
Asn1Encodable obj = issuer.obj;
|
||||
this.form = obj;
|
||||
}
|
||||
|
||||
// Token: 0x06007A96 RID: 31382 RVA: 0x00197AA4 File Offset: 0x00195CA4
|
||||
[Token(Token = "0x6007A96")]
|
||||
[Address(RVA = "0x5293F0", Offset = "0x527DF0", VA = "0x1805293F0")]
|
||||
public AttributeCertificateIssuer(X509Name principal)
|
||||
{
|
||||
V2Form v2Form = new V2Form(new GeneralNames(new GeneralName(principal)));
|
||||
this.form = v2Form;
|
||||
}
|
||||
|
||||
// Token: 0x06007A97 RID: 31383 RVA: 0x00197AD0 File Offset: 0x00195CD0
|
||||
[Token(Token = "0x6007A97")]
|
||||
[Address(RVA = "0x528AF0", Offset = "0x5274F0", VA = "0x180528AF0")]
|
||||
private object[] GetNames()
|
||||
{
|
||||
Asn1Encodable asn1Encodable;
|
||||
int num;
|
||||
do
|
||||
{
|
||||
asn1Encodable = this.form;
|
||||
num = 0;
|
||||
}
|
||||
while ((asn1Encodable != 0 && asn1Encodable != 0 && (asn1Encodable == 0 || asn1Encodable == 0)) || asn1Encodable == 0);
|
||||
GeneralName[] array;
|
||||
int length = array.Length;
|
||||
if (num != length)
|
||||
{
|
||||
GeneralName generalName = array[num];
|
||||
num++;
|
||||
}
|
||||
object[] array2 = new object[num];
|
||||
int length2 = array.Length;
|
||||
if (num != length2)
|
||||
{
|
||||
GeneralName generalName2 = array[num];
|
||||
if (generalName2.tag == 4)
|
||||
{
|
||||
num++;
|
||||
X509Name instance = X509Name.GetInstance(generalName2.obj);
|
||||
throw new ArrayTypeMismatchException();
|
||||
}
|
||||
num++;
|
||||
}
|
||||
return array2;
|
||||
}
|
||||
|
||||
// Token: 0x06007A98 RID: 31384 RVA: 0x00197B78 File Offset: 0x00195D78
|
||||
[Token(Token = "0x6007A98")]
|
||||
[Address(RVA = "0x528DB0", Offset = "0x5277B0", VA = "0x180528DB0")]
|
||||
public X509Name[] GetPrincipals()
|
||||
{
|
||||
object[] names = this.GetNames();
|
||||
int num = 0;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
int length = names.Length;
|
||||
if (num3 != length)
|
||||
{
|
||||
if (names[num2] == 0)
|
||||
{
|
||||
}
|
||||
num2++;
|
||||
}
|
||||
X509Name[] array = new X509Name[num];
|
||||
int num4 = 0;
|
||||
int num5 = 0;
|
||||
int num6 = 0;
|
||||
int length2 = names.Length;
|
||||
if (num6 != length2)
|
||||
{
|
||||
object obj = names[num5];
|
||||
if (obj != 0 && obj != 0)
|
||||
{
|
||||
num4++;
|
||||
throw new ArrayTypeMismatchException();
|
||||
}
|
||||
num5++;
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x06007A99 RID: 31385 RVA: 0x00197C0C File Offset: 0x00195E0C
|
||||
[Token(Token = "0x6007A99")]
|
||||
[Address(RVA = "0x5292A0", Offset = "0x527CA0", VA = "0x1805292A0")]
|
||||
private bool MatchesDN(X509Name subject, GeneralNames targets)
|
||||
{
|
||||
GeneralName[] names = targets.GetNames();
|
||||
int num = 0;
|
||||
int length = names.Length;
|
||||
if (num != length)
|
||||
{
|
||||
GeneralName generalName = names[num];
|
||||
if (generalName.tag == 4)
|
||||
{
|
||||
if (!X509Name.GetInstance(generalName.obj).Equivalent(subject))
|
||||
{
|
||||
}
|
||||
return true;
|
||||
}
|
||||
num++;
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007A9A RID: 31386 RVA: 0x00197C60 File Offset: 0x00195E60
|
||||
[Token(Token = "0x6007A9A")]
|
||||
[Address(RVA = "0x528940", Offset = "0x527340", VA = "0x180528940", Slot = "5")]
|
||||
public object Clone()
|
||||
{
|
||||
Asn1Encodable obj = AttCertIssuer.GetInstance(this.form).obj;
|
||||
AttributeCertificateIssuer attributeCertificateIssuer;
|
||||
attributeCertificateIssuer.form = obj;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007A9B RID: 31387 RVA: 0x00197C8C File Offset: 0x00195E8C
|
||||
[Token(Token = "0x6007A9B")]
|
||||
[Address(RVA = "0x528FA0", Offset = "0x5279A0", VA = "0x180528FA0")]
|
||||
public bool Match(X509Certificate x509Cert)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
Asn1Encodable asn1Encodable = this.form;
|
||||
if (asn1Encodable != 0 && asn1Encodable != 0)
|
||||
{
|
||||
int num = 0;
|
||||
if (asn1Encodable == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (x509Cert.Version == 0)
|
||||
{
|
||||
}
|
||||
BigInteger serialNumber = x509Cert.SerialNumber;
|
||||
}
|
||||
X509Name issuerDN = x509Cert.IssuerDN;
|
||||
Asn1Encodable asn1Encodable2 = this.form;
|
||||
if (asn1Encodable2 == 0 || asn1Encodable2 != 0)
|
||||
{
|
||||
goto IL_53;
|
||||
}
|
||||
}
|
||||
X509Name issuerDN2 = x509Cert.IssuerDN;
|
||||
bool flag;
|
||||
return flag;
|
||||
IL_53:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007A9C RID: 31388 RVA: 0x00197CF4 File Offset: 0x00195EF4
|
||||
[Token(Token = "0x6007A9C")]
|
||||
[Address(RVA = "0x5289B0", Offset = "0x5273B0", VA = "0x1805289B0", Slot = "0")]
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
while (obj != this)
|
||||
{
|
||||
if (obj != 0 && obj != 0)
|
||||
{
|
||||
if (obj == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
Asn1Object asn1Object = this.form.ToAsn1Object();
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x06007A9D RID: 31389 RVA: 0x00197D2C File Offset: 0x00195F2C
|
||||
[Token(Token = "0x6007A9D")]
|
||||
[Address(RVA = "0x528AC0", Offset = "0x5274C0", VA = "0x180528AC0", Slot = "2")]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
Asn1Object asn1Object = this.form.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007A9E RID: 31390 RVA: 0x00197D4C File Offset: 0x00195F4C
|
||||
[Token(Token = "0x6007A9E")]
|
||||
[Address(RVA = "0x5291C0", Offset = "0x527BC0", VA = "0x1805291C0", Slot = "4")]
|
||||
public bool Match(object obj)
|
||||
{
|
||||
while (obj != 0 && obj != 0)
|
||||
{
|
||||
if (obj != 0)
|
||||
{
|
||||
bool flag;
|
||||
return flag;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04005834 RID: 22580
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005834")]
|
||||
internal readonly Asn1Encodable form;
|
||||
}
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
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.Security;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Extension
|
||||
{
|
||||
// Token: 0x02001340 RID: 4928
|
||||
[Token(Token = "0x2001340")]
|
||||
[StructLayout(3)]
|
||||
public class AuthorityKeyIdentifierStructure : AuthorityKeyIdentifier
|
||||
{
|
||||
// Token: 0x06007C22 RID: 31778 RVA: 0x0019D550 File Offset: 0x0019B750
|
||||
[Token(Token = "0x6007C22")]
|
||||
[Address(RVA = "0x5299D0", Offset = "0x5283D0", VA = "0x1805299D0")]
|
||||
public AuthorityKeyIdentifierStructure(Asn1OctetString encodedValue)
|
||||
{
|
||||
Asn1Object asn1Object;
|
||||
do
|
||||
{
|
||||
Stream octetStream = encodedValue.GetOctetStream();
|
||||
if (asn1Object == 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (asn1Object == 0);
|
||||
}
|
||||
|
||||
// Token: 0x06007C23 RID: 31779 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6007C23")]
|
||||
[Address(RVA = "0x5294E0", Offset = "0x527EE0", VA = "0x1805294E0")]
|
||||
private static Asn1Sequence FromCertificate(X509Certificate certificate)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06007C24 RID: 31780 RVA: 0x0019D574 File Offset: 0x0019B774
|
||||
[Token(Token = "0x6007C24")]
|
||||
[Address(RVA = "0x5298A0", Offset = "0x5282A0", VA = "0x1805298A0")]
|
||||
private static Asn1Sequence FromKey(AsymmetricKeyParameter pubKey)
|
||||
{
|
||||
Asn1Object asn1Object = new AuthorityKeyIdentifier(SubjectPublicKeyInfoFactory.CreateSubjectPublicKeyInfo(pubKey)).ToAsn1Object();
|
||||
if (asn1Object == 0 || asn1Object != 0)
|
||||
{
|
||||
string text;
|
||||
InvalidKeyException ex = new InvalidKeyException(text);
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007C25 RID: 31781 RVA: 0x0019D5A8 File Offset: 0x0019B7A8
|
||||
[Token(Token = "0x6007C25")]
|
||||
[Address(RVA = "0x529AC0", Offset = "0x5284C0", VA = "0x180529AC0")]
|
||||
public AuthorityKeyIdentifierStructure(X509Certificate certificate)
|
||||
{
|
||||
Asn1Sequence asn1Sequence = AuthorityKeyIdentifierStructure.FromCertificate(certificate);
|
||||
base..ctor(asn1Sequence);
|
||||
}
|
||||
|
||||
// Token: 0x06007C26 RID: 31782 RVA: 0x0019D5C4 File Offset: 0x0019B7C4
|
||||
[Token(Token = "0x6007C26")]
|
||||
[Address(RVA = "0x529A90", Offset = "0x528490", VA = "0x180529A90")]
|
||||
public AuthorityKeyIdentifierStructure(AsymmetricKeyParameter pubKey)
|
||||
{
|
||||
Asn1Sequence asn1Sequence = AuthorityKeyIdentifierStructure.FromKey(pubKey);
|
||||
base..ctor(asn1Sequence);
|
||||
}
|
||||
}
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Extension
|
||||
{
|
||||
// Token: 0x02001341 RID: 4929
|
||||
[Token(Token = "0x2001341")]
|
||||
[StructLayout(3)]
|
||||
public class SubjectKeyIdentifierStructure : SubjectKeyIdentifier
|
||||
{
|
||||
// Token: 0x06007C27 RID: 31783 RVA: 0x0019D5E0 File Offset: 0x0019B7E0
|
||||
[Token(Token = "0x6007C27")]
|
||||
[Address(RVA = "0x52AD70", Offset = "0x529770", VA = "0x18052AD70")]
|
||||
public SubjectKeyIdentifierStructure(Asn1OctetString encodedValue)
|
||||
{
|
||||
Asn1Object asn1Object;
|
||||
do
|
||||
{
|
||||
Stream octetStream = encodedValue.GetOctetStream();
|
||||
if (asn1Object == 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (asn1Object == 0);
|
||||
}
|
||||
|
||||
// Token: 0x06007C28 RID: 31784 RVA: 0x0019D604 File Offset: 0x0019B804
|
||||
[Token(Token = "0x6007C28")]
|
||||
[Address(RVA = "0x52AC20", Offset = "0x529620", VA = "0x18052AC20")]
|
||||
private static Asn1OctetString FromPublicKey(AsymmetricKeyParameter pubKey)
|
||||
{
|
||||
Asn1Object asn1Object = new SubjectKeyIdentifier(SubjectPublicKeyInfoFactory.CreateSubjectPublicKeyInfo(pubKey)).ToAsn1Object();
|
||||
if (asn1Object == 0 || asn1Object != 0)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007C29 RID: 31785 RVA: 0x0019D640 File Offset: 0x0019B840
|
||||
[Token(Token = "0x6007C29")]
|
||||
[Address(RVA = "0x52AE30", Offset = "0x529830", VA = "0x18052AE30")]
|
||||
public SubjectKeyIdentifierStructure(AsymmetricKeyParameter pubKey)
|
||||
{
|
||||
Asn1OctetString asn1OctetString = SubjectKeyIdentifierStructure.FromPublicKey(pubKey);
|
||||
base..ctor(asn1OctetString);
|
||||
}
|
||||
}
|
||||
}
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Extension
|
||||
{
|
||||
// Token: 0x02001342 RID: 4930
|
||||
[Token(Token = "0x2001342")]
|
||||
[StructLayout(3)]
|
||||
public class X509ExtensionUtilities
|
||||
{
|
||||
// Token: 0x06007C2A RID: 31786 RVA: 0x0019D65C File Offset: 0x0019B85C
|
||||
[Token(Token = "0x6007C2A")]
|
||||
[Address(RVA = "0x5370B0", Offset = "0x535AB0", VA = "0x1805370B0")]
|
||||
public static Asn1Object FromExtensionValue(Asn1OctetString extensionValue)
|
||||
{
|
||||
Stream octetStream = extensionValue.GetOctetStream();
|
||||
Asn1Object asn1Object;
|
||||
return asn1Object;
|
||||
}
|
||||
|
||||
// Token: 0x06007C2B RID: 31787 RVA: 0x0019D678 File Offset: 0x0019B878
|
||||
[Token(Token = "0x6007C2B")]
|
||||
[Address(RVA = "0x5375B0", Offset = "0x535FB0", VA = "0x1805375B0")]
|
||||
public static ICollection GetIssuerAlternativeNames(X509Certificate cert)
|
||||
{
|
||||
ISet criticalExtensionOids = cert.GetCriticalExtensionOids();
|
||||
ICollection collection;
|
||||
return collection;
|
||||
}
|
||||
|
||||
// Token: 0x06007C2C RID: 31788 RVA: 0x0019D694 File Offset: 0x0019B894
|
||||
[Token(Token = "0x6007C2C")]
|
||||
[Address(RVA = "0x537640", Offset = "0x536040", VA = "0x180537640")]
|
||||
public static ICollection GetSubjectAlternativeNames(X509Certificate cert)
|
||||
{
|
||||
ISet criticalExtensionOids = cert.GetCriticalExtensionOids();
|
||||
ICollection collection;
|
||||
return collection;
|
||||
}
|
||||
|
||||
// Token: 0x06007C2D RID: 31789 RVA: 0x0019D6B0 File Offset: 0x0019B8B0
|
||||
[Token(Token = "0x6007C2D")]
|
||||
[Address(RVA = "0x5370E0", Offset = "0x535AE0", VA = "0x1805370E0")]
|
||||
private static ICollection GetAlternativeName(Asn1OctetString extVal)
|
||||
{
|
||||
int num;
|
||||
Asn1Object asn1Object;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
IList list = Platform.CreateArrayList();
|
||||
if (extVal == 0)
|
||||
{
|
||||
goto IL_7B;
|
||||
}
|
||||
Stream octetStream = extVal.GetOctetStream();
|
||||
}
|
||||
while (Asn1Sequence.GetInstance(asn1Object).GetEnumerator() == 0);
|
||||
IList list2 = Platform.CreateArrayList();
|
||||
GeneralName generalName;
|
||||
if (generalName.tag > 8)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
Asn1Encodable obj = generalName.obj;
|
||||
X509Name instance = X509Name.GetInstance(obj);
|
||||
int hashCode = instance.GetHashCode();
|
||||
Asn1Object asn1Object2 = instance.ToAsn1Object();
|
||||
Stream octetStream2 = Asn1OctetString.GetInstance(0).GetOctetStream();
|
||||
if (DerObjectIdentifier.GetInstance(obj) != 0)
|
||||
{
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
if (num != 0)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
IL_7B:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007C2E RID: 31790 RVA: 0x0019D794 File Offset: 0x0019B994
|
||||
[Token(Token = "0x6007C2E")]
|
||||
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
||||
public X509ExtensionUtilities()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x0200131D RID: 4893
|
||||
[Token(Token = "0x200131D")]
|
||||
[StructLayout(3)]
|
||||
public interface IX509AttributeCertificate : IX509Extension
|
||||
{
|
||||
// Token: 0x170013F8 RID: 5112
|
||||
// (get) Token: 0x06007A9F RID: 31391
|
||||
[Token(Token = "0x170013F8")]
|
||||
int Version
|
||||
{
|
||||
[Token(Token = "0x6007A9F")]
|
||||
[Address(Slot = "0")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x170013F9 RID: 5113
|
||||
// (get) Token: 0x06007AA0 RID: 31392
|
||||
[Token(Token = "0x170013F9")]
|
||||
BigInteger SerialNumber
|
||||
{
|
||||
[Token(Token = "0x6007AA0")]
|
||||
[Address(Slot = "1")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x170013FA RID: 5114
|
||||
// (get) Token: 0x06007AA1 RID: 31393
|
||||
[Token(Token = "0x170013FA")]
|
||||
DateTime NotBefore
|
||||
{
|
||||
[Token(Token = "0x6007AA1")]
|
||||
[Address(Slot = "2")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x170013FB RID: 5115
|
||||
// (get) Token: 0x06007AA2 RID: 31394
|
||||
[Token(Token = "0x170013FB")]
|
||||
DateTime NotAfter
|
||||
{
|
||||
[Token(Token = "0x6007AA2")]
|
||||
[Address(Slot = "3")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x170013FC RID: 5116
|
||||
// (get) Token: 0x06007AA3 RID: 31395
|
||||
[Token(Token = "0x170013FC")]
|
||||
AttributeCertificateHolder Holder
|
||||
{
|
||||
[Token(Token = "0x6007AA3")]
|
||||
[Address(Slot = "4")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x170013FD RID: 5117
|
||||
// (get) Token: 0x06007AA4 RID: 31396
|
||||
[Token(Token = "0x170013FD")]
|
||||
AttributeCertificateIssuer Issuer
|
||||
{
|
||||
[Token(Token = "0x6007AA4")]
|
||||
[Address(Slot = "5")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x06007AA5 RID: 31397
|
||||
[Token(Token = "0x6007AA5")]
|
||||
[Address(Slot = "6")]
|
||||
X509Attribute[] GetAttributes();
|
||||
|
||||
// Token: 0x06007AA6 RID: 31398
|
||||
[Token(Token = "0x6007AA6")]
|
||||
[Address(Slot = "7")]
|
||||
X509Attribute[] GetAttributes(string oid);
|
||||
|
||||
// Token: 0x06007AA7 RID: 31399
|
||||
[Token(Token = "0x6007AA7")]
|
||||
[Address(Slot = "8")]
|
||||
bool[] GetIssuerUniqueID();
|
||||
|
||||
// Token: 0x170013FE RID: 5118
|
||||
// (get) Token: 0x06007AA8 RID: 31400
|
||||
[Token(Token = "0x170013FE")]
|
||||
bool IsValidNow
|
||||
{
|
||||
[Token(Token = "0x6007AA8")]
|
||||
[Address(Slot = "9")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x06007AA9 RID: 31401
|
||||
[Token(Token = "0x6007AA9")]
|
||||
[Address(Slot = "10")]
|
||||
bool IsValid(DateTime date);
|
||||
|
||||
// Token: 0x06007AAA RID: 31402
|
||||
[Token(Token = "0x6007AAA")]
|
||||
[Address(Slot = "11")]
|
||||
void CheckValidity();
|
||||
|
||||
// Token: 0x06007AAB RID: 31403
|
||||
[Token(Token = "0x6007AAB")]
|
||||
[Address(Slot = "12")]
|
||||
void CheckValidity(DateTime date);
|
||||
|
||||
// Token: 0x06007AAC RID: 31404
|
||||
[Token(Token = "0x6007AAC")]
|
||||
[Address(Slot = "13")]
|
||||
byte[] GetSignature();
|
||||
|
||||
// Token: 0x06007AAD RID: 31405
|
||||
[Token(Token = "0x6007AAD")]
|
||||
[Address(Slot = "14")]
|
||||
void Verify(AsymmetricKeyParameter publicKey);
|
||||
|
||||
// Token: 0x06007AAE RID: 31406
|
||||
[Token(Token = "0x6007AAE")]
|
||||
[Address(Slot = "15")]
|
||||
byte[] GetEncoded();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x0200131E RID: 4894
|
||||
[Token(Token = "0x200131E")]
|
||||
[StructLayout(3)]
|
||||
public interface IX509Extension
|
||||
{
|
||||
// Token: 0x06007AAF RID: 31407
|
||||
[Token(Token = "0x6007AAF")]
|
||||
[Address(Slot = "0")]
|
||||
ISet GetCriticalExtensionOids();
|
||||
|
||||
// Token: 0x06007AB0 RID: 31408
|
||||
[Token(Token = "0x6007AB0")]
|
||||
[Address(Slot = "1")]
|
||||
ISet GetNonCriticalExtensionOids();
|
||||
|
||||
// Token: 0x06007AB1 RID: 31409
|
||||
[Token(Token = "0x6007AB1")]
|
||||
[Address(Slot = "2")]
|
||||
[Obsolete]
|
||||
Asn1OctetString GetExtensionValue(string oid);
|
||||
|
||||
// Token: 0x06007AB2 RID: 31410
|
||||
[Token(Token = "0x6007AB2")]
|
||||
[Address(Slot = "3")]
|
||||
Asn1OctetString GetExtensionValue(DerObjectIdentifier oid);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x0200131F RID: 4895
|
||||
[Token(Token = "0x200131F")]
|
||||
[StructLayout(3)]
|
||||
internal class PemParser
|
||||
{
|
||||
// Token: 0x06007AB3 RID: 31411 RVA: 0x00197D6C File Offset: 0x00195F6C
|
||||
[Token(Token = "0x6007AB3")]
|
||||
[Address(RVA = "0x52A920", Offset = "0x529320", VA = "0x18052A920")]
|
||||
internal PemParser(string type)
|
||||
{
|
||||
string text = "-----BEGIN " + type + "-----";
|
||||
this._header1 = text;
|
||||
string text2 = "-----BEGIN X509 " + type + "-----";
|
||||
this._header2 = text2;
|
||||
string text3 = "-----END " + type + "-----";
|
||||
this._footer1 = text3;
|
||||
string text4 = "-----END X509 " + type + "-----";
|
||||
this._footer2 = text4;
|
||||
}
|
||||
|
||||
// Token: 0x06007AB4 RID: 31412 RVA: 0x00197DE0 File Offset: 0x00195FE0
|
||||
[Token(Token = "0x6007AB4")]
|
||||
[Address(RVA = "0x52A5D0", Offset = "0x528FD0", VA = "0x18052A5D0")]
|
||||
private string ReadLine(Stream inStream)
|
||||
{
|
||||
StringBuilder stringBuilder;
|
||||
do
|
||||
{
|
||||
stringBuilder = new StringBuilder();
|
||||
int num;
|
||||
if (num != 13 && num != 10)
|
||||
{
|
||||
StringBuilder stringBuilder2 = stringBuilder.Append((char)num);
|
||||
}
|
||||
}
|
||||
while (stringBuilder.Length == 0);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007AB5 RID: 31413 RVA: 0x00197E18 File Offset: 0x00196018
|
||||
[Token(Token = "0x6007AB5")]
|
||||
[Address(RVA = "0x52A6C0", Offset = "0x5290C0", VA = "0x18052A6C0")]
|
||||
internal Asn1Sequence ReadPemObject(Stream inStream)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007AB5)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1Sequence BestHTTP.SecureProtocol.Org.BouncyCastle.X509.PemParser::ReadPemObject(System.IO.Stream)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_AB:
|
||||
stloc:IOException(var_8_B5, newobj:IOException(IOException::.ctor, ldstr:string("malformed PEM data encountered")))
|
||||
}
|
||||
|
||||
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: 0x04005835 RID: 22581
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005835")]
|
||||
private readonly string _header1;
|
||||
|
||||
// Token: 0x04005836 RID: 22582
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4005836")]
|
||||
private readonly string _header2;
|
||||
|
||||
// Token: 0x04005837 RID: 22583
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4005837")]
|
||||
private readonly string _footer1;
|
||||
|
||||
// Token: 0x04005838 RID: 22584
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4005838")]
|
||||
private readonly string _footer2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x02001320 RID: 4896
|
||||
[Token(Token = "0x2001320")]
|
||||
[StructLayout(3)]
|
||||
public class PrincipalUtilities
|
||||
{
|
||||
// Token: 0x06007AB6 RID: 31414 RVA: 0x00197EDC File Offset: 0x001960DC
|
||||
[Token(Token = "0x6007AB6")]
|
||||
[Address(RVA = "0x52A9E0", Offset = "0x5293E0", VA = "0x18052A9E0")]
|
||||
public static X509Name GetIssuerX509Principal(X509Certificate cert)
|
||||
{
|
||||
DateTime notAfter = cert.NotAfter;
|
||||
Asn1Object asn1Object;
|
||||
return TbsCertificateStructure.GetInstance(asn1Object).issuer;
|
||||
}
|
||||
|
||||
// Token: 0x06007AB7 RID: 31415 RVA: 0x00197F08 File Offset: 0x00196108
|
||||
[Token(Token = "0x6007AB7")]
|
||||
[Address(RVA = "0x52AB60", Offset = "0x529560", VA = "0x18052AB60")]
|
||||
public static X509Name GetSubjectX509Principal(X509Certificate cert)
|
||||
{
|
||||
DateTime notAfter = cert.NotAfter;
|
||||
Asn1Object asn1Object;
|
||||
return TbsCertificateStructure.GetInstance(asn1Object).subject;
|
||||
}
|
||||
|
||||
// Token: 0x06007AB8 RID: 31416 RVA: 0x00197F34 File Offset: 0x00196134
|
||||
[Token(Token = "0x6007AB8")]
|
||||
[Address(RVA = "0x52AAA0", Offset = "0x5294A0", VA = "0x18052AAA0")]
|
||||
public static X509Name GetIssuerX509Principal(X509Crl crl)
|
||||
{
|
||||
ISet revokedCertificates = crl.GetRevokedCertificates();
|
||||
Asn1Object asn1Object;
|
||||
return TbsCertificateList.GetInstance(asn1Object).issuer;
|
||||
}
|
||||
|
||||
// Token: 0x06007AB9 RID: 31417 RVA: 0x00197F60 File Offset: 0x00196160
|
||||
[Token(Token = "0x6007AB9")]
|
||||
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
||||
public PrincipalUtilities()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x02001334 RID: 4916
|
||||
[Token(Token = "0x2001334")]
|
||||
[StructLayout(3)]
|
||||
public interface IX509Selector : ICloneable
|
||||
{
|
||||
// Token: 0x06007BAB RID: 31659
|
||||
[Token(Token = "0x6007BAB")]
|
||||
[Address(Slot = "0")]
|
||||
bool Match(object obj);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x02001335 RID: 4917
|
||||
[Token(Token = "0x2001335")]
|
||||
[StructLayout(3)]
|
||||
public interface IX509Store
|
||||
{
|
||||
// Token: 0x06007BAC RID: 31660
|
||||
[Token(Token = "0x6007BAC")]
|
||||
[Address(Slot = "0")]
|
||||
ICollection GetMatches(IX509Selector selector);
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x02001336 RID: 4918
|
||||
[Token(Token = "0x2001336")]
|
||||
[StructLayout(3)]
|
||||
public interface IX509StoreParameters
|
||||
{
|
||||
}
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x02001337 RID: 4919
|
||||
[Token(Token = "0x2001337")]
|
||||
[Serializable]
|
||||
[StructLayout(3)]
|
||||
public class NoSuchStoreException : X509StoreException
|
||||
{
|
||||
// Token: 0x06007BAD RID: 31661 RVA: 0x0019BF78 File Offset: 0x0019A178
|
||||
[Token(Token = "0x6007BAD")]
|
||||
[Address(RVA = "0x52A500", Offset = "0x528F00", VA = "0x18052A500")]
|
||||
public NoSuchStoreException()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06007BAE RID: 31662 RVA: 0x0019BF8C File Offset: 0x0019A18C
|
||||
[Token(Token = "0x6007BAE")]
|
||||
[Address(RVA = "0x52A560", Offset = "0x528F60", VA = "0x18052A560")]
|
||||
public NoSuchStoreException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06007BAF RID: 31663 RVA: 0x0019BFA0 File Offset: 0x0019A1A0
|
||||
[Token(Token = "0x6007BAF")]
|
||||
[Address(RVA = "0x52A480", Offset = "0x528E80", VA = "0x18052A480")]
|
||||
public NoSuchStoreException(string message, Exception e)
|
||||
: base(message, e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
+412
@@ -0,0 +1,412 @@
|
||||
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.Math;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Date;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x02001338 RID: 4920
|
||||
[Token(Token = "0x2001338")]
|
||||
[StructLayout(3)]
|
||||
public class X509AttrCertStoreSelector : IX509Selector, ICloneable
|
||||
{
|
||||
// Token: 0x06007BB0 RID: 31664 RVA: 0x0019BFB8 File Offset: 0x0019A1B8
|
||||
[Token(Token = "0x6007BB0")]
|
||||
[Address(RVA = "0x52D5C0", Offset = "0x52BFC0", VA = "0x18052D5C0")]
|
||||
public X509AttrCertStoreSelector()
|
||||
{
|
||||
HashSet hashSet = new HashSet();
|
||||
this.targetNames = hashSet;
|
||||
HashSet hashSet2 = new HashSet();
|
||||
this.targetGroups = hashSet2;
|
||||
base..ctor();
|
||||
}
|
||||
|
||||
// Token: 0x06007BB1 RID: 31665 RVA: 0x0019BFE8 File Offset: 0x0019A1E8
|
||||
[Token(Token = "0x6007BB1")]
|
||||
[Address(RVA = "0x52D4B0", Offset = "0x52BEB0", VA = "0x18052D4B0")]
|
||||
private X509AttrCertStoreSelector(X509AttrCertStoreSelector o)
|
||||
{
|
||||
HashSet hashSet = new HashSet();
|
||||
this.targetNames = hashSet;
|
||||
HashSet hashSet2 = new HashSet();
|
||||
this.targetGroups = hashSet2;
|
||||
base..ctor();
|
||||
IX509AttributeCertificate ix509AttributeCertificate = o.attributeCert;
|
||||
this.attributeCert = ix509AttributeCertificate;
|
||||
DateTimeObject dateTimeObject = o.attributeCertificateValid;
|
||||
this.attributeCertificateValid = dateTimeObject;
|
||||
AttributeCertificateHolder attributeCertificateHolder = o.holder;
|
||||
this.holder = attributeCertificateHolder;
|
||||
AttributeCertificateIssuer attributeCertificateIssuer = o.issuer;
|
||||
this.issuer = attributeCertificateIssuer;
|
||||
BigInteger bigInteger = o.serialNumber;
|
||||
this.serialNumber = bigInteger;
|
||||
HashSet hashSet3 = new HashSet(o.targetGroups);
|
||||
this.targetGroups = hashSet3;
|
||||
HashSet hashSet4 = new HashSet(o.targetNames);
|
||||
this.targetNames = hashSet4;
|
||||
}
|
||||
|
||||
// Token: 0x06007BB2 RID: 31666 RVA: 0x0019C094 File Offset: 0x0019A294
|
||||
[Token(Token = "0x6007BB2")]
|
||||
[Address(RVA = "0x52CD00", Offset = "0x52B700", VA = "0x18052CD00", Slot = "4")]
|
||||
public bool Match(object obj)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007BB2)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store.X509AttrCertStoreSelector::Match(System.Object)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_105:
|
||||
stloc:ArgumentNullException(var_24_10F, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("obj")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x06007BB3 RID: 31667 RVA: 0x0019C1B4 File Offset: 0x0019A3B4
|
||||
[Token(Token = "0x6007BB3")]
|
||||
[Address(RVA = "0x52C8B0", Offset = "0x52B2B0", VA = "0x18052C8B0", Slot = "5")]
|
||||
public object Clone()
|
||||
{
|
||||
X509AttrCertStoreSelector x509AttrCertStoreSelector = new X509AttrCertStoreSelector();
|
||||
HashSet hashSet = new HashSet();
|
||||
x509AttrCertStoreSelector.targetNames = hashSet;
|
||||
HashSet hashSet2 = new HashSet();
|
||||
x509AttrCertStoreSelector.targetGroups = hashSet2;
|
||||
IX509AttributeCertificate ix509AttributeCertificate = this.attributeCert;
|
||||
x509AttrCertStoreSelector.attributeCert = ix509AttributeCertificate;
|
||||
DateTimeObject dateTimeObject = this.attributeCertificateValid;
|
||||
x509AttrCertStoreSelector.attributeCertificateValid = dateTimeObject;
|
||||
AttributeCertificateHolder attributeCertificateHolder = this.holder;
|
||||
x509AttrCertStoreSelector.holder = attributeCertificateHolder;
|
||||
AttributeCertificateIssuer attributeCertificateIssuer = this.issuer;
|
||||
x509AttrCertStoreSelector.issuer = attributeCertificateIssuer;
|
||||
BigInteger bigInteger = this.serialNumber;
|
||||
x509AttrCertStoreSelector.serialNumber = bigInteger;
|
||||
HashSet hashSet3 = new HashSet(this.targetGroups);
|
||||
x509AttrCertStoreSelector.targetGroups = hashSet3;
|
||||
HashSet hashSet4 = new HashSet(this.targetNames);
|
||||
x509AttrCertStoreSelector.targetNames = hashSet4;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x17001424 RID: 5156
|
||||
// (get) Token: 0x06007BB4 RID: 31668 RVA: 0x0019C260 File Offset: 0x0019A460
|
||||
// (set) Token: 0x06007BB5 RID: 31669 RVA: 0x0019C274 File Offset: 0x0019A474
|
||||
[Token(Token = "0x17001424")]
|
||||
public IX509AttributeCertificate AttributeCert
|
||||
{
|
||||
[Token(Token = "0x6007BB4")]
|
||||
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0")]
|
||||
get
|
||||
{
|
||||
return this.attributeCert;
|
||||
}
|
||||
[Token(Token = "0x6007BB5")]
|
||||
[Address(RVA = "0x3C39B0", Offset = "0x3C23B0", VA = "0x1803C39B0")]
|
||||
set
|
||||
{
|
||||
this.attributeCert = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001425 RID: 5157
|
||||
// (get) Token: 0x06007BB6 RID: 31670 RVA: 0x0019C288 File Offset: 0x0019A488
|
||||
// (set) Token: 0x06007BB7 RID: 31671 RVA: 0x0019C29C File Offset: 0x0019A49C
|
||||
[Token(Token = "0x17001425")]
|
||||
[Obsolete]
|
||||
public DateTimeObject AttribueCertificateValid
|
||||
{
|
||||
[Token(Token = "0x6007BB6")]
|
||||
[Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240")]
|
||||
get
|
||||
{
|
||||
return this.attributeCertificateValid;
|
||||
}
|
||||
[Token(Token = "0x6007BB7")]
|
||||
[Address(RVA = "0x3C1280", Offset = "0x3BFC80", VA = "0x1803C1280")]
|
||||
set
|
||||
{
|
||||
this.attributeCertificateValid = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001426 RID: 5158
|
||||
// (get) Token: 0x06007BB8 RID: 31672 RVA: 0x0019C2B0 File Offset: 0x0019A4B0
|
||||
// (set) Token: 0x06007BB9 RID: 31673 RVA: 0x0019C2C4 File Offset: 0x0019A4C4
|
||||
[Token(Token = "0x17001426")]
|
||||
public DateTimeObject AttributeCertificateValid
|
||||
{
|
||||
[Token(Token = "0x6007BB8")]
|
||||
[Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240")]
|
||||
get
|
||||
{
|
||||
return this.attributeCertificateValid;
|
||||
}
|
||||
[Token(Token = "0x6007BB9")]
|
||||
[Address(RVA = "0x3C1280", Offset = "0x3BFC80", VA = "0x1803C1280")]
|
||||
set
|
||||
{
|
||||
this.attributeCertificateValid = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001427 RID: 5159
|
||||
// (get) Token: 0x06007BBA RID: 31674 RVA: 0x0019C2D8 File Offset: 0x0019A4D8
|
||||
// (set) Token: 0x06007BBB RID: 31675 RVA: 0x0019C2EC File Offset: 0x0019A4EC
|
||||
[Token(Token = "0x17001427")]
|
||||
public AttributeCertificateHolder Holder
|
||||
{
|
||||
[Token(Token = "0x6007BBA")]
|
||||
[Address(RVA = "0x3C1220", Offset = "0x3BFC20", VA = "0x1803C1220")]
|
||||
get
|
||||
{
|
||||
return this.holder;
|
||||
}
|
||||
[Token(Token = "0x6007BBB")]
|
||||
[Address(RVA = "0x3C1260", Offset = "0x3BFC60", VA = "0x1803C1260")]
|
||||
set
|
||||
{
|
||||
this.holder = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001428 RID: 5160
|
||||
// (get) Token: 0x06007BBC RID: 31676 RVA: 0x0019C300 File Offset: 0x0019A500
|
||||
// (set) Token: 0x06007BBD RID: 31677 RVA: 0x0019C314 File Offset: 0x0019A514
|
||||
[Token(Token = "0x17001428")]
|
||||
public AttributeCertificateIssuer Issuer
|
||||
{
|
||||
[Token(Token = "0x6007BBC")]
|
||||
[Address(RVA = "0x3C1230", Offset = "0x3BFC30", VA = "0x1803C1230")]
|
||||
get
|
||||
{
|
||||
return this.issuer;
|
||||
}
|
||||
[Token(Token = "0x6007BBD")]
|
||||
[Address(RVA = "0x3C1270", Offset = "0x3BFC70", VA = "0x1803C1270")]
|
||||
set
|
||||
{
|
||||
this.issuer = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001429 RID: 5161
|
||||
// (get) Token: 0x06007BBE RID: 31678 RVA: 0x0019C328 File Offset: 0x0019A528
|
||||
// (set) Token: 0x06007BBF RID: 31679 RVA: 0x0019C33C File Offset: 0x0019A53C
|
||||
[Token(Token = "0x17001429")]
|
||||
public BigInteger SerialNumber
|
||||
{
|
||||
[Token(Token = "0x6007BBE")]
|
||||
[Address(RVA = "0x3C1250", Offset = "0x3BFC50", VA = "0x1803C1250")]
|
||||
get
|
||||
{
|
||||
return this.serialNumber;
|
||||
}
|
||||
[Token(Token = "0x6007BBF")]
|
||||
[Address(RVA = "0x3C1290", Offset = "0x3BFC90", VA = "0x1803C1290")]
|
||||
set
|
||||
{
|
||||
this.serialNumber = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007BC0 RID: 31680 RVA: 0x0019C350 File Offset: 0x0019A550
|
||||
[Token(Token = "0x6007BC0")]
|
||||
[Address(RVA = "0x52C850", Offset = "0x52B250", VA = "0x18052C850")]
|
||||
public void AddTargetName(GeneralName name)
|
||||
{
|
||||
ISet set = this.targetNames;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007BC1 RID: 31681 RVA: 0x0019C36C File Offset: 0x0019A56C
|
||||
[Token(Token = "0x6007BC1")]
|
||||
[Address(RVA = "0x52C7E0", Offset = "0x52B1E0", VA = "0x18052C7E0")]
|
||||
public void AddTargetName(byte[] name)
|
||||
{
|
||||
GeneralName instance = GeneralName.GetInstance(Asn1Object.FromByteArray(name));
|
||||
ISet set = this.targetNames;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007BC2 RID: 31682 RVA: 0x0019C394 File Offset: 0x0019A594
|
||||
[Token(Token = "0x6007BC2")]
|
||||
[Address(RVA = "0x52D490", Offset = "0x52BE90", VA = "0x18052D490")]
|
||||
public void SetTargetNames(IEnumerable names)
|
||||
{
|
||||
ISet set = this.ExtractGeneralNames(names);
|
||||
this.targetNames = set;
|
||||
}
|
||||
|
||||
// Token: 0x06007BC3 RID: 31683 RVA: 0x0019C3B0 File Offset: 0x0019A5B0
|
||||
[Token(Token = "0x6007BC3")]
|
||||
[Address(RVA = "0x52CCA0", Offset = "0x52B6A0", VA = "0x18052CCA0")]
|
||||
public IEnumerable GetTargetNames()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007BC3)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.IEnumerable BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store.X509AttrCertStoreSelector::GetTargetNames()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:EnumerableProxy(var_0_0B, newobj:EnumerableProxy(EnumerableProxy::.ctor, ldfld:ISet[exp:IEnumerable](X509AttrCertStoreSelector::targetNames, ldloc:X509AttrCertStoreSelector(this))))
|
||||
}
|
||||
|
||||
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: 0x06007BC4 RID: 31684 RVA: 0x0019C3C8 File Offset: 0x0019A5C8
|
||||
[Token(Token = "0x6007BC4")]
|
||||
[Address(RVA = "0x52C780", Offset = "0x52B180", VA = "0x18052C780")]
|
||||
public void AddTargetGroup(GeneralName group)
|
||||
{
|
||||
ISet set = this.targetGroups;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007BC5 RID: 31685 RVA: 0x0019C3E4 File Offset: 0x0019A5E4
|
||||
[Token(Token = "0x6007BC5")]
|
||||
[Address(RVA = "0x52C710", Offset = "0x52B110", VA = "0x18052C710")]
|
||||
public void AddTargetGroup(byte[] name)
|
||||
{
|
||||
GeneralName instance = GeneralName.GetInstance(Asn1Object.FromByteArray(name));
|
||||
ISet set = this.targetGroups;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007BC6 RID: 31686 RVA: 0x0019C40C File Offset: 0x0019A60C
|
||||
[Token(Token = "0x6007BC6")]
|
||||
[Address(RVA = "0x52D470", Offset = "0x52BE70", VA = "0x18052D470")]
|
||||
public void SetTargetGroups(IEnumerable names)
|
||||
{
|
||||
ISet set = this.ExtractGeneralNames(names);
|
||||
this.targetGroups = set;
|
||||
}
|
||||
|
||||
// Token: 0x06007BC7 RID: 31687 RVA: 0x0019C428 File Offset: 0x0019A628
|
||||
[Token(Token = "0x6007BC7")]
|
||||
[Address(RVA = "0x52CC40", Offset = "0x52B640", VA = "0x18052CC40")]
|
||||
public IEnumerable GetTargetGroups()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007BC7)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.IEnumerable BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store.X509AttrCertStoreSelector::GetTargetGroups()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:EnumerableProxy(var_0_0B, newobj:EnumerableProxy(EnumerableProxy::.ctor, ldfld:ISet[exp:IEnumerable](X509AttrCertStoreSelector::targetGroups, ldloc:X509AttrCertStoreSelector(this))))
|
||||
}
|
||||
|
||||
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: 0x06007BC8 RID: 31688 RVA: 0x0019C440 File Offset: 0x0019A640
|
||||
[Token(Token = "0x6007BC8")]
|
||||
[Address(RVA = "0x52C9F0", Offset = "0x52B3F0", VA = "0x18052C9F0")]
|
||||
private ISet ExtractGeneralNames(IEnumerable names)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
int num = 0;
|
||||
HashSet hashSet = new HashSet();
|
||||
if (names == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (hashSet != 0)
|
||||
{
|
||||
if (num < hashSet)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
if (hashSet == 0 || hashSet != 0)
|
||||
{
|
||||
}
|
||||
Asn1Object asn1Object;
|
||||
if (GeneralName.GetInstance(asn1Object) != 0)
|
||||
{
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0400587B RID: 22651
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400587B")]
|
||||
private IX509AttributeCertificate attributeCert;
|
||||
|
||||
// Token: 0x0400587C RID: 22652
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400587C")]
|
||||
private DateTimeObject attributeCertificateValid;
|
||||
|
||||
// Token: 0x0400587D RID: 22653
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400587D")]
|
||||
private AttributeCertificateHolder holder;
|
||||
|
||||
// Token: 0x0400587E RID: 22654
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x400587E")]
|
||||
private AttributeCertificateIssuer issuer;
|
||||
|
||||
// Token: 0x0400587F RID: 22655
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x400587F")]
|
||||
private BigInteger serialNumber;
|
||||
|
||||
// Token: 0x04005880 RID: 22656
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4005880")]
|
||||
private ISet targetNames;
|
||||
|
||||
// Token: 0x04005881 RID: 22657
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4005881")]
|
||||
private ISet targetGroups;
|
||||
}
|
||||
}
|
||||
+179
@@ -0,0 +1,179 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x02001339 RID: 4921
|
||||
[Token(Token = "0x2001339")]
|
||||
[StructLayout(3)]
|
||||
public class X509CertPairStoreSelector : IX509Selector, ICloneable
|
||||
{
|
||||
// Token: 0x06007BC9 RID: 31689 RVA: 0x0019C498 File Offset: 0x0019A698
|
||||
[Token(Token = "0x6007BC9")]
|
||||
[Address(RVA = "0x52E0F0", Offset = "0x52CAF0", VA = "0x18052E0F0")]
|
||||
private static X509CertStoreSelector CloneSelector(X509CertStoreSelector s)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007BC9)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store.X509CertStoreSelector BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store.X509CertPairStoreSelector::CloneSelector(BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store.X509CertStoreSelector)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_13:
|
||||
brtrue(IL_13, cne:bool(ldloc:object(var_1_0C), ldc.i4:int32[exp:object](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: 0x06007BCA RID: 31690 RVA: 0x0019C4BC File Offset: 0x0019A6BC
|
||||
[Token(Token = "0x6007BCA")]
|
||||
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
||||
public X509CertPairStoreSelector()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06007BCB RID: 31691 RVA: 0x0019C4D0 File Offset: 0x0019A6D0
|
||||
[Token(Token = "0x6007BCB")]
|
||||
[Address(RVA = "0x52E340", Offset = "0x52CD40", VA = "0x18052E340")]
|
||||
private X509CertPairStoreSelector(X509CertPairStoreSelector o)
|
||||
{
|
||||
X509CertificatePair x509CertificatePair = o.certPair;
|
||||
this.certPair = x509CertificatePair;
|
||||
X509CertStoreSelector x509CertStoreSelector = X509CertPairStoreSelector.CloneSelector(o.forwardSelector);
|
||||
this.forwardSelector = x509CertStoreSelector;
|
||||
X509CertStoreSelector x509CertStoreSelector2 = X509CertPairStoreSelector.CloneSelector(o.reverseSelector);
|
||||
this.reverseSelector = x509CertStoreSelector2;
|
||||
}
|
||||
|
||||
// Token: 0x1700142A RID: 5162
|
||||
// (get) Token: 0x06007BCC RID: 31692 RVA: 0x0019C520 File Offset: 0x0019A720
|
||||
// (set) Token: 0x06007BCD RID: 31693 RVA: 0x0019C534 File Offset: 0x0019A734
|
||||
[Token(Token = "0x1700142A")]
|
||||
public X509CertificatePair CertPair
|
||||
{
|
||||
[Token(Token = "0x6007BCC")]
|
||||
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0")]
|
||||
get
|
||||
{
|
||||
return this.certPair;
|
||||
}
|
||||
[Token(Token = "0x6007BCD")]
|
||||
[Address(RVA = "0x3C39B0", Offset = "0x3C23B0", VA = "0x1803C39B0")]
|
||||
set
|
||||
{
|
||||
this.certPair = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700142B RID: 5163
|
||||
// (get) Token: 0x06007BCE RID: 31694 RVA: 0x0019C548 File Offset: 0x0019A748
|
||||
// (set) Token: 0x06007BCF RID: 31695 RVA: 0x0019C560 File Offset: 0x0019A760
|
||||
[Token(Token = "0x1700142B")]
|
||||
public X509CertStoreSelector ForwardSelector
|
||||
{
|
||||
[Token(Token = "0x6007BCE")]
|
||||
[Address(RVA = "0x52E3A0", Offset = "0x52CDA0", VA = "0x18052E3A0")]
|
||||
get
|
||||
{
|
||||
return X509CertPairStoreSelector.CloneSelector(this.forwardSelector);
|
||||
}
|
||||
[Token(Token = "0x6007BCF")]
|
||||
[Address(RVA = "0x52E3C0", Offset = "0x52CDC0", VA = "0x18052E3C0")]
|
||||
set
|
||||
{
|
||||
X509CertStoreSelector x509CertStoreSelector = X509CertPairStoreSelector.CloneSelector(value);
|
||||
this.forwardSelector = x509CertStoreSelector;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700142C RID: 5164
|
||||
// (get) Token: 0x06007BD0 RID: 31696 RVA: 0x0019C57C File Offset: 0x0019A77C
|
||||
// (set) Token: 0x06007BD1 RID: 31697 RVA: 0x0019C594 File Offset: 0x0019A794
|
||||
[Token(Token = "0x1700142C")]
|
||||
public X509CertStoreSelector ReverseSelector
|
||||
{
|
||||
[Token(Token = "0x6007BD0")]
|
||||
[Address(RVA = "0x52E3B0", Offset = "0x52CDB0", VA = "0x18052E3B0")]
|
||||
get
|
||||
{
|
||||
return X509CertPairStoreSelector.CloneSelector(this.reverseSelector);
|
||||
}
|
||||
[Token(Token = "0x6007BD1")]
|
||||
[Address(RVA = "0x52E3E0", Offset = "0x52CDE0", VA = "0x18052E3E0")]
|
||||
set
|
||||
{
|
||||
X509CertStoreSelector x509CertStoreSelector = X509CertPairStoreSelector.CloneSelector(value);
|
||||
this.reverseSelector = x509CertStoreSelector;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007BD2 RID: 31698 RVA: 0x0019C5B0 File Offset: 0x0019A7B0
|
||||
[Token(Token = "0x6007BD2")]
|
||||
[Address(RVA = "0x52E210", Offset = "0x52CC10", VA = "0x18052E210", Slot = "4")]
|
||||
public bool Match(object obj)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007BD2)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store.X509CertPairStoreSelector::Match(System.Object)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_3F:
|
||||
stloc:ArgumentNullException(var_4_49, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("obj")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x06007BD3 RID: 31699 RVA: 0x0019C608 File Offset: 0x0019A808
|
||||
[Token(Token = "0x6007BD3")]
|
||||
[Address(RVA = "0x52E190", Offset = "0x52CB90", VA = "0x18052E190", Slot = "5")]
|
||||
public object Clone()
|
||||
{
|
||||
X509CertPairStoreSelector x509CertPairStoreSelector = new X509CertPairStoreSelector();
|
||||
X509CertificatePair x509CertificatePair = this.certPair;
|
||||
x509CertPairStoreSelector.certPair = x509CertificatePair;
|
||||
X509CertStoreSelector x509CertStoreSelector = X509CertPairStoreSelector.CloneSelector(this.forwardSelector);
|
||||
x509CertPairStoreSelector.forwardSelector = x509CertStoreSelector;
|
||||
X509CertStoreSelector x509CertStoreSelector2 = X509CertPairStoreSelector.CloneSelector(this.reverseSelector);
|
||||
x509CertPairStoreSelector.reverseSelector = x509CertStoreSelector2;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x04005882 RID: 22658
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005882")]
|
||||
private X509CertificatePair certPair;
|
||||
|
||||
// Token: 0x04005883 RID: 22659
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4005883")]
|
||||
private X509CertStoreSelector forwardSelector;
|
||||
|
||||
// Token: 0x04005884 RID: 22660
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4005884")]
|
||||
private X509CertStoreSelector reverseSelector;
|
||||
}
|
||||
}
|
||||
+776
@@ -0,0 +1,776 @@
|
||||
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.Math;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Date;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x0200133A RID: 4922
|
||||
[Token(Token = "0x200133A")]
|
||||
[StructLayout(3)]
|
||||
public class X509CertStoreSelector : IX509Selector, ICloneable
|
||||
{
|
||||
// Token: 0x06007BD4 RID: 31700 RVA: 0x0019C654 File Offset: 0x0019A854
|
||||
[Token(Token = "0x6007BD4")]
|
||||
[Address(RVA = "0x52F390", Offset = "0x52DD90", VA = "0x18052F390")]
|
||||
public X509CertStoreSelector()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06007BD5 RID: 31701 RVA: 0x0019C678 File Offset: 0x0019A878
|
||||
[Token(Token = "0x6007BD5")]
|
||||
[Address(RVA = "0x52F1B0", Offset = "0x52DBB0", VA = "0x18052F1B0")]
|
||||
public X509CertStoreSelector(X509CertStoreSelector o)
|
||||
{
|
||||
byte[] array = Arrays.Clone(o.authorityKeyIdentifier);
|
||||
this.authorityKeyIdentifier = array;
|
||||
int num = o.basicConstraints;
|
||||
this.basicConstraints = num;
|
||||
X509Certificate x509Certificate = o.certificate;
|
||||
this.certificate = x509Certificate;
|
||||
DateTimeObject dateTimeObject = o.certificateValid;
|
||||
this.certificateValid = dateTimeObject;
|
||||
ISet set = o.extendedKeyUsage;
|
||||
if (set == 0)
|
||||
{
|
||||
}
|
||||
HashSet hashSet = new HashSet(set);
|
||||
this.extendedKeyUsage = hashSet;
|
||||
bool flag = o.ignoreX509NameOrdering;
|
||||
this.ignoreX509NameOrdering = flag;
|
||||
X509Name x509Name = o.issuer;
|
||||
this.issuer = x509Name;
|
||||
bool[] array2 = X509CertStoreSelector.CopyBoolArray(o.keyUsage);
|
||||
this.keyUsage = array2;
|
||||
ISet set2 = o.policy;
|
||||
HashSet hashSet2;
|
||||
if (set2 != 0)
|
||||
{
|
||||
hashSet2 = new HashSet(set2);
|
||||
}
|
||||
this.policy = hashSet2;
|
||||
DateTimeObject dateTimeObject2 = o.privateKeyValid;
|
||||
this.privateKeyValid = dateTimeObject2;
|
||||
BigInteger bigInteger = o.serialNumber;
|
||||
this.serialNumber = bigInteger;
|
||||
X509Name x509Name2 = o.subject;
|
||||
this.subject = x509Name2;
|
||||
byte[] array3 = Arrays.Clone(o.subjectKeyIdentifier);
|
||||
this.subjectKeyIdentifier = array3;
|
||||
SubjectPublicKeyInfo subjectPublicKeyInfo = o.subjectPublicKey;
|
||||
this.subjectPublicKey = subjectPublicKeyInfo;
|
||||
DerObjectIdentifier derObjectIdentifier = o.subjectPublicKeyAlgID;
|
||||
this.subjectPublicKeyAlgID = derObjectIdentifier;
|
||||
}
|
||||
|
||||
// Token: 0x06007BD6 RID: 31702 RVA: 0x0019C7B8 File Offset: 0x0019A9B8
|
||||
[Token(Token = "0x6007BD6")]
|
||||
[Address(RVA = "0x52E400", Offset = "0x52CE00", VA = "0x18052E400", Slot = "6")]
|
||||
public virtual object Clone()
|
||||
{
|
||||
X509CertStoreSelector x509CertStoreSelector = new X509CertStoreSelector();
|
||||
x509CertStoreSelector.basicConstraints = (int)((ulong)4294967295L);
|
||||
byte[] array = Arrays.Clone(this.authorityKeyIdentifier);
|
||||
x509CertStoreSelector.authorityKeyIdentifier = array;
|
||||
int num = this.basicConstraints;
|
||||
x509CertStoreSelector.basicConstraints = num;
|
||||
X509Certificate x509Certificate = this.certificate;
|
||||
x509CertStoreSelector.certificate = x509Certificate;
|
||||
DateTimeObject dateTimeObject = this.certificateValid;
|
||||
x509CertStoreSelector.certificateValid = dateTimeObject;
|
||||
ISet set = this.extendedKeyUsage;
|
||||
if (set == 0)
|
||||
{
|
||||
}
|
||||
HashSet hashSet = new HashSet(set);
|
||||
x509CertStoreSelector.extendedKeyUsage = hashSet;
|
||||
bool flag = this.ignoreX509NameOrdering;
|
||||
x509CertStoreSelector.ignoreX509NameOrdering = flag;
|
||||
X509Name x509Name = this.issuer;
|
||||
x509CertStoreSelector.issuer = x509Name;
|
||||
bool[] array2 = X509CertStoreSelector.CopyBoolArray(this.keyUsage);
|
||||
x509CertStoreSelector.keyUsage = array2;
|
||||
ISet set2 = this.policy;
|
||||
HashSet hashSet2;
|
||||
if (set2 != 0)
|
||||
{
|
||||
hashSet2 = new HashSet(set2);
|
||||
}
|
||||
x509CertStoreSelector.policy = hashSet2;
|
||||
DateTimeObject dateTimeObject2 = this.privateKeyValid;
|
||||
x509CertStoreSelector.privateKeyValid = dateTimeObject2;
|
||||
BigInteger bigInteger = this.serialNumber;
|
||||
x509CertStoreSelector.serialNumber = bigInteger;
|
||||
X509Name x509Name2 = this.subject;
|
||||
x509CertStoreSelector.subject = x509Name2;
|
||||
byte[] array3 = Arrays.Clone(this.subjectKeyIdentifier);
|
||||
x509CertStoreSelector.subjectKeyIdentifier = array3;
|
||||
SubjectPublicKeyInfo subjectPublicKeyInfo = this.subjectPublicKey;
|
||||
x509CertStoreSelector.subjectPublicKey = subjectPublicKeyInfo;
|
||||
DerObjectIdentifier derObjectIdentifier = this.subjectPublicKeyAlgID;
|
||||
x509CertStoreSelector.subjectPublicKeyAlgID = derObjectIdentifier;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x1700142D RID: 5165
|
||||
// (get) Token: 0x06007BD7 RID: 31703 RVA: 0x0019C8F8 File Offset: 0x0019AAF8
|
||||
// (set) Token: 0x06007BD8 RID: 31704 RVA: 0x0019C910 File Offset: 0x0019AB10
|
||||
[Token(Token = "0x1700142D")]
|
||||
public byte[] AuthorityKeyIdentifier
|
||||
{
|
||||
[Token(Token = "0x6007BD7")]
|
||||
[Address(RVA = "0x52F3A0", Offset = "0x52DDA0", VA = "0x18052F3A0")]
|
||||
get
|
||||
{
|
||||
return Arrays.Clone(this.authorityKeyIdentifier);
|
||||
}
|
||||
[Token(Token = "0x6007BD8")]
|
||||
[Address(RVA = "0x52F5B0", Offset = "0x52DFB0", VA = "0x18052F5B0")]
|
||||
set
|
||||
{
|
||||
byte[] array = Arrays.Clone(value);
|
||||
this.authorityKeyIdentifier = array;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700142E RID: 5166
|
||||
// (get) Token: 0x06007BD9 RID: 31705 RVA: 0x0019C92C File Offset: 0x0019AB2C
|
||||
// (set) Token: 0x06007BDA RID: 31706 RVA: 0x0019C940 File Offset: 0x0019AB40
|
||||
[Token(Token = "0x1700142E")]
|
||||
public int BasicConstraints
|
||||
{
|
||||
[Token(Token = "0x6007BD9")]
|
||||
[Address(RVA = "0x3EE8D0", Offset = "0x3ED2D0", VA = "0x1803EE8D0")]
|
||||
get
|
||||
{
|
||||
return this.basicConstraints;
|
||||
}
|
||||
[Token(Token = "0x6007BDA")]
|
||||
[Address(RVA = "0x52F620", Offset = "0x52E020", VA = "0x18052F620")]
|
||||
set
|
||||
{
|
||||
this.basicConstraints = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700142F RID: 5167
|
||||
// (get) Token: 0x06007BDB RID: 31707 RVA: 0x0019C964 File Offset: 0x0019AB64
|
||||
// (set) Token: 0x06007BDC RID: 31708 RVA: 0x0019C978 File Offset: 0x0019AB78
|
||||
[Token(Token = "0x1700142F")]
|
||||
public X509Certificate Certificate
|
||||
{
|
||||
[Token(Token = "0x6007BDB")]
|
||||
[Address(RVA = "0x3C1220", Offset = "0x3BFC20", VA = "0x1803C1220")]
|
||||
get
|
||||
{
|
||||
return this.certificate;
|
||||
}
|
||||
[Token(Token = "0x6007BDC")]
|
||||
[Address(RVA = "0x3C1260", Offset = "0x3BFC60", VA = "0x1803C1260")]
|
||||
set
|
||||
{
|
||||
this.certificate = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001430 RID: 5168
|
||||
// (get) Token: 0x06007BDD RID: 31709 RVA: 0x0019C98C File Offset: 0x0019AB8C
|
||||
// (set) Token: 0x06007BDE RID: 31710 RVA: 0x0019C9A0 File Offset: 0x0019ABA0
|
||||
[Token(Token = "0x17001430")]
|
||||
public DateTimeObject CertificateValid
|
||||
{
|
||||
[Token(Token = "0x6007BDD")]
|
||||
[Address(RVA = "0x3C1230", Offset = "0x3BFC30", VA = "0x1803C1230")]
|
||||
get
|
||||
{
|
||||
return this.certificateValid;
|
||||
}
|
||||
[Token(Token = "0x6007BDE")]
|
||||
[Address(RVA = "0x3C1270", Offset = "0x3BFC70", VA = "0x1803C1270")]
|
||||
set
|
||||
{
|
||||
this.certificateValid = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001431 RID: 5169
|
||||
// (get) Token: 0x06007BDF RID: 31711 RVA: 0x0019C9B4 File Offset: 0x0019ABB4
|
||||
// (set) Token: 0x06007BE0 RID: 31712 RVA: 0x0019C9D4 File Offset: 0x0019ABD4
|
||||
[Token(Token = "0x17001431")]
|
||||
public ISet ExtendedKeyUsage
|
||||
{
|
||||
[Token(Token = "0x6007BDF")]
|
||||
[Address(RVA = "0x52F400", Offset = "0x52DE00", VA = "0x18052F400")]
|
||||
get
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007BDF)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections.ISet BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store.X509CertStoreSelector::get_ExtendedKeyUsage()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_0D:
|
||||
stloc:HashSet(var_2_13, newobj:HashSet(HashSet::.ctor, ldloc:ISet[exp:IEnumerable](var_0_06)))
|
||||
}
|
||||
|
||||
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(Token = "0x6007BE0")]
|
||||
[Address(RVA = "0x52F6A0", Offset = "0x52E0A0", VA = "0x18052F6A0")]
|
||||
set
|
||||
{
|
||||
if (value == 0)
|
||||
{
|
||||
this.extendedKeyUsage = value;
|
||||
return;
|
||||
}
|
||||
HashSet hashSet = new HashSet(value);
|
||||
this.extendedKeyUsage = hashSet;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001432 RID: 5170
|
||||
// (get) Token: 0x06007BE1 RID: 31713 RVA: 0x0019C9FC File Offset: 0x0019ABFC
|
||||
// (set) Token: 0x06007BE2 RID: 31714 RVA: 0x0019CA10 File Offset: 0x0019AC10
|
||||
[Token(Token = "0x17001432")]
|
||||
public bool IgnoreX509NameOrdering
|
||||
{
|
||||
[Token(Token = "0x6007BE1")]
|
||||
[Address(RVA = "0x52F470", Offset = "0x52DE70", VA = "0x18052F470")]
|
||||
get
|
||||
{
|
||||
return this.ignoreX509NameOrdering;
|
||||
}
|
||||
[Token(Token = "0x6007BE2")]
|
||||
[Address(RVA = "0x52F720", Offset = "0x52E120", VA = "0x18052F720")]
|
||||
set
|
||||
{
|
||||
this.ignoreX509NameOrdering = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001433 RID: 5171
|
||||
// (get) Token: 0x06007BE3 RID: 31715 RVA: 0x0019CA24 File Offset: 0x0019AC24
|
||||
// (set) Token: 0x06007BE4 RID: 31716 RVA: 0x0019CA38 File Offset: 0x0019AC38
|
||||
[Token(Token = "0x17001433")]
|
||||
public X509Name Issuer
|
||||
{
|
||||
[Token(Token = "0x6007BE3")]
|
||||
[Address(RVA = "0x3D32F0", Offset = "0x3D1CF0", VA = "0x1803D32F0")]
|
||||
get
|
||||
{
|
||||
return this.issuer;
|
||||
}
|
||||
[Token(Token = "0x6007BE4")]
|
||||
[Address(RVA = "0x3D3460", Offset = "0x3D1E60", VA = "0x1803D3460")]
|
||||
set
|
||||
{
|
||||
this.issuer = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001434 RID: 5172
|
||||
// (get) Token: 0x06007BE5 RID: 31717 RVA: 0x0019CA4C File Offset: 0x0019AC4C
|
||||
[Token(Token = "0x17001434")]
|
||||
[Obsolete]
|
||||
public string IssuerAsString
|
||||
{
|
||||
[Token(Token = "0x6007BE5")]
|
||||
[Address(RVA = "0x52F480", Offset = "0x52DE80", VA = "0x18052F480")]
|
||||
get
|
||||
{
|
||||
X509Name x509Name = this.issuer;
|
||||
if (x509Name != 0)
|
||||
{
|
||||
Asn1Object asn1Object = x509Name.ToAsn1Object();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001435 RID: 5173
|
||||
// (get) Token: 0x06007BE6 RID: 31718 RVA: 0x0019CA6C File Offset: 0x0019AC6C
|
||||
// (set) Token: 0x06007BE7 RID: 31719 RVA: 0x0019CA84 File Offset: 0x0019AC84
|
||||
[Token(Token = "0x17001435")]
|
||||
public bool[] KeyUsage
|
||||
{
|
||||
[Token(Token = "0x6007BE6")]
|
||||
[Address(RVA = "0x52F4A0", Offset = "0x52DEA0", VA = "0x18052F4A0")]
|
||||
get
|
||||
{
|
||||
return X509CertStoreSelector.CopyBoolArray(this.keyUsage);
|
||||
}
|
||||
[Token(Token = "0x6007BE7")]
|
||||
[Address(RVA = "0x52F730", Offset = "0x52E130", VA = "0x18052F730")]
|
||||
set
|
||||
{
|
||||
bool[] array = X509CertStoreSelector.CopyBoolArray(value);
|
||||
this.keyUsage = array;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001436 RID: 5174
|
||||
// (get) Token: 0x06007BE8 RID: 31720 RVA: 0x0019CAA0 File Offset: 0x0019ACA0
|
||||
// (set) Token: 0x06007BE9 RID: 31721 RVA: 0x0019CAC0 File Offset: 0x0019ACC0
|
||||
[Token(Token = "0x17001436")]
|
||||
public ISet Policy
|
||||
{
|
||||
[Token(Token = "0x6007BE8")]
|
||||
[Address(RVA = "0x52F4B0", Offset = "0x52DEB0", VA = "0x18052F4B0")]
|
||||
get
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007BE8)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections.ISet BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store.X509CertStoreSelector::get_Policy()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_0D:
|
||||
stloc:HashSet(var_2_13, newobj:HashSet(HashSet::.ctor, ldloc:ISet[exp:IEnumerable](var_0_06)))
|
||||
}
|
||||
|
||||
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(Token = "0x6007BE9")]
|
||||
[Address(RVA = "0x52F750", Offset = "0x52E150", VA = "0x18052F750")]
|
||||
set
|
||||
{
|
||||
if (value == 0)
|
||||
{
|
||||
this.policy = value;
|
||||
return;
|
||||
}
|
||||
HashSet hashSet = new HashSet(value);
|
||||
this.policy = hashSet;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001437 RID: 5175
|
||||
// (get) Token: 0x06007BEA RID: 31722 RVA: 0x0019CAE8 File Offset: 0x0019ACE8
|
||||
// (set) Token: 0x06007BEB RID: 31723 RVA: 0x0019CAFC File Offset: 0x0019ACFC
|
||||
[Token(Token = "0x17001437")]
|
||||
public DateTimeObject PrivateKeyValid
|
||||
{
|
||||
[Token(Token = "0x6007BEA")]
|
||||
[Address(RVA = "0x4B81A0", Offset = "0x4B6BA0", VA = "0x1804B81A0")]
|
||||
get
|
||||
{
|
||||
return this.privateKeyValid;
|
||||
}
|
||||
[Token(Token = "0x6007BEB")]
|
||||
[Address(RVA = "0x3EDEB0", Offset = "0x3EC8B0", VA = "0x1803EDEB0")]
|
||||
set
|
||||
{
|
||||
this.privateKeyValid = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001438 RID: 5176
|
||||
// (get) Token: 0x06007BEC RID: 31724 RVA: 0x0019CB10 File Offset: 0x0019AD10
|
||||
// (set) Token: 0x06007BED RID: 31725 RVA: 0x0019CB24 File Offset: 0x0019AD24
|
||||
[Token(Token = "0x17001438")]
|
||||
public BigInteger SerialNumber
|
||||
{
|
||||
[Token(Token = "0x6007BEC")]
|
||||
[Address(RVA = "0x3EDE90", Offset = "0x3EC890", VA = "0x1803EDE90")]
|
||||
get
|
||||
{
|
||||
return this.serialNumber;
|
||||
}
|
||||
[Token(Token = "0x6007BED")]
|
||||
[Address(RVA = "0x3EDEC0", Offset = "0x3EC8C0", VA = "0x1803EDEC0")]
|
||||
set
|
||||
{
|
||||
this.serialNumber = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001439 RID: 5177
|
||||
// (get) Token: 0x06007BEE RID: 31726 RVA: 0x0019CB38 File Offset: 0x0019AD38
|
||||
// (set) Token: 0x06007BEF RID: 31727 RVA: 0x0019CB4C File Offset: 0x0019AD4C
|
||||
[Token(Token = "0x17001439")]
|
||||
public X509Name Subject
|
||||
{
|
||||
[Token(Token = "0x6007BEE")]
|
||||
[Address(RVA = "0x48F050", Offset = "0x48DA50", VA = "0x18048F050")]
|
||||
get
|
||||
{
|
||||
return this.subject;
|
||||
}
|
||||
[Token(Token = "0x6007BEF")]
|
||||
[Address(RVA = "0x52F860", Offset = "0x52E260", VA = "0x18052F860")]
|
||||
set
|
||||
{
|
||||
this.subject = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700143A RID: 5178
|
||||
// (get) Token: 0x06007BF0 RID: 31728 RVA: 0x0019CB60 File Offset: 0x0019AD60
|
||||
[Token(Token = "0x1700143A")]
|
||||
[Obsolete]
|
||||
public string SubjectAsString
|
||||
{
|
||||
[Token(Token = "0x6007BF0")]
|
||||
[Address(RVA = "0x52F520", Offset = "0x52DF20", VA = "0x18052F520")]
|
||||
get
|
||||
{
|
||||
X509Name x509Name = this.subject;
|
||||
if (x509Name != 0)
|
||||
{
|
||||
Asn1Object asn1Object = x509Name.ToAsn1Object();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700143B RID: 5179
|
||||
// (get) Token: 0x06007BF1 RID: 31729 RVA: 0x0019CB80 File Offset: 0x0019AD80
|
||||
// (set) Token: 0x06007BF2 RID: 31730 RVA: 0x0019CB98 File Offset: 0x0019AD98
|
||||
[Token(Token = "0x1700143B")]
|
||||
public byte[] SubjectKeyIdentifier
|
||||
{
|
||||
[Token(Token = "0x6007BF1")]
|
||||
[Address(RVA = "0x52F540", Offset = "0x52DF40", VA = "0x18052F540")]
|
||||
get
|
||||
{
|
||||
return Arrays.Clone(this.subjectKeyIdentifier);
|
||||
}
|
||||
[Token(Token = "0x6007BF2")]
|
||||
[Address(RVA = "0x52F7D0", Offset = "0x52E1D0", VA = "0x18052F7D0")]
|
||||
set
|
||||
{
|
||||
byte[] array = Arrays.Clone(value);
|
||||
this.subjectKeyIdentifier = array;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700143C RID: 5180
|
||||
// (get) Token: 0x06007BF3 RID: 31731 RVA: 0x0019CBB4 File Offset: 0x0019ADB4
|
||||
// (set) Token: 0x06007BF4 RID: 31732 RVA: 0x0019CBC8 File Offset: 0x0019ADC8
|
||||
[Token(Token = "0x1700143C")]
|
||||
public SubjectPublicKeyInfo SubjectPublicKey
|
||||
{
|
||||
[Token(Token = "0x6007BF3")]
|
||||
[Address(RVA = "0x501250", Offset = "0x4FFC50", VA = "0x180501250")]
|
||||
get
|
||||
{
|
||||
return this.subjectPublicKey;
|
||||
}
|
||||
[Token(Token = "0x6007BF4")]
|
||||
[Address(RVA = "0x52F850", Offset = "0x52E250", VA = "0x18052F850")]
|
||||
set
|
||||
{
|
||||
this.subjectPublicKey = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700143D RID: 5181
|
||||
// (get) Token: 0x06007BF5 RID: 31733 RVA: 0x0019CBDC File Offset: 0x0019ADDC
|
||||
// (set) Token: 0x06007BF6 RID: 31734 RVA: 0x0019CBF0 File Offset: 0x0019ADF0
|
||||
[Token(Token = "0x1700143D")]
|
||||
public DerObjectIdentifier SubjectPublicKeyAlgID
|
||||
{
|
||||
[Token(Token = "0x6007BF5")]
|
||||
[Address(RVA = "0x52F5A0", Offset = "0x52DFA0", VA = "0x18052F5A0")]
|
||||
get
|
||||
{
|
||||
return this.subjectPublicKeyAlgID;
|
||||
}
|
||||
[Token(Token = "0x6007BF6")]
|
||||
[Address(RVA = "0x52F840", Offset = "0x52E240", VA = "0x18052F840")]
|
||||
set
|
||||
{
|
||||
this.subjectPublicKeyAlgID = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007BF7 RID: 31735 RVA: 0x0019CC04 File Offset: 0x0019AE04
|
||||
[Token(Token = "0x6007BF7")]
|
||||
[Address(RVA = "0x52E830", Offset = "0x52D230", VA = "0x18052E830", Slot = "7")]
|
||||
public virtual bool Match(object obj)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
int num = 0;
|
||||
if (obj != 0 && obj != 0)
|
||||
{
|
||||
byte[] array = this.authorityKeyIdentifier;
|
||||
bool flag;
|
||||
if (!flag || (this.basicConstraints != -1 && this.basicConstraints != -2))
|
||||
{
|
||||
}
|
||||
}
|
||||
IL_2D:
|
||||
if (this.certificate != 0)
|
||||
{
|
||||
}
|
||||
if (this.certificateValid != 0)
|
||||
{
|
||||
}
|
||||
if (this.extendedKeyUsage != num)
|
||||
{
|
||||
ISet set = this.extendedKeyUsage;
|
||||
int num2 = 0;
|
||||
if (num != -1)
|
||||
{
|
||||
if (typeof(IDisposable).TypeHandle == (ulong)735L)
|
||||
{
|
||||
}
|
||||
if (typeof(IDisposable).TypeHandle == (ulong)227L)
|
||||
{
|
||||
}
|
||||
}
|
||||
if (num2 != 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (this.issuer != 0)
|
||||
{
|
||||
bool flag2 = !this.ignoreX509NameOrdering;
|
||||
bool flag3;
|
||||
while (!flag3)
|
||||
{
|
||||
}
|
||||
}
|
||||
if (this.keyUsage != (ulong)0L)
|
||||
{
|
||||
bool[] array2 = this.keyUsage;
|
||||
num++;
|
||||
}
|
||||
if (this.policy == (ulong)0L)
|
||||
{
|
||||
goto IL_FD;
|
||||
}
|
||||
Asn1Object asn1Object;
|
||||
Asn1Sequence instance = Asn1Sequence.GetInstance(asn1Object);
|
||||
ISet set2 = this.policy;
|
||||
if (instance < (ulong)1L)
|
||||
{
|
||||
}
|
||||
IEnumerator enumerator = instance.GetEnumerator();
|
||||
if (enumerator != 0)
|
||||
{
|
||||
ISet set3 = this.policy;
|
||||
while (enumerator == 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
if (-1 != 0)
|
||||
{
|
||||
}
|
||||
if (18446744073709551615UL != (ulong)(-1L))
|
||||
{
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
goto IL_2D;
|
||||
}
|
||||
while ((ulong)1L == 0UL)
|
||||
{
|
||||
}
|
||||
IL_FD:
|
||||
if (this.privateKeyValid != (ulong)0L)
|
||||
{
|
||||
Asn1Object asn1Object2;
|
||||
PrivateKeyUsagePeriod instance2 = PrivateKeyUsagePeriod.GetInstance(asn1Object2);
|
||||
DateTimeObject dateTimeObject = this.privateKeyValid;
|
||||
DateTime dateTime = instance2._notAfter.ToDateTime();
|
||||
DateTime dateTime2 = instance2._notBefore.ToDateTime();
|
||||
}
|
||||
if (this.serialNumber != 0)
|
||||
{
|
||||
}
|
||||
if (this.subject != 0)
|
||||
{
|
||||
bool flag4;
|
||||
while (!flag4)
|
||||
{
|
||||
}
|
||||
}
|
||||
byte[] array3 = this.subjectKeyIdentifier;
|
||||
bool flag5;
|
||||
while (!flag5)
|
||||
{
|
||||
}
|
||||
if (this.subjectPublicKey != 0)
|
||||
{
|
||||
SubjectPublicKeyInfo subjectPublicKeyInfo;
|
||||
while (subjectPublicKeyInfo == 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
if (this.subjectPublicKeyAlgID != 0)
|
||||
{
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007BF8 RID: 31736 RVA: 0x0019CD94 File Offset: 0x0019AF94
|
||||
[Token(Token = "0x6007BF8")]
|
||||
[Address(RVA = "0x52E730", Offset = "0x52D130", VA = "0x18052E730")]
|
||||
internal static bool IssuersMatch(X509Name a, X509Name b)
|
||||
{
|
||||
if (a == 0)
|
||||
{
|
||||
return b == 0;
|
||||
}
|
||||
return a.Equivalent(b, true);
|
||||
}
|
||||
|
||||
// Token: 0x06007BF9 RID: 31737 RVA: 0x0019CDB4 File Offset: 0x0019AFB4
|
||||
[Token(Token = "0x6007BF9")]
|
||||
[Address(RVA = "0x52E610", Offset = "0x52D010", VA = "0x18052E610")]
|
||||
private static bool[] CopyBoolArray(bool[] b)
|
||||
{
|
||||
while (b != 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007BFA RID: 31738 RVA: 0x0019CDC8 File Offset: 0x0019AFC8
|
||||
[Token(Token = "0x6007BFA")]
|
||||
[Address(RVA = "0x52E690", Offset = "0x52D090", VA = "0x18052E690")]
|
||||
private static ISet CopySet(ISet s)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007BFA)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections.ISet BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store.X509CertStoreSelector::CopySet(BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections.ISet)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_06:
|
||||
stloc:HashSet(var_1_0C, newobj:HashSet(HashSet::.ctor, ldloc:ISet[exp:IEnumerable](s)))
|
||||
}
|
||||
|
||||
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: 0x06007BFB RID: 31739 RVA: 0x0019CDE4 File Offset: 0x0019AFE4
|
||||
[Token(Token = "0x6007BFB")]
|
||||
[Address(RVA = "0x52E700", Offset = "0x52D100", VA = "0x18052E700")]
|
||||
private static SubjectPublicKeyInfo GetSubjectPublicKey(X509Certificate c)
|
||||
{
|
||||
SubjectPublicKeyInfo subjectPublicKeyInfo;
|
||||
return subjectPublicKeyInfo;
|
||||
}
|
||||
|
||||
// Token: 0x06007BFC RID: 31740 RVA: 0x0019CDF8 File Offset: 0x0019AFF8
|
||||
[Token(Token = "0x6007BFC")]
|
||||
[Address(RVA = "0x52E750", Offset = "0x52D150", VA = "0x18052E750")]
|
||||
private static bool MatchExtension(byte[] b, X509Certificate c, DerObjectIdentifier oid)
|
||||
{
|
||||
bool flag;
|
||||
return b == 0 || c.GetCriticalExtensionOids() == 0 || flag;
|
||||
}
|
||||
|
||||
// Token: 0x04005885 RID: 22661
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005885")]
|
||||
private byte[] authorityKeyIdentifier;
|
||||
|
||||
// Token: 0x04005886 RID: 22662
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4005886")]
|
||||
private int basicConstraints = (int)((ulong)4294967295L);
|
||||
|
||||
// Token: 0x04005887 RID: 22663
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4005887")]
|
||||
private X509Certificate certificate;
|
||||
|
||||
// Token: 0x04005888 RID: 22664
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4005888")]
|
||||
private DateTimeObject certificateValid;
|
||||
|
||||
// Token: 0x04005889 RID: 22665
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4005889")]
|
||||
private ISet extendedKeyUsage;
|
||||
|
||||
// Token: 0x0400588A RID: 22666
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x400588A")]
|
||||
private bool ignoreX509NameOrdering;
|
||||
|
||||
// Token: 0x0400588B RID: 22667
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x400588B")]
|
||||
private X509Name issuer;
|
||||
|
||||
// Token: 0x0400588C RID: 22668
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x400588C")]
|
||||
private bool[] keyUsage;
|
||||
|
||||
// Token: 0x0400588D RID: 22669
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x400588D")]
|
||||
private ISet policy;
|
||||
|
||||
// Token: 0x0400588E RID: 22670
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x400588E")]
|
||||
private DateTimeObject privateKeyValid;
|
||||
|
||||
// Token: 0x0400588F RID: 22671
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x400588F")]
|
||||
private BigInteger serialNumber;
|
||||
|
||||
// Token: 0x04005890 RID: 22672
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x68")]
|
||||
[Token(Token = "0x4005890")]
|
||||
private X509Name subject;
|
||||
|
||||
// Token: 0x04005891 RID: 22673
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x4005891")]
|
||||
private byte[] subjectKeyIdentifier;
|
||||
|
||||
// Token: 0x04005892 RID: 22674
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x78")]
|
||||
[Token(Token = "0x4005892")]
|
||||
private SubjectPublicKeyInfo subjectPublicKey;
|
||||
|
||||
// Token: 0x04005893 RID: 22675
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x80")]
|
||||
[Token(Token = "0x4005893")]
|
||||
private DerObjectIdentifier subjectPublicKeyAlgID;
|
||||
}
|
||||
}
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x0200133B RID: 4923
|
||||
[Token(Token = "0x200133B")]
|
||||
[StructLayout(3)]
|
||||
internal class X509CollectionStore : IX509Store
|
||||
{
|
||||
// Token: 0x06007BFD RID: 31741 RVA: 0x0019CE1C File Offset: 0x0019B01C
|
||||
[Token(Token = "0x6007BFD")]
|
||||
[Address(RVA = "0x532E90", Offset = "0x531890", VA = "0x180532E90")]
|
||||
internal X509CollectionStore(ICollection collection)
|
||||
{
|
||||
IList list = Platform.CreateArrayList(collection);
|
||||
this._local = list;
|
||||
}
|
||||
|
||||
// Token: 0x06007BFE RID: 31742 RVA: 0x0019CE40 File Offset: 0x0019B040
|
||||
[Token(Token = "0x6007BFE")]
|
||||
[Address(RVA = "0x532BE0", Offset = "0x5315E0", VA = "0x180532BE0", Slot = "4")]
|
||||
public ICollection GetMatches(IX509Selector selector)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
if (selector == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
IList list = Platform.CreateArrayList();
|
||||
ICollection local = this._local;
|
||||
if (list != 0)
|
||||
{
|
||||
if (num < list)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
uint num2;
|
||||
if (num < (int)num2)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
while (num == 0)
|
||||
{
|
||||
}
|
||||
num++;
|
||||
num += 19;
|
||||
num += 19;
|
||||
}
|
||||
if (num != 0)
|
||||
{
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
IList list2 = Platform.CreateArrayList(this._local);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x04005894 RID: 22676
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005894")]
|
||||
private ICollection _local;
|
||||
}
|
||||
}
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x0200133C RID: 4924
|
||||
[Token(Token = "0x200133C")]
|
||||
[StructLayout(3)]
|
||||
public class X509CollectionStoreParameters : IX509StoreParameters
|
||||
{
|
||||
// Token: 0x06007BFF RID: 31743 RVA: 0x0019CEB8 File Offset: 0x0019B0B8
|
||||
[Token(Token = "0x6007BFF")]
|
||||
[Address(RVA = "0x532B30", Offset = "0x531530", VA = "0x180532B30")]
|
||||
public X509CollectionStoreParameters(ICollection collection)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007BFF)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store.X509CollectionStoreParameters::.ctor(System.Collections.ICollection)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_19:
|
||||
stloc:ArgumentNullException(var_1_23, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("collection")))
|
||||
}
|
||||
|
||||
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: 0x06007C00 RID: 31744 RVA: 0x0019CEE8 File Offset: 0x0019B0E8
|
||||
[Token(Token = "0x6007C00")]
|
||||
[Address(RVA = "0x532A10", Offset = "0x531410", VA = "0x180532A10")]
|
||||
public ICollection GetCollection()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007C00)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.ICollection BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store.X509CollectionStoreParameters::GetCollection()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:IList(var_0_0B, call:IList(Platform::CreateArrayList, ldfld:IList[exp:ICollection](X509CollectionStoreParameters::collection, ldloc:X509CollectionStoreParameters(this))))
|
||||
}
|
||||
|
||||
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: 0x06007C01 RID: 31745 RVA: 0x0019CF00 File Offset: 0x0019B100
|
||||
[Token(Token = "0x6007C01")]
|
||||
[Address(RVA = "0x532A70", Offset = "0x531470", VA = "0x180532A70", Slot = "3")]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
StringBuilder stringBuilder2 = stringBuilder.Append("X509CollectionStoreParameters: [\n");
|
||||
string text;
|
||||
StringBuilder stringBuilder3 = stringBuilder.Append(text);
|
||||
StringBuilder stringBuilder4 = stringBuilder.Append("]");
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x04005895 RID: 22677
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005895")]
|
||||
private readonly IList collection;
|
||||
}
|
||||
}
|
||||
+476
@@ -0,0 +1,476 @@
|
||||
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.Math;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Date;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x0200133D RID: 4925
|
||||
[Token(Token = "0x200133D")]
|
||||
[StructLayout(3)]
|
||||
public class X509CrlStoreSelector : IX509Selector, ICloneable
|
||||
{
|
||||
// Token: 0x06007C02 RID: 31746 RVA: 0x0019CF3C File Offset: 0x0019B13C
|
||||
[Token(Token = "0x6007C02")]
|
||||
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
||||
public X509CrlStoreSelector()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06007C03 RID: 31747 RVA: 0x0019CF50 File Offset: 0x0019B150
|
||||
[Token(Token = "0x6007C03")]
|
||||
[Address(RVA = "0x534BB0", Offset = "0x5335B0", VA = "0x180534BB0")]
|
||||
public X509CrlStoreSelector(X509CrlStoreSelector o)
|
||||
{
|
||||
X509Certificate x509Certificate = o.certificateChecking;
|
||||
this.certificateChecking = x509Certificate;
|
||||
DateTimeObject dateTimeObject = o.dateAndTime;
|
||||
this.dateAndTime = dateTimeObject;
|
||||
IList list = Platform.CreateArrayList(o.issuers);
|
||||
this.issuers = list;
|
||||
BigInteger bigInteger = o.maxCrlNumber;
|
||||
this.maxCrlNumber = bigInteger;
|
||||
BigInteger bigInteger2 = o.minCrlNumber;
|
||||
this.minCrlNumber = bigInteger2;
|
||||
bool flag = o.deltaCrlIndicatorEnabled;
|
||||
this.deltaCrlIndicatorEnabled = flag;
|
||||
bool flag2 = o.completeCrlEnabled;
|
||||
this.completeCrlEnabled = flag2;
|
||||
BigInteger bigInteger3 = o.maxBaseCrlNumber;
|
||||
this.maxBaseCrlNumber = bigInteger3;
|
||||
IX509AttributeCertificate ix509AttributeCertificate = o.attrCertChecking;
|
||||
this.attrCertChecking = ix509AttributeCertificate;
|
||||
bool flag3 = o.issuingDistributionPointEnabled;
|
||||
this.issuingDistributionPointEnabled = flag3;
|
||||
byte[] array = Arrays.Clone(o.issuingDistributionPoint);
|
||||
this.issuingDistributionPoint = array;
|
||||
}
|
||||
|
||||
// Token: 0x06007C04 RID: 31748 RVA: 0x0019D01C File Offset: 0x0019B21C
|
||||
[Token(Token = "0x6007C04")]
|
||||
[Address(RVA = "0x5344E0", Offset = "0x532EE0", VA = "0x1805344E0", Slot = "6")]
|
||||
public virtual object Clone()
|
||||
{
|
||||
X509CrlStoreSelector x509CrlStoreSelector = new X509CrlStoreSelector();
|
||||
X509Certificate x509Certificate = this.certificateChecking;
|
||||
x509CrlStoreSelector.certificateChecking = x509Certificate;
|
||||
DateTimeObject dateTimeObject = this.dateAndTime;
|
||||
x509CrlStoreSelector.dateAndTime = dateTimeObject;
|
||||
IList list = Platform.CreateArrayList(this.issuers);
|
||||
x509CrlStoreSelector.issuers = list;
|
||||
BigInteger bigInteger = this.maxCrlNumber;
|
||||
x509CrlStoreSelector.maxCrlNumber = bigInteger;
|
||||
BigInteger bigInteger2 = this.minCrlNumber;
|
||||
x509CrlStoreSelector.minCrlNumber = bigInteger2;
|
||||
bool flag = this.deltaCrlIndicatorEnabled;
|
||||
x509CrlStoreSelector.deltaCrlIndicatorEnabled = flag;
|
||||
bool flag2 = this.completeCrlEnabled;
|
||||
x509CrlStoreSelector.completeCrlEnabled = flag2;
|
||||
BigInteger bigInteger3 = this.maxBaseCrlNumber;
|
||||
x509CrlStoreSelector.maxBaseCrlNumber = bigInteger3;
|
||||
IX509AttributeCertificate ix509AttributeCertificate = this.attrCertChecking;
|
||||
x509CrlStoreSelector.attrCertChecking = ix509AttributeCertificate;
|
||||
bool flag3 = this.issuingDistributionPointEnabled;
|
||||
x509CrlStoreSelector.issuingDistributionPointEnabled = flag3;
|
||||
byte[] array = Arrays.Clone(this.issuingDistributionPoint);
|
||||
x509CrlStoreSelector.issuingDistributionPoint = array;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x1700143E RID: 5182
|
||||
// (get) Token: 0x06007C05 RID: 31749 RVA: 0x0019D0E8 File Offset: 0x0019B2E8
|
||||
// (set) Token: 0x06007C06 RID: 31750 RVA: 0x0019D0FC File Offset: 0x0019B2FC
|
||||
[Token(Token = "0x1700143E")]
|
||||
public X509Certificate CertificateChecking
|
||||
{
|
||||
[Token(Token = "0x6007C05")]
|
||||
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0")]
|
||||
get
|
||||
{
|
||||
return this.certificateChecking;
|
||||
}
|
||||
[Token(Token = "0x6007C06")]
|
||||
[Address(RVA = "0x3C39B0", Offset = "0x3C23B0", VA = "0x1803C39B0")]
|
||||
set
|
||||
{
|
||||
this.certificateChecking = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700143F RID: 5183
|
||||
// (get) Token: 0x06007C07 RID: 31751 RVA: 0x0019D110 File Offset: 0x0019B310
|
||||
// (set) Token: 0x06007C08 RID: 31752 RVA: 0x0019D124 File Offset: 0x0019B324
|
||||
[Token(Token = "0x1700143F")]
|
||||
public DateTimeObject DateAndTime
|
||||
{
|
||||
[Token(Token = "0x6007C07")]
|
||||
[Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240")]
|
||||
get
|
||||
{
|
||||
return this.dateAndTime;
|
||||
}
|
||||
[Token(Token = "0x6007C08")]
|
||||
[Address(RVA = "0x3C1280", Offset = "0x3BFC80", VA = "0x1803C1280")]
|
||||
set
|
||||
{
|
||||
this.dateAndTime = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001440 RID: 5184
|
||||
// (get) Token: 0x06007C09 RID: 31753 RVA: 0x0019D138 File Offset: 0x0019B338
|
||||
// (set) Token: 0x06007C0A RID: 31754 RVA: 0x0019D150 File Offset: 0x0019B350
|
||||
[Token(Token = "0x17001440")]
|
||||
public ICollection Issuers
|
||||
{
|
||||
[Token(Token = "0x6007C09")]
|
||||
[Address(RVA = "0x534CE0", Offset = "0x5336E0", VA = "0x180534CE0")]
|
||||
get
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007C09)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.ICollection BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store.X509CrlStoreSelector::get_Issuers()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:IList(var_0_0B, call:IList(Platform::CreateArrayList, ldfld:ICollection(X509CrlStoreSelector::issuers, ldloc:X509CrlStoreSelector(this))))
|
||||
}
|
||||
|
||||
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(Token = "0x6007C0A")]
|
||||
[Address(RVA = "0x534DB0", Offset = "0x5337B0", VA = "0x180534DB0")]
|
||||
set
|
||||
{
|
||||
IList list = Platform.CreateArrayList(value);
|
||||
this.issuers = list;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001441 RID: 5185
|
||||
// (get) Token: 0x06007C0B RID: 31755 RVA: 0x0019D16C File Offset: 0x0019B36C
|
||||
// (set) Token: 0x06007C0C RID: 31756 RVA: 0x0019D180 File Offset: 0x0019B380
|
||||
[Token(Token = "0x17001441")]
|
||||
public BigInteger MaxCrlNumber
|
||||
{
|
||||
[Token(Token = "0x6007C0B")]
|
||||
[Address(RVA = "0x3C1230", Offset = "0x3BFC30", VA = "0x1803C1230")]
|
||||
get
|
||||
{
|
||||
return this.maxCrlNumber;
|
||||
}
|
||||
[Token(Token = "0x6007C0C")]
|
||||
[Address(RVA = "0x3C1270", Offset = "0x3BFC70", VA = "0x1803C1270")]
|
||||
set
|
||||
{
|
||||
this.maxCrlNumber = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001442 RID: 5186
|
||||
// (get) Token: 0x06007C0D RID: 31757 RVA: 0x0019D194 File Offset: 0x0019B394
|
||||
// (set) Token: 0x06007C0E RID: 31758 RVA: 0x0019D1A8 File Offset: 0x0019B3A8
|
||||
[Token(Token = "0x17001442")]
|
||||
public BigInteger MinCrlNumber
|
||||
{
|
||||
[Token(Token = "0x6007C0D")]
|
||||
[Address(RVA = "0x3C1250", Offset = "0x3BFC50", VA = "0x1803C1250")]
|
||||
get
|
||||
{
|
||||
return this.minCrlNumber;
|
||||
}
|
||||
[Token(Token = "0x6007C0E")]
|
||||
[Address(RVA = "0x3C1290", Offset = "0x3BFC90", VA = "0x1803C1290")]
|
||||
set
|
||||
{
|
||||
this.minCrlNumber = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001443 RID: 5187
|
||||
// (get) Token: 0x06007C0F RID: 31759 RVA: 0x0019D1BC File Offset: 0x0019B3BC
|
||||
// (set) Token: 0x06007C10 RID: 31760 RVA: 0x0019D1D0 File Offset: 0x0019B3D0
|
||||
[Token(Token = "0x17001443")]
|
||||
public IX509AttributeCertificate AttrCertChecking
|
||||
{
|
||||
[Token(Token = "0x6007C0F")]
|
||||
[Address(RVA = "0x3EE8E0", Offset = "0x3ED2E0", VA = "0x1803EE8E0")]
|
||||
get
|
||||
{
|
||||
return this.attrCertChecking;
|
||||
}
|
||||
[Token(Token = "0x6007C10")]
|
||||
[Address(RVA = "0x421E00", Offset = "0x420800", VA = "0x180421E00")]
|
||||
set
|
||||
{
|
||||
this.attrCertChecking = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001444 RID: 5188
|
||||
// (get) Token: 0x06007C11 RID: 31761 RVA: 0x0019D1E4 File Offset: 0x0019B3E4
|
||||
// (set) Token: 0x06007C12 RID: 31762 RVA: 0x0019D1F8 File Offset: 0x0019B3F8
|
||||
[Token(Token = "0x17001444")]
|
||||
public bool CompleteCrlEnabled
|
||||
{
|
||||
[Token(Token = "0x6007C11")]
|
||||
[Address(RVA = "0x421DE0", Offset = "0x4207E0", VA = "0x180421DE0")]
|
||||
get
|
||||
{
|
||||
return this.completeCrlEnabled;
|
||||
}
|
||||
[Token(Token = "0x6007C12")]
|
||||
[Address(RVA = "0x421DF0", Offset = "0x4207F0", VA = "0x180421DF0")]
|
||||
set
|
||||
{
|
||||
this.completeCrlEnabled = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001445 RID: 5189
|
||||
// (get) Token: 0x06007C13 RID: 31763 RVA: 0x0019D20C File Offset: 0x0019B40C
|
||||
// (set) Token: 0x06007C14 RID: 31764 RVA: 0x0019D220 File Offset: 0x0019B420
|
||||
[Token(Token = "0x17001445")]
|
||||
public bool DeltaCrlIndicatorEnabled
|
||||
{
|
||||
[Token(Token = "0x6007C13")]
|
||||
[Address(RVA = "0x534CD0", Offset = "0x5336D0", VA = "0x180534CD0")]
|
||||
get
|
||||
{
|
||||
return this.deltaCrlIndicatorEnabled;
|
||||
}
|
||||
[Token(Token = "0x6007C14")]
|
||||
[Address(RVA = "0x534DA0", Offset = "0x5337A0", VA = "0x180534DA0")]
|
||||
set
|
||||
{
|
||||
this.deltaCrlIndicatorEnabled = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001446 RID: 5190
|
||||
// (get) Token: 0x06007C15 RID: 31765 RVA: 0x0019D234 File Offset: 0x0019B434
|
||||
// (set) Token: 0x06007C16 RID: 31766 RVA: 0x0019D24C File Offset: 0x0019B44C
|
||||
[Token(Token = "0x17001446")]
|
||||
public byte[] IssuingDistributionPoint
|
||||
{
|
||||
[Token(Token = "0x6007C15")]
|
||||
[Address(RVA = "0x534D40", Offset = "0x533740", VA = "0x180534D40")]
|
||||
get
|
||||
{
|
||||
return Arrays.Clone(this.issuingDistributionPoint);
|
||||
}
|
||||
[Token(Token = "0x6007C16")]
|
||||
[Address(RVA = "0x534E30", Offset = "0x533830", VA = "0x180534E30")]
|
||||
set
|
||||
{
|
||||
byte[] array = Arrays.Clone(value);
|
||||
this.issuingDistributionPoint = array;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001447 RID: 5191
|
||||
// (get) Token: 0x06007C17 RID: 31767 RVA: 0x0019D268 File Offset: 0x0019B468
|
||||
// (set) Token: 0x06007C18 RID: 31768 RVA: 0x0019D27C File Offset: 0x0019B47C
|
||||
[Token(Token = "0x17001447")]
|
||||
public bool IssuingDistributionPointEnabled
|
||||
{
|
||||
[Token(Token = "0x6007C17")]
|
||||
[Address(RVA = "0x446CB0", Offset = "0x4456B0", VA = "0x180446CB0")]
|
||||
get
|
||||
{
|
||||
return this.issuingDistributionPointEnabled;
|
||||
}
|
||||
[Token(Token = "0x6007C18")]
|
||||
[Address(RVA = "0x534E20", Offset = "0x533820", VA = "0x180534E20")]
|
||||
set
|
||||
{
|
||||
this.issuingDistributionPointEnabled = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001448 RID: 5192
|
||||
// (get) Token: 0x06007C19 RID: 31769 RVA: 0x0019D290 File Offset: 0x0019B490
|
||||
// (set) Token: 0x06007C1A RID: 31770 RVA: 0x0019D2A4 File Offset: 0x0019B4A4
|
||||
[Token(Token = "0x17001448")]
|
||||
public BigInteger MaxBaseCrlNumber
|
||||
{
|
||||
[Token(Token = "0x6007C19")]
|
||||
[Address(RVA = "0x4B81A0", Offset = "0x4B6BA0", VA = "0x1804B81A0")]
|
||||
get
|
||||
{
|
||||
return this.maxBaseCrlNumber;
|
||||
}
|
||||
[Token(Token = "0x6007C1A")]
|
||||
[Address(RVA = "0x3EDEB0", Offset = "0x3EC8B0", VA = "0x1803EDEB0")]
|
||||
set
|
||||
{
|
||||
this.maxBaseCrlNumber = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007C1B RID: 31771 RVA: 0x0019D2B8 File Offset: 0x0019B4B8
|
||||
[Token(Token = "0x6007C1B")]
|
||||
[Address(RVA = "0x534630", Offset = "0x533030", VA = "0x180534630", Slot = "7")]
|
||||
public virtual bool Match(object obj)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
if (obj == 0 || obj == 0)
|
||||
{
|
||||
goto IL_3B;
|
||||
}
|
||||
if (this.dateAndTime != 0)
|
||||
{
|
||||
}
|
||||
if (this.issuers == num)
|
||||
{
|
||||
goto IL_3E;
|
||||
}
|
||||
ICollection collection = this.issuers;
|
||||
bool flag;
|
||||
while (!flag)
|
||||
{
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
if ((ulong)1L == 0UL)
|
||||
{
|
||||
}
|
||||
IL_3B:
|
||||
IL_3E:
|
||||
if (this.maxCrlNumber != (ulong)0L || this.minCrlNumber != (ulong)0L)
|
||||
{
|
||||
DerObjectIdentifier subjectDirectoryAttributes = X509Extensions.SubjectDirectoryAttributes;
|
||||
Asn1Object asn1Object;
|
||||
BigInteger positiveValue = DerInteger.GetInstance(asn1Object).PositiveValue;
|
||||
BigInteger bigInteger = this.maxCrlNumber;
|
||||
if (bigInteger != 0)
|
||||
{
|
||||
int num2 = positiveValue.CompareTo(bigInteger);
|
||||
}
|
||||
BigInteger bigInteger2 = this.minCrlNumber;
|
||||
if (bigInteger2 != 0)
|
||||
{
|
||||
int num3 = positiveValue.CompareTo(bigInteger2);
|
||||
}
|
||||
}
|
||||
DerObjectIdentifier subjectDirectoryAttributes2 = X509Extensions.SubjectDirectoryAttributes;
|
||||
Asn1Object asn1Object2;
|
||||
DerInteger instance = DerInteger.GetInstance(asn1Object2);
|
||||
if (instance != 0)
|
||||
{
|
||||
while (this.completeCrlEnabled)
|
||||
{
|
||||
}
|
||||
if (this.maxBaseCrlNumber == (ulong)0L)
|
||||
{
|
||||
goto IL_E8;
|
||||
}
|
||||
BigInteger positiveValue2 = instance.PositiveValue;
|
||||
BigInteger bigInteger3 = this.maxBaseCrlNumber;
|
||||
if (positiveValue2.CompareTo(bigInteger3) <= 0)
|
||||
{
|
||||
goto IL_E8;
|
||||
}
|
||||
}
|
||||
while (this.deltaCrlIndicatorEnabled)
|
||||
{
|
||||
}
|
||||
IL_E8:
|
||||
if (this.issuingDistributionPointEnabled)
|
||||
{
|
||||
bool flag2;
|
||||
if (this.issuingDistributionPoint != (ulong)0L)
|
||||
{
|
||||
DerObjectIdentifier subjectDirectoryAttributes3 = X509Extensions.SubjectDirectoryAttributes;
|
||||
if (flag2)
|
||||
{
|
||||
goto IL_10D;
|
||||
}
|
||||
}
|
||||
while (flag2)
|
||||
{
|
||||
}
|
||||
}
|
||||
IL_10D:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x04005896 RID: 22678
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005896")]
|
||||
private X509Certificate certificateChecking;
|
||||
|
||||
// Token: 0x04005897 RID: 22679
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4005897")]
|
||||
private DateTimeObject dateAndTime;
|
||||
|
||||
// Token: 0x04005898 RID: 22680
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4005898")]
|
||||
private ICollection issuers;
|
||||
|
||||
// Token: 0x04005899 RID: 22681
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4005899")]
|
||||
private BigInteger maxCrlNumber;
|
||||
|
||||
// Token: 0x0400589A RID: 22682
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x400589A")]
|
||||
private BigInteger minCrlNumber;
|
||||
|
||||
// Token: 0x0400589B RID: 22683
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x400589B")]
|
||||
private IX509AttributeCertificate attrCertChecking;
|
||||
|
||||
// Token: 0x0400589C RID: 22684
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x400589C")]
|
||||
private bool completeCrlEnabled;
|
||||
|
||||
// Token: 0x0400589D RID: 22685
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x41")]
|
||||
[Token(Token = "0x400589D")]
|
||||
private bool deltaCrlIndicatorEnabled;
|
||||
|
||||
// Token: 0x0400589E RID: 22686
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x400589E")]
|
||||
private byte[] issuingDistributionPoint;
|
||||
|
||||
// Token: 0x0400589F RID: 22687
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x400589F")]
|
||||
private bool issuingDistributionPointEnabled;
|
||||
|
||||
// Token: 0x040058A0 RID: 22688
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x40058A0")]
|
||||
private BigInteger maxBaseCrlNumber;
|
||||
}
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x0200133E RID: 4926
|
||||
[Token(Token = "0x200133E")]
|
||||
[Serializable]
|
||||
[StructLayout(3)]
|
||||
public class X509StoreException : Exception
|
||||
{
|
||||
// Token: 0x06007C1C RID: 31772 RVA: 0x0019D3E4 File Offset: 0x0019B5E4
|
||||
[Token(Token = "0x6007C1C")]
|
||||
[Address(RVA = "0x52A500", Offset = "0x528F00", VA = "0x18052A500")]
|
||||
public X509StoreException()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06007C1D RID: 31773 RVA: 0x0019D3F8 File Offset: 0x0019B5F8
|
||||
[Token(Token = "0x6007C1D")]
|
||||
[Address(RVA = "0x52A560", Offset = "0x528F60", VA = "0x18052A560")]
|
||||
public X509StoreException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06007C1E RID: 31774 RVA: 0x0019D40C File Offset: 0x0019B60C
|
||||
[Token(Token = "0x6007C1E")]
|
||||
[Address(RVA = "0x52A480", Offset = "0x528E80", VA = "0x18052A480")]
|
||||
public X509StoreException(string message, Exception e)
|
||||
: base(message, e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x0200133F RID: 4927
|
||||
[Token(Token = "0x200133F")]
|
||||
[StructLayout(3)]
|
||||
public sealed class X509StoreFactory
|
||||
{
|
||||
// Token: 0x06007C1F RID: 31775 RVA: 0x0019D424 File Offset: 0x0019B624
|
||||
[Token(Token = "0x6007C1F")]
|
||||
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
||||
private X509StoreFactory()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06007C20 RID: 31776 RVA: 0x0019D438 File Offset: 0x0019B638
|
||||
[Token(Token = "0x6007C20")]
|
||||
[Address(RVA = "0x537F40", Offset = "0x536940", VA = "0x180537F40")]
|
||||
public static IX509Store Create(string type, IX509StoreParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007C20)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store.IX509Store BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store.X509StoreFactory::Create(System.String,BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store.IX509StoreParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_BA:
|
||||
stloc:NoSuchStoreException(var_10_CF, newobj:NoSuchStoreException(NoSuchStoreException::.ctor, call:string(string::Concat, ldstr:string("X.509 store type '"), ldloc:string(type), ldstr:string("' not available."))))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.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: 0x06007C21 RID: 31777 RVA: 0x0019D518 File Offset: 0x0019B718
|
||||
[Token(Token = "0x6007C21")]
|
||||
[Address(RVA = "0x538300", Offset = "0x536D00", VA = "0x180538300")]
|
||||
private static void checkCorrectType(ICollection coll, Type t)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
bool flag;
|
||||
if (!flag)
|
||||
{
|
||||
goto IL_13;
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
return;
|
||||
IL_13:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
}
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x02001321 RID: 4897
|
||||
[Token(Token = "0x2001321")]
|
||||
[StructLayout(3)]
|
||||
public sealed class SubjectPublicKeyInfoFactory
|
||||
{
|
||||
// Token: 0x06007ABA RID: 31418 RVA: 0x00197F74 File Offset: 0x00196174
|
||||
[Token(Token = "0x6007ABA")]
|
||||
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
||||
private SubjectPublicKeyInfoFactory()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06007ABB RID: 31419 RVA: 0x00197F88 File Offset: 0x00196188
|
||||
[Token(Token = "0x6007ABB")]
|
||||
[Address(RVA = "0x52AE60", Offset = "0x529860", VA = "0x18052AE60")]
|
||||
public static SubjectPublicKeyInfo CreateSubjectPublicKeyInfo(AsymmetricKeyParameter publicKey)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007ABB)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.SubjectPublicKeyInfo BestHTTP.SecureProtocol.Org.BouncyCastle.X509.SubjectPublicKeyInfoFactory::CreateSubjectPublicKeyInfo(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.AsymmetricKeyParameter)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_22C:
|
||||
stloc:Exception(var_61_236, call:Exception(Platform::CreateNotImplementedException, ldstr:string("Not a CryptoPro parameter set")))
|
||||
}
|
||||
|
||||
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.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: 0x06007ABC RID: 31420 RVA: 0x001981CC File Offset: 0x001963CC
|
||||
[Token(Token = "0x6007ABC")]
|
||||
[Address(RVA = "0x52BB80", Offset = "0x52A580", VA = "0x18052BB80")]
|
||||
private static void ExtractBytes(byte[] encKey, int offset, BigInteger bI)
|
||||
{
|
||||
byte[] array = bI.ToByteArray();
|
||||
int num = 0;
|
||||
int num2 = bI.BitLength;
|
||||
num2 += 7;
|
||||
int num3 = 0;
|
||||
num2 += num;
|
||||
if (num2 > 0)
|
||||
{
|
||||
int num4 = array.Length;
|
||||
num4 -= num3;
|
||||
num3++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x02001322 RID: 4898
|
||||
[Token(Token = "0x2001322")]
|
||||
[StructLayout(3)]
|
||||
public class X509AttrCertParser
|
||||
{
|
||||
// Token: 0x06007ABD RID: 31421 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6007ABD")]
|
||||
[Address(RVA = "0x52C3C0", Offset = "0x52ADC0", VA = "0x18052C3C0")]
|
||||
private IX509AttributeCertificate ReadDerCertificate(Asn1InputStream dIn)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06007ABE RID: 31422 RVA: 0x00198210 File Offset: 0x00196410
|
||||
[Token(Token = "0x6007ABE")]
|
||||
[Address(RVA = "0x52BC50", Offset = "0x52A650", VA = "0x18052BC50")]
|
||||
private IX509AttributeCertificate GetCertificate()
|
||||
{
|
||||
while (this.sData != (ulong)0L)
|
||||
{
|
||||
Asn1Set asn1Set = this.sData;
|
||||
Asn1Encodable asn1Encodable;
|
||||
if (this.sDataObjectCount >= asn1Encodable)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int num = this.sDataObjectCount;
|
||||
Asn1Set asn1Set2 = this.sData;
|
||||
int num2 = num + 1;
|
||||
this.sDataObjectCount = num2;
|
||||
IEnumerator enumerator = asn1Set2.GetEnumerator();
|
||||
while (enumerator == 0)
|
||||
{
|
||||
}
|
||||
while (enumerator == 0)
|
||||
{
|
||||
}
|
||||
if (enumerator != 0)
|
||||
{
|
||||
Asn1Sequence asn1Sequence;
|
||||
X509V2AttributeCertificate x509V2AttributeCertificate = new X509V2AttributeCertificate(AttributeCertificate.GetInstance(asn1Sequence));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007ABF RID: 31423 RVA: 0x00198280 File Offset: 0x00196480
|
||||
[Token(Token = "0x6007ABF")]
|
||||
[Address(RVA = "0x52C5F0", Offset = "0x52AFF0", VA = "0x18052C5F0")]
|
||||
private IX509AttributeCertificate ReadPemCertificate(Stream inStream)
|
||||
{
|
||||
Asn1Sequence asn1Sequence = X509AttrCertParser.PemAttrCertParser.ReadPemObject(inStream);
|
||||
if (asn1Sequence == 0)
|
||||
{
|
||||
}
|
||||
X509V2AttributeCertificate x509V2AttributeCertificate = new X509V2AttributeCertificate(AttributeCertificate.GetInstance(asn1Sequence));
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007AC0 RID: 31424 RVA: 0x001982B0 File Offset: 0x001964B0
|
||||
[Token(Token = "0x6007AC0")]
|
||||
[Address(RVA = "0x52C0A0", Offset = "0x52AAA0", VA = "0x18052C0A0")]
|
||||
public IX509AttributeCertificate ReadAttrCert(byte[] input)
|
||||
{
|
||||
int num;
|
||||
MemoryStream memoryStream = new MemoryStream(input, num != 0);
|
||||
num = 0;
|
||||
return this.ReadAttrCert(memoryStream);
|
||||
}
|
||||
|
||||
// Token: 0x06007AC1 RID: 31425 RVA: 0x001982D0 File Offset: 0x001964D0
|
||||
[Token(Token = "0x6007AC1")]
|
||||
[Address(RVA = "0x52C110", Offset = "0x52AB10", VA = "0x18052C110")]
|
||||
public ICollection ReadAttrCerts(byte[] input)
|
||||
{
|
||||
MemoryStream memoryStream;
|
||||
do
|
||||
{
|
||||
int num;
|
||||
memoryStream = new MemoryStream(input, num != 0);
|
||||
num = 0;
|
||||
IList list = Platform.CreateArrayList();
|
||||
int num2 = 0;
|
||||
if (this.ReadAttrCert(memoryStream) == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
int num3 = 0;
|
||||
if (num3 < num2)
|
||||
{
|
||||
num3 += num3;
|
||||
num3++;
|
||||
}
|
||||
}
|
||||
while (this.ReadAttrCert(memoryStream) != 0);
|
||||
memoryStream += memoryStream;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007AC2 RID: 31426 RVA: 0x00198328 File Offset: 0x00196528
|
||||
[Token(Token = "0x6007AC2")]
|
||||
[Address(RVA = "0x52BDE0", Offset = "0x52A7E0", VA = "0x18052BDE0")]
|
||||
public IX509AttributeCertificate ReadAttrCert(Stream inStream)
|
||||
{
|
||||
if (inStream != 0)
|
||||
{
|
||||
inStream.Dispose();
|
||||
Stream stream = this.currentStream;
|
||||
int num = 0;
|
||||
if (stream == 0 || stream != inStream)
|
||||
{
|
||||
this.sDataObjectCount = num;
|
||||
this.sData = num;
|
||||
this.currentStream = inStream;
|
||||
}
|
||||
AttributeCertificate instance;
|
||||
X509V2AttributeCertificate x509V2AttributeCertificate;
|
||||
if (this.sData == 0)
|
||||
{
|
||||
PushbackStream pushbackStream = new PushbackStream(inStream);
|
||||
int num2;
|
||||
pushbackStream.WriteByte((byte)num2);
|
||||
if (num2 == 48)
|
||||
{
|
||||
Asn1InputStream asn1InputStream = new Asn1InputStream(pushbackStream);
|
||||
IX509AttributeCertificate ix509AttributeCertificate = this.ReadDerCertificate(asn1InputStream);
|
||||
}
|
||||
Asn1Sequence asn1Sequence = X509AttrCertParser.PemAttrCertParser.ReadPemObject(pushbackStream);
|
||||
if (asn1Sequence != 0)
|
||||
{
|
||||
instance = AttributeCertificate.GetInstance(asn1Sequence);
|
||||
x509V2AttributeCertificate = new X509V2AttributeCertificate(instance);
|
||||
}
|
||||
}
|
||||
AlgorithmIdentifier signatureAlgorithm = instance.signatureAlgorithm;
|
||||
ISet criticalExtensionOids = x509V2AttributeCertificate.GetCriticalExtensionOids();
|
||||
if (signatureAlgorithm == criticalExtensionOids)
|
||||
{
|
||||
instance.acinfo = x509V2AttributeCertificate;
|
||||
instance.signatureAlgorithm = x509V2AttributeCertificate;
|
||||
}
|
||||
IX509AttributeCertificate ix509AttributeCertificate2;
|
||||
return ix509AttributeCertificate2;
|
||||
}
|
||||
ArgumentNullException ex = new ArgumentNullException("inStream");
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007AC3 RID: 31427 RVA: 0x00198418 File Offset: 0x00196618
|
||||
[Token(Token = "0x6007AC3")]
|
||||
[Address(RVA = "0x52C280", Offset = "0x52AC80", VA = "0x18052C280")]
|
||||
public ICollection ReadAttrCerts(Stream inStream)
|
||||
{
|
||||
do
|
||||
{
|
||||
IList list = Platform.CreateArrayList();
|
||||
int num = 0;
|
||||
if (this.ReadAttrCert(inStream) == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
int num2 = 0;
|
||||
if (num2 < num)
|
||||
{
|
||||
num2 += num2;
|
||||
num2++;
|
||||
}
|
||||
}
|
||||
while (this.ReadAttrCert(inStream) != 0);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007AC4 RID: 31428 RVA: 0x00198458 File Offset: 0x00196658
|
||||
[Token(Token = "0x6007AC4")]
|
||||
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
||||
public X509AttrCertParser()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04005839 RID: 22585
|
||||
[Token(Token = "0x4005839")]
|
||||
private static readonly PemParser PemAttrCertParser = new PemParser("ATTRIBUTE CERTIFICATE");
|
||||
|
||||
// Token: 0x0400583A RID: 22586
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400583A")]
|
||||
private Asn1Set sData;
|
||||
|
||||
// Token: 0x0400583B RID: 22587
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400583B")]
|
||||
private int sDataObjectCount;
|
||||
|
||||
// Token: 0x0400583C RID: 22588
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400583C")]
|
||||
private Stream currentStream;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x02001323 RID: 4899
|
||||
[Token(Token = "0x2001323")]
|
||||
[StructLayout(3)]
|
||||
public class X509Attribute : Asn1Encodable
|
||||
{
|
||||
// Token: 0x06007AC6 RID: 31430 RVA: 0x00198488 File Offset: 0x00196688
|
||||
[Token(Token = "0x6007AC6")]
|
||||
[Address(RVA = "0x52D910", Offset = "0x52C310", VA = "0x18052D910")]
|
||||
internal X509Attribute(Asn1Encodable at)
|
||||
{
|
||||
AttributeX509 instance = AttributeX509.GetInstance(at);
|
||||
this.attr = instance;
|
||||
}
|
||||
|
||||
// Token: 0x06007AC7 RID: 31431 RVA: 0x001984AC File Offset: 0x001966AC
|
||||
[Token(Token = "0x6007AC7")]
|
||||
[Address(RVA = "0x52D850", Offset = "0x52C250", VA = "0x18052D850")]
|
||||
public X509Attribute(string oid, Asn1Encodable value)
|
||||
{
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
||||
DerSet derSet = new DerSet(value);
|
||||
AttributeX509 attributeX = new AttributeX509(derObjectIdentifier, derSet);
|
||||
this.attr = attributeX;
|
||||
}
|
||||
|
||||
// Token: 0x06007AC8 RID: 31432 RVA: 0x001984DC File Offset: 0x001966DC
|
||||
[Token(Token = "0x6007AC8")]
|
||||
[Address(RVA = "0x52D790", Offset = "0x52C190", VA = "0x18052D790")]
|
||||
public X509Attribute(string oid, Asn1EncodableVector value)
|
||||
{
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
||||
DerSet derSet = new DerSet(value);
|
||||
AttributeX509 attributeX = new AttributeX509(derObjectIdentifier, derSet);
|
||||
this.attr = attributeX;
|
||||
}
|
||||
|
||||
// Token: 0x170013FF RID: 5119
|
||||
// (get) Token: 0x06007AC9 RID: 31433 RVA: 0x0019850C File Offset: 0x0019670C
|
||||
[Token(Token = "0x170013FF")]
|
||||
public string Oid
|
||||
{
|
||||
[Token(Token = "0x6007AC9")]
|
||||
[Address(RVA = "0x52D940", Offset = "0x52C340", VA = "0x18052D940")]
|
||||
get
|
||||
{
|
||||
return this.attr.attrType.identifier;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007ACA RID: 31434 RVA: 0x00198530 File Offset: 0x00196730
|
||||
[Token(Token = "0x6007ACA")]
|
||||
[Address(RVA = "0x52D640", Offset = "0x52C040", VA = "0x18052D640")]
|
||||
public Asn1Encodable[] GetValues()
|
||||
{
|
||||
Asn1Set attrValues = this.attr.attrValues;
|
||||
Asn1Encodable asn1Encodable;
|
||||
Asn1Encodable[] array = new Asn1Encodable[asn1Encodable];
|
||||
int num = 0;
|
||||
Asn1Encodable asn1Encodable2;
|
||||
if (num != asn1Encodable2)
|
||||
{
|
||||
IEnumerator enumerator = attrValues.GetEnumerator();
|
||||
if (enumerator != 0)
|
||||
{
|
||||
}
|
||||
num++;
|
||||
array[0] = enumerator;
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x06007ACB RID: 31435 RVA: 0x00198578 File Offset: 0x00196778
|
||||
[Token(Token = "0x6007ACB")]
|
||||
[Address(RVA = "0x52D760", Offset = "0x52C160", VA = "0x18052D760", Slot = "5")]
|
||||
public override Asn1Object ToAsn1Object()
|
||||
{
|
||||
return this.attr.ToAsn1Object();
|
||||
}
|
||||
|
||||
// Token: 0x0400583D RID: 22589
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400583D")]
|
||||
private readonly AttributeX509 attr;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x02001324 RID: 4900
|
||||
[Token(Token = "0x2001324")]
|
||||
[StructLayout(3)]
|
||||
public class X509CertPairParser
|
||||
{
|
||||
// Token: 0x06007ACC RID: 31436 RVA: 0x00198598 File Offset: 0x00196798
|
||||
[Token(Token = "0x6007ACC")]
|
||||
[Address(RVA = "0x52DF80", Offset = "0x52C980", VA = "0x18052DF80")]
|
||||
private X509CertificatePair ReadDerCrossCertificatePair(Stream inStream)
|
||||
{
|
||||
Asn1Object asn1Object;
|
||||
do
|
||||
{
|
||||
asn1Object = new Asn1InputStream(inStream).ReadObject();
|
||||
if (asn1Object == 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (asn1Object == 0);
|
||||
CertificatePair instance = CertificatePair.GetInstance(asn1Object);
|
||||
X509CertificateStructure forward = instance.forward;
|
||||
X509CertificatePair x509CertificatePair;
|
||||
if (forward != 0)
|
||||
{
|
||||
X509Certificate x509Certificate = new X509Certificate(forward);
|
||||
x509CertificatePair.forward = x509Certificate;
|
||||
}
|
||||
X509CertificateStructure reverse = instance.reverse;
|
||||
if (reverse != 0)
|
||||
{
|
||||
X509Certificate x509Certificate2 = new X509Certificate(reverse);
|
||||
x509CertificatePair.reverse = x509Certificate2;
|
||||
}
|
||||
return x509CertificatePair;
|
||||
}
|
||||
|
||||
// Token: 0x06007ACD RID: 31437 RVA: 0x00198608 File Offset: 0x00196808
|
||||
[Token(Token = "0x6007ACD")]
|
||||
[Address(RVA = "0x52DC60", Offset = "0x52C660", VA = "0x18052DC60")]
|
||||
public X509CertificatePair ReadCertPair(byte[] input)
|
||||
{
|
||||
int num;
|
||||
MemoryStream memoryStream = new MemoryStream(input, num != 0);
|
||||
num = 0;
|
||||
return this.ReadCertPair(memoryStream);
|
||||
}
|
||||
|
||||
// Token: 0x06007ACE RID: 31438 RVA: 0x00198628 File Offset: 0x00196828
|
||||
[Token(Token = "0x6007ACE")]
|
||||
[Address(RVA = "0x52DE10", Offset = "0x52C810", VA = "0x18052DE10")]
|
||||
public ICollection ReadCertPairs(byte[] input)
|
||||
{
|
||||
MemoryStream memoryStream;
|
||||
do
|
||||
{
|
||||
int num;
|
||||
memoryStream = new MemoryStream(input, num != 0);
|
||||
num = 0;
|
||||
IList list = Platform.CreateArrayList();
|
||||
int num2 = 0;
|
||||
if (this.ReadCertPair(memoryStream) == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
int num3 = 0;
|
||||
if (num3 < num2)
|
||||
{
|
||||
num3 += num3;
|
||||
num3++;
|
||||
}
|
||||
}
|
||||
while (this.ReadCertPair(memoryStream) != 0);
|
||||
memoryStream += memoryStream;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007ACF RID: 31439 RVA: 0x00198680 File Offset: 0x00196880
|
||||
[Token(Token = "0x6007ACF")]
|
||||
[Address(RVA = "0x52D970", Offset = "0x52C370", VA = "0x18052D970")]
|
||||
public X509CertificatePair ReadCertPair(Stream inStream)
|
||||
{
|
||||
if (inStream != 0)
|
||||
{
|
||||
inStream.Dispose();
|
||||
Stream stream = this.currentStream;
|
||||
if (stream == 0 || stream != inStream)
|
||||
{
|
||||
this.currentStream = inStream;
|
||||
}
|
||||
PushbackStream pushbackStream = new PushbackStream(inStream);
|
||||
int num;
|
||||
pushbackStream.WriteByte((byte)num);
|
||||
Asn1Object asn1Object = new Asn1InputStream(pushbackStream).ReadObject();
|
||||
if (asn1Object == 0)
|
||||
{
|
||||
}
|
||||
if (asn1Object == 0)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
CertificatePair instance = CertificatePair.GetInstance(asn1Object);
|
||||
X509CertificateStructure forward = instance.forward;
|
||||
X509CertificatePair x509CertificatePair;
|
||||
if (forward != 0)
|
||||
{
|
||||
X509Certificate x509Certificate = new X509Certificate(forward);
|
||||
x509CertificatePair.forward = x509Certificate;
|
||||
}
|
||||
X509CertificateStructure reverse = instance.reverse;
|
||||
if (reverse != 0)
|
||||
{
|
||||
X509Certificate x509Certificate2 = new X509Certificate(reverse);
|
||||
x509CertificatePair.reverse = x509Certificate2;
|
||||
}
|
||||
}
|
||||
ArgumentNullException ex = new ArgumentNullException("inStream");
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007AD0 RID: 31440 RVA: 0x00198754 File Offset: 0x00196954
|
||||
[Token(Token = "0x6007AD0")]
|
||||
[Address(RVA = "0x52DCD0", Offset = "0x52C6D0", VA = "0x18052DCD0")]
|
||||
public ICollection ReadCertPairs(Stream inStream)
|
||||
{
|
||||
do
|
||||
{
|
||||
IList list = Platform.CreateArrayList();
|
||||
int num = 0;
|
||||
if (this.ReadCertPair(inStream) == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
int num2 = 0;
|
||||
if (num2 < num)
|
||||
{
|
||||
num2 += num2;
|
||||
num2++;
|
||||
}
|
||||
}
|
||||
while (this.ReadCertPair(inStream) != 0);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007AD1 RID: 31441 RVA: 0x00198794 File Offset: 0x00196994
|
||||
[Token(Token = "0x6007AD1")]
|
||||
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
||||
public X509CertPairParser()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0400583E RID: 22590
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400583E")]
|
||||
private Stream currentStream;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,725 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Misc;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Operators;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Security;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x02001325 RID: 4901
|
||||
[Token(Token = "0x2001325")]
|
||||
[StructLayout(3)]
|
||||
public class X509Certificate : X509ExtensionBase
|
||||
{
|
||||
// Token: 0x06007AD2 RID: 31442 RVA: 0x001987A8 File Offset: 0x001969A8
|
||||
[Token(Token = "0x6007AD2")]
|
||||
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
||||
protected X509Certificate()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06007AD3 RID: 31443 RVA: 0x001987BC File Offset: 0x001969BC
|
||||
[Token(Token = "0x6007AD3")]
|
||||
[Address(RVA = "0x5324B0", Offset = "0x530EB0", VA = "0x1805324B0")]
|
||||
public X509Certificate(X509CertificateStructure c)
|
||||
{
|
||||
this.c = c;
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier("2.5.29.19");
|
||||
if (this.GetCriticalExtensionOids() != 0)
|
||||
{
|
||||
Asn1Object asn1Object;
|
||||
BasicConstraints instance = BasicConstraints.GetInstance(asn1Object);
|
||||
this.basicConstraints = instance;
|
||||
}
|
||||
DerObjectIdentifier derObjectIdentifier2 = new DerObjectIdentifier("2.5.29.15");
|
||||
if (this.GetCriticalExtensionOids() == 0)
|
||||
{
|
||||
int num = 0;
|
||||
this.keyUsage = num;
|
||||
}
|
||||
Asn1Object asn1Object2;
|
||||
DerBitString instance2 = DerBitString.GetInstance(asn1Object2);
|
||||
byte[] octets = instance2.GetOctets();
|
||||
byte[] bytes = instance2.GetBytes();
|
||||
int num2 = octets.Length;
|
||||
num2 -= bytes;
|
||||
bool[] array = new bool[9];
|
||||
this.keyUsage = array;
|
||||
int num3 = 0;
|
||||
while (num3 == num2)
|
||||
{
|
||||
}
|
||||
bool[] array2 = this.keyUsage;
|
||||
uint num4;
|
||||
num3 += (int)num4;
|
||||
num3 -= (int)num4;
|
||||
num3++;
|
||||
}
|
||||
|
||||
// Token: 0x17001400 RID: 5120
|
||||
// (get) Token: 0x06007AD4 RID: 31444 RVA: 0x001988AC File Offset: 0x00196AAC
|
||||
[Token(Token = "0x17001400")]
|
||||
public virtual X509CertificateStructure CertificateStructure
|
||||
{
|
||||
[Token(Token = "0x6007AD4")]
|
||||
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0", Slot = "13")]
|
||||
get
|
||||
{
|
||||
return this.c;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001401 RID: 5121
|
||||
// (get) Token: 0x06007AD5 RID: 31445 RVA: 0x001988C0 File Offset: 0x00196AC0
|
||||
[Token(Token = "0x17001401")]
|
||||
public virtual bool IsValidNow
|
||||
{
|
||||
[Token(Token = "0x6007AD5")]
|
||||
[Address(RVA = "0x532790", Offset = "0x531190", VA = "0x180532790", Slot = "14")]
|
||||
get
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007AD5)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Certificate::get_IsValidNow()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:DateTime(var_1_07, callgetter:DateTime(DateTime::get_UtcNow))
|
||||
stloc:ISet(var_2_0E, call:ISet(IX509Extension::GetCriticalExtensionOids, ldloc:X509Certificate[exp:IX509Extension](this)))
|
||||
}
|
||||
|
||||
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: 0x06007AD6 RID: 31446 RVA: 0x001988DC File Offset: 0x00196ADC
|
||||
[Token(Token = "0x6007AD6")]
|
||||
[Address(RVA = "0x531760", Offset = "0x530160", VA = "0x180531760", Slot = "15")]
|
||||
public virtual bool IsValid(DateTime time)
|
||||
{
|
||||
X509Name subjectDN = this.SubjectDN;
|
||||
return this.NotBefore <= 0;
|
||||
}
|
||||
|
||||
// Token: 0x06007AD7 RID: 31447 RVA: 0x00198900 File Offset: 0x00196B00
|
||||
[Token(Token = "0x6007AD7")]
|
||||
[Address(RVA = "0x530A20", Offset = "0x52F420", VA = "0x180530A20", Slot = "16")]
|
||||
public virtual void CheckValidity()
|
||||
{
|
||||
DateTime utcNow = DateTime.UtcNow;
|
||||
ISet criticalExtensionOids = ((IX509Extension)this).GetCriticalExtensionOids();
|
||||
}
|
||||
|
||||
// Token: 0x06007AD8 RID: 31448 RVA: 0x0019891C File Offset: 0x00196B1C
|
||||
[Token(Token = "0x6007AD8")]
|
||||
[Address(RVA = "0x530A90", Offset = "0x52F490", VA = "0x180530A90", Slot = "17")]
|
||||
public virtual void CheckValidity(DateTime time)
|
||||
{
|
||||
DateTime notBefore = this.NotBefore;
|
||||
X509Name subjectDN = this.SubjectDN;
|
||||
}
|
||||
|
||||
// Token: 0x17001402 RID: 5122
|
||||
// (get) Token: 0x06007AD9 RID: 31449 RVA: 0x00198958 File Offset: 0x00196B58
|
||||
[Token(Token = "0x17001402")]
|
||||
public virtual int Version
|
||||
{
|
||||
[Token(Token = "0x6007AD9")]
|
||||
[Address(RVA = "0x5329F0", Offset = "0x5313F0", VA = "0x1805329F0", Slot = "18")]
|
||||
get
|
||||
{
|
||||
return this.c.Version;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001403 RID: 5123
|
||||
// (get) Token: 0x06007ADA RID: 31450 RVA: 0x00198978 File Offset: 0x00196B78
|
||||
[Token(Token = "0x17001403")]
|
||||
public virtual BigInteger SerialNumber
|
||||
{
|
||||
[Token(Token = "0x6007ADA")]
|
||||
[Address(RVA = "0x5328B0", Offset = "0x5312B0", VA = "0x1805328B0", Slot = "19")]
|
||||
get
|
||||
{
|
||||
return this.c.SerialNumber.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001404 RID: 5124
|
||||
// (get) Token: 0x06007ADB RID: 31451 RVA: 0x0019899C File Offset: 0x00196B9C
|
||||
[Token(Token = "0x17001404")]
|
||||
public virtual X509Name IssuerDN
|
||||
{
|
||||
[Token(Token = "0x6007ADB")]
|
||||
[Address(RVA = "0x532800", Offset = "0x531200", VA = "0x180532800", Slot = "20")]
|
||||
get
|
||||
{
|
||||
return this.c.Issuer;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001405 RID: 5125
|
||||
// (get) Token: 0x06007ADC RID: 31452 RVA: 0x001989BC File Offset: 0x00196BBC
|
||||
[Token(Token = "0x17001405")]
|
||||
public virtual X509Name SubjectDN
|
||||
{
|
||||
[Token(Token = "0x6007ADC")]
|
||||
[Address(RVA = "0x5329A0", Offset = "0x5313A0", VA = "0x1805329A0", Slot = "21")]
|
||||
get
|
||||
{
|
||||
return this.c.Subject;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001406 RID: 5126
|
||||
// (get) Token: 0x06007ADD RID: 31453 RVA: 0x001989DC File Offset: 0x00196BDC
|
||||
[Token(Token = "0x17001406")]
|
||||
public virtual DateTime NotBefore
|
||||
{
|
||||
[Token(Token = "0x6007ADD")]
|
||||
[Address(RVA = "0x532880", Offset = "0x531280", VA = "0x180532880", Slot = "22")]
|
||||
get
|
||||
{
|
||||
return this.c.StartDate.ToDateTime();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001407 RID: 5127
|
||||
// (get) Token: 0x06007ADE RID: 31454 RVA: 0x00198A00 File Offset: 0x00196C00
|
||||
[Token(Token = "0x17001407")]
|
||||
public virtual DateTime NotAfter
|
||||
{
|
||||
[Token(Token = "0x6007ADE")]
|
||||
[Address(RVA = "0x532850", Offset = "0x531250", VA = "0x180532850", Slot = "23")]
|
||||
get
|
||||
{
|
||||
return this.c.EndDate.ToDateTime();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007ADF RID: 31455 RVA: 0x00198A24 File Offset: 0x00196C24
|
||||
[Token(Token = "0x6007ADF")]
|
||||
[Address(RVA = "0x531580", Offset = "0x52FF80", VA = "0x180531580", Slot = "24")]
|
||||
public virtual byte[] GetTbsCertificate()
|
||||
{
|
||||
return this.c.tbsCert.GetDerEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x06007AE0 RID: 31456 RVA: 0x00198A48 File Offset: 0x00196C48
|
||||
[Token(Token = "0x6007AE0")]
|
||||
[Address(RVA = "0x531510", Offset = "0x52FF10", VA = "0x180531510", Slot = "25")]
|
||||
public virtual byte[] GetSignature()
|
||||
{
|
||||
return this.c.GetSignatureOctets();
|
||||
}
|
||||
|
||||
// Token: 0x17001408 RID: 5128
|
||||
// (get) Token: 0x06007AE1 RID: 31457 RVA: 0x00198A68 File Offset: 0x00196C68
|
||||
[Token(Token = "0x17001408")]
|
||||
public virtual string SigAlgName
|
||||
{
|
||||
[Token(Token = "0x6007AE1")]
|
||||
[Address(RVA = "0x5328E0", Offset = "0x5312E0", VA = "0x1805328E0", Slot = "26")]
|
||||
get
|
||||
{
|
||||
Asn1Object asn1Object = this.c.sigAlgID.ToAsn1Object();
|
||||
string text;
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001409 RID: 5129
|
||||
// (get) Token: 0x06007AE2 RID: 31458 RVA: 0x00198A90 File Offset: 0x00196C90
|
||||
[Token(Token = "0x17001409")]
|
||||
public virtual string SigAlgOid
|
||||
{
|
||||
[Token(Token = "0x6007AE2")]
|
||||
[Address(RVA = "0x532960", Offset = "0x531360", VA = "0x180532960", Slot = "27")]
|
||||
get
|
||||
{
|
||||
Asn1Object asn1Object = this.c.sigAlgID.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007AE3 RID: 31459 RVA: 0x00198AB4 File Offset: 0x00196CB4
|
||||
[Token(Token = "0x6007AE3")]
|
||||
[Address(RVA = "0x531490", Offset = "0x52FE90", VA = "0x180531490", Slot = "28")]
|
||||
public virtual byte[] GetSigAlgParams()
|
||||
{
|
||||
if (this.c.sigAlgID.ObjectID == 0)
|
||||
{
|
||||
}
|
||||
return this.c.sigAlgID.ObjectID.GetDerEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x1700140A RID: 5130
|
||||
// (get) Token: 0x06007AE4 RID: 31460 RVA: 0x00198AF0 File Offset: 0x00196CF0
|
||||
[Token(Token = "0x1700140A")]
|
||||
public virtual DerBitString IssuerUniqueID
|
||||
{
|
||||
[Token(Token = "0x6007AE4")]
|
||||
[Address(RVA = "0x532820", Offset = "0x531220", VA = "0x180532820", Slot = "29")]
|
||||
get
|
||||
{
|
||||
return this.c.tbsCert.issuerUniqueID;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700140B RID: 5131
|
||||
// (get) Token: 0x06007AE5 RID: 31461 RVA: 0x00198B14 File Offset: 0x00196D14
|
||||
[Token(Token = "0x1700140B")]
|
||||
public virtual DerBitString SubjectUniqueID
|
||||
{
|
||||
[Token(Token = "0x6007AE5")]
|
||||
[Address(RVA = "0x5329C0", Offset = "0x5313C0", VA = "0x1805329C0", Slot = "30")]
|
||||
get
|
||||
{
|
||||
return this.c.tbsCert.subjectUniqueID;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007AE6 RID: 31462 RVA: 0x00198B38 File Offset: 0x00196D38
|
||||
[Token(Token = "0x6007AE6")]
|
||||
[Address(RVA = "0x5313E0", Offset = "0x52FDE0", VA = "0x1805313E0", Slot = "31")]
|
||||
public virtual bool[] GetKeyUsage()
|
||||
{
|
||||
while (this.keyUsage != 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007AE7 RID: 31463 RVA: 0x00198B50 File Offset: 0x00196D50
|
||||
[Token(Token = "0x6007AE7")]
|
||||
[Address(RVA = "0x530F50", Offset = "0x52F950", VA = "0x180530F50", Slot = "32")]
|
||||
public virtual IList GetExtendedKeyUsage()
|
||||
{
|
||||
int num = 0;
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier("2.5.29.37");
|
||||
if (this.GetCriticalExtensionOids() == 0)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
Asn1Object asn1Object;
|
||||
Asn1Sequence instance = Asn1Sequence.GetInstance(asn1Object);
|
||||
IList list = Platform.CreateArrayList();
|
||||
IEnumerator enumerator = instance.GetEnumerator();
|
||||
if (enumerator != 0)
|
||||
{
|
||||
if (num < enumerator)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
if (enumerator == 0)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
if (num < enumerator)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
num += 2;
|
||||
num += 19;
|
||||
}
|
||||
if (num != 0)
|
||||
{
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
return list;
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007AE8 RID: 31464 RVA: 0x00198BE4 File Offset: 0x00196DE4
|
||||
[Token(Token = "0x6007AE8")]
|
||||
[Address(RVA = "0x530ED0", Offset = "0x52F8D0", VA = "0x180530ED0", Slot = "33")]
|
||||
public virtual int GetBasicConstraints()
|
||||
{
|
||||
BasicConstraints basicConstraints = this.basicConstraints;
|
||||
if (basicConstraints == 0 || !basicConstraints.IsCA())
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (this.basicConstraints.PathLenConstraint != 0)
|
||||
{
|
||||
return this.basicConstraints.PathLenConstraint.IntValue;
|
||||
}
|
||||
return int.MaxValue;
|
||||
}
|
||||
|
||||
// Token: 0x06007AE9 RID: 31465 RVA: 0x00198C34 File Offset: 0x00196E34
|
||||
[Token(Token = "0x6007AE9")]
|
||||
[Address(RVA = "0x531530", Offset = "0x52FF30", VA = "0x180531530", Slot = "34")]
|
||||
public virtual ICollection GetSubjectAlternativeNames()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007AE9)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.ICollection BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Certificate::GetSubjectAlternativeNames()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:ISet(var_0_06, call:ISet(IX509Extension::GetCriticalExtensionOids, ldloc:X509Certificate[exp:IX509Extension](this)))
|
||||
}
|
||||
|
||||
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: 0x06007AEA RID: 31466 RVA: 0x00198C48 File Offset: 0x00196E48
|
||||
[Token(Token = "0x6007AEA")]
|
||||
[Address(RVA = "0x531390", Offset = "0x52FD90", VA = "0x180531390", Slot = "35")]
|
||||
public virtual ICollection GetIssuerAlternativeNames()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007AEA)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.ICollection BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Certificate::GetIssuerAlternativeNames()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:ISet(var_0_06, call:ISet(IX509Extension::GetCriticalExtensionOids, ldloc:X509Certificate[exp:IX509Extension](this)))
|
||||
}
|
||||
|
||||
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: 0x06007AEB RID: 31467 RVA: 0x00198C5C File Offset: 0x00196E5C
|
||||
[Token(Token = "0x6007AEB")]
|
||||
[Address(RVA = "0x530CC0", Offset = "0x52F6C0", VA = "0x180530CC0", Slot = "36")]
|
||||
protected virtual ICollection GetAlternativeNames(string oid)
|
||||
{
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
||||
if (this.GetCriticalExtensionOids() != 0)
|
||||
{
|
||||
Asn1Object asn1Object;
|
||||
GeneralNames instance = GeneralNames.GetInstance(asn1Object);
|
||||
IList list = Platform.CreateArrayList();
|
||||
GeneralName[] names = instance.GetNames();
|
||||
int num = 0;
|
||||
int length = names.Length;
|
||||
if (num < length)
|
||||
{
|
||||
GeneralName generalName = names[num];
|
||||
IList list2 = Platform.CreateArrayList();
|
||||
int tag = generalName.tag;
|
||||
int hashCode = generalName.obj.GetHashCode();
|
||||
num++;
|
||||
}
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007AEC RID: 31468 RVA: 0x00198CDC File Offset: 0x00196EDC
|
||||
[Token(Token = "0x6007AEC")]
|
||||
[Address(RVA = "0x5315B0", Offset = "0x52FFB0", VA = "0x1805315B0", Slot = "8")]
|
||||
protected override X509Extensions GetX509Extensions()
|
||||
{
|
||||
int version = this.c.Version;
|
||||
return this.c.tbsCert.extensions;
|
||||
}
|
||||
|
||||
// Token: 0x06007AED RID: 31469 RVA: 0x00198D10 File Offset: 0x00196F10
|
||||
[Token(Token = "0x6007AED")]
|
||||
[Address(RVA = "0x531460", Offset = "0x52FE60", VA = "0x180531460", Slot = "37")]
|
||||
public virtual AsymmetricKeyParameter GetPublicKey()
|
||||
{
|
||||
return PublicKeyFactory.CreateKey(this.c.SubjectPublicKeyInfo);
|
||||
}
|
||||
|
||||
// Token: 0x06007AEE RID: 31470 RVA: 0x00198D34 File Offset: 0x00196F34
|
||||
[Token(Token = "0x6007AEE")]
|
||||
[Address(RVA = "0x4DE0B0", Offset = "0x4DCAB0", VA = "0x1804DE0B0", Slot = "38")]
|
||||
public virtual byte[] GetEncoded()
|
||||
{
|
||||
return this.c.GetDerEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x06007AEF RID: 31471 RVA: 0x00198D54 File Offset: 0x00196F54
|
||||
[Token(Token = "0x6007AEF")]
|
||||
[Address(RVA = "0x530C00", Offset = "0x52F600", VA = "0x180530C00", Slot = "0")]
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj != this)
|
||||
{
|
||||
if (obj != 0 && obj != 0)
|
||||
{
|
||||
Asn1Object asn1Object = this.c.ToAsn1Object();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x06007AF0 RID: 31472 RVA: 0x00198D84 File Offset: 0x00196F84
|
||||
[Token(Token = "0x6007AF0")]
|
||||
[Address(RVA = "0x5312B0", Offset = "0x52FCB0", VA = "0x1805312B0", Slot = "2")]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = 0;
|
||||
if ((this.hashValueSet ? 1 : 0) == num)
|
||||
{
|
||||
this.c.Finalize();
|
||||
this.hashValueSet = true;
|
||||
}
|
||||
Monitor.Exit(this);
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
return this.hashValue;
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007AF1 RID: 31473 RVA: 0x00198DC8 File Offset: 0x00196FC8
|
||||
[Token(Token = "0x6007AF1")]
|
||||
[Address(RVA = "0x5317D0", Offset = "0x5301D0", VA = "0x1805317D0", Slot = "3")]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder;
|
||||
X509Extensions extensions;
|
||||
int num6;
|
||||
do
|
||||
{
|
||||
stringBuilder = new StringBuilder();
|
||||
string newLine = Platform.NewLine;
|
||||
StringBuilder stringBuilder2 = stringBuilder.Append(" [0] Version: ");
|
||||
StringBuilder stringBuilder4;
|
||||
StringBuilder stringBuilder3 = stringBuilder4.Append(newLine);
|
||||
StringBuilder stringBuilder5 = stringBuilder.Append(" SerialNumber: ");
|
||||
int version = this.Version;
|
||||
StringBuilder stringBuilder6 = stringBuilder5.Append(version).Append(newLine);
|
||||
StringBuilder stringBuilder7 = stringBuilder.Append(" IssuerDN: ");
|
||||
BigInteger serialNumber = this.SerialNumber;
|
||||
StringBuilder stringBuilder8 = stringBuilder7.Append(serialNumber).Append(newLine);
|
||||
StringBuilder stringBuilder9 = stringBuilder.Append(" Start Date: ");
|
||||
X509Name subjectDN = this.SubjectDN;
|
||||
StringBuilder stringBuilder10 = stringBuilder9.Append(subjectDN).Append(newLine);
|
||||
StringBuilder stringBuilder11 = stringBuilder.Append(" Final Date: ");
|
||||
DateTime notBefore = this.NotBefore;
|
||||
StringBuilder stringBuilder12 = stringBuilder11.Append(notBefore).Append(newLine);
|
||||
StringBuilder stringBuilder13 = stringBuilder.Append(" SubjectDN: ");
|
||||
X509Name issuerDN = this.IssuerDN;
|
||||
StringBuilder stringBuilder14 = stringBuilder13.Append(issuerDN).Append(newLine);
|
||||
StringBuilder stringBuilder15 = stringBuilder.Append(" Public Key: ");
|
||||
StringBuilder stringBuilder17;
|
||||
StringBuilder stringBuilder16 = stringBuilder17.Append(newLine);
|
||||
StringBuilder stringBuilder18 = stringBuilder.Append(" Signature Algorithm: ");
|
||||
byte[] signature = this.GetSignature();
|
||||
StringBuilder stringBuilder20;
|
||||
StringBuilder stringBuilder19 = stringBuilder20.Append(newLine);
|
||||
byte[] tbsCertificate = this.GetTbsCertificate();
|
||||
StringBuilder stringBuilder21 = stringBuilder.Append(" Signature: ");
|
||||
int num = 0;
|
||||
string text = Hex.ToHexString(tbsCertificate, num, 20);
|
||||
StringBuilder stringBuilder22 = stringBuilder21.Append(text).Append(newLine);
|
||||
int length = tbsCertificate.Length;
|
||||
uint num2;
|
||||
if (num2 < (uint)length)
|
||||
{
|
||||
int num3 = tbsCertificate.Length;
|
||||
num3 -= (int)num2;
|
||||
int num4 = Math.Min(20, num3);
|
||||
StringBuilder stringBuilder23 = stringBuilder.Append(" ");
|
||||
string text2 = Hex.ToHexString(tbsCertificate, (int)num2, num4);
|
||||
StringBuilder stringBuilder24 = stringBuilder23.Append(text2).Append(newLine);
|
||||
num2 += (uint)20;
|
||||
}
|
||||
extensions = this.c.tbsCert.extensions;
|
||||
if (extensions == 0)
|
||||
{
|
||||
goto IL_30B;
|
||||
}
|
||||
int num5;
|
||||
if (extensions.ExtensionOids != 0)
|
||||
{
|
||||
num5 = 0;
|
||||
StringBuilder stringBuilder25 = stringBuilder.Append(" Extensions: \n");
|
||||
}
|
||||
num6 = 0;
|
||||
if (num6 < num5)
|
||||
{
|
||||
num6 += num6;
|
||||
num6++;
|
||||
}
|
||||
if (num6 == 0)
|
||||
{
|
||||
num6++;
|
||||
num6 += 19;
|
||||
}
|
||||
}
|
||||
while (num6 == 0);
|
||||
X509Extension extension = extensions.GetExtension(num6);
|
||||
Asn1OctetString value = extension.value;
|
||||
int num7;
|
||||
if (value != 0)
|
||||
{
|
||||
Stream octetStream = value.GetOctetStream();
|
||||
StringBuilder stringBuilder26 = stringBuilder.Append(" critical(");
|
||||
bool critical = extension.critical;
|
||||
StringBuilder stringBuilder27 = stringBuilder26.Append(critical).Append(") ");
|
||||
StringBuilder stringBuilder28 = stringBuilder.Append(" value = ");
|
||||
Asn1Object asn1Object;
|
||||
string text3 = Asn1Dump.DumpAsString(asn1Object);
|
||||
StringBuilder stringBuilder29 = stringBuilder28.Append(text3);
|
||||
VerisignCzagExtension verisignCzagExtension = new VerisignCzagExtension(verisignCzagExtension);
|
||||
StringBuilder stringBuilder30 = stringBuilder.Append(verisignCzagExtension);
|
||||
NetscapeRevocationUrl netscapeRevocationUrl = new NetscapeRevocationUrl(netscapeRevocationUrl);
|
||||
StringBuilder stringBuilder31 = stringBuilder.Append(netscapeRevocationUrl);
|
||||
NetscapeCertType netscapeCertType = new NetscapeCertType(netscapeCertType);
|
||||
StringBuilder stringBuilder32 = stringBuilder.Append(netscapeCertType);
|
||||
KeyUsage instance = KeyUsage.GetInstance(asn1Object);
|
||||
StringBuilder stringBuilder33 = stringBuilder.Append(instance);
|
||||
BasicConstraints instance2 = BasicConstraints.GetInstance(asn1Object);
|
||||
StringBuilder stringBuilder34 = stringBuilder.Append(instance2);
|
||||
StringBuilder stringBuilder35 = stringBuilder.Append(" value = ").Append("*****");
|
||||
num7 = 0;
|
||||
}
|
||||
num7 += num7;
|
||||
num7++;
|
||||
while (num7 != 0)
|
||||
{
|
||||
}
|
||||
IL_30B:
|
||||
int num8 = stringBuilder.GetHashCode();
|
||||
num8 += 19;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007AF2 RID: 31474 RVA: 0x001990F4 File Offset: 0x001972F4
|
||||
[Token(Token = "0x6007AF2")]
|
||||
[Address(RVA = "0x532410", Offset = "0x530E10", VA = "0x180532410", Slot = "39")]
|
||||
public virtual void Verify(AsymmetricKeyParameter key)
|
||||
{
|
||||
Asn1VerifierFactory asn1VerifierFactory = new Asn1VerifierFactory(this.c.sigAlgID, key);
|
||||
ISet criticalExtensionOids = ((IX509Extension)this).GetCriticalExtensionOids();
|
||||
}
|
||||
|
||||
// Token: 0x06007AF3 RID: 31475 RVA: 0x00199120 File Offset: 0x00197320
|
||||
[Token(Token = "0x6007AF3")]
|
||||
[Address(RVA = "0x532390", Offset = "0x530D90", VA = "0x180532390", Slot = "40")]
|
||||
public virtual void Verify(IVerifierFactoryProvider verifierProvider)
|
||||
{
|
||||
X509CertificateStructure x509CertificateStructure = this.c;
|
||||
ISet criticalExtensionOids = ((IX509Extension)this).GetCriticalExtensionOids();
|
||||
}
|
||||
|
||||
// Token: 0x06007AF4 RID: 31476 RVA: 0x00199144 File Offset: 0x00197344
|
||||
[Token(Token = "0x6007AF4")]
|
||||
[Address(RVA = "0x5306A0", Offset = "0x52F0A0", VA = "0x1805306A0", Slot = "41")]
|
||||
protected virtual void CheckSignature(IVerifierFactory verifier)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007AF4)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Certificate::CheckSignature(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IVerifierFactory)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_AB:
|
||||
stloc:CertificateException(var_14_B5, newobj:CertificateException(CertificateException::.ctor, ldstr:string("signature algorithm in TBS cert not same as outer cert")))
|
||||
}
|
||||
|
||||
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: 0x06007AF5 RID: 31477 RVA: 0x00199208 File Offset: 0x00197408
|
||||
[Token(Token = "0x6007AF5")]
|
||||
[Address(RVA = "0x531600", Offset = "0x530000", VA = "0x180531600")]
|
||||
private static bool IsAlgIDEqual(AlgorithmIdentifier id1, AlgorithmIdentifier id2)
|
||||
{
|
||||
Asn1Object asn1Object = id1.ToAsn1Object();
|
||||
if (id2.ToAsn1Object() == 0)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
DerObjectIdentifier objectID = id1.ObjectID;
|
||||
DerObjectIdentifier objectID2 = id2.ObjectID;
|
||||
bool flag = objectID2 == 0;
|
||||
if (objectID == 0 != flag)
|
||||
{
|
||||
if (objectID == 0)
|
||||
{
|
||||
}
|
||||
return objectID.ToAsn1Object() != 0;
|
||||
}
|
||||
return object.Equals(objectID, objectID2);
|
||||
}
|
||||
|
||||
// Token: 0x0400583F RID: 22591
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400583F")]
|
||||
private readonly X509CertificateStructure c;
|
||||
|
||||
// Token: 0x04005840 RID: 22592
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4005840")]
|
||||
private readonly BasicConstraints basicConstraints;
|
||||
|
||||
// Token: 0x04005841 RID: 22593
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4005841")]
|
||||
private readonly bool[] keyUsage;
|
||||
|
||||
// Token: 0x04005842 RID: 22594
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4005842")]
|
||||
private bool hashValueSet;
|
||||
|
||||
// Token: 0x04005843 RID: 22595
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x2C")]
|
||||
[Token(Token = "0x4005843")]
|
||||
private int hashValue;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,164 @@
|
||||
using System;
|
||||
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.Security.Certificates;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x02001326 RID: 4902
|
||||
[Token(Token = "0x2001326")]
|
||||
[StructLayout(3)]
|
||||
public class X509CertificatePair
|
||||
{
|
||||
// Token: 0x06007AF6 RID: 31478 RVA: 0x00199260 File Offset: 0x00197460
|
||||
[Token(Token = "0x6007AF6")]
|
||||
[Address(RVA = "0x3C39C0", Offset = "0x3C23C0", VA = "0x1803C39C0")]
|
||||
public X509CertificatePair(X509Certificate forward, X509Certificate reverse)
|
||||
{
|
||||
this.forward = forward;
|
||||
this.reverse = reverse;
|
||||
}
|
||||
|
||||
// Token: 0x06007AF7 RID: 31479 RVA: 0x00199284 File Offset: 0x00197484
|
||||
[Token(Token = "0x6007AF7")]
|
||||
[Address(RVA = "0x52FB70", Offset = "0x52E570", VA = "0x18052FB70")]
|
||||
public X509CertificatePair(CertificatePair pair)
|
||||
{
|
||||
X509CertificateStructure x509CertificateStructure = pair.forward;
|
||||
if (x509CertificateStructure != 0)
|
||||
{
|
||||
X509Certificate x509Certificate = new X509Certificate(x509CertificateStructure);
|
||||
this.forward = x509Certificate;
|
||||
}
|
||||
X509CertificateStructure x509CertificateStructure2 = pair.reverse;
|
||||
if (x509CertificateStructure2 != 0)
|
||||
{
|
||||
X509Certificate x509Certificate2 = new X509Certificate(x509CertificateStructure2);
|
||||
this.reverse = x509Certificate2;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007AF8 RID: 31480 RVA: 0x001992D0 File Offset: 0x001974D0
|
||||
[Token(Token = "0x6007AF8")]
|
||||
[Address(RVA = "0x52F940", Offset = "0x52E340", VA = "0x18052F940")]
|
||||
public byte[] GetEncoded()
|
||||
{
|
||||
int num = 0;
|
||||
X509Certificate x509Certificate = this.forward;
|
||||
if (x509Certificate != 0)
|
||||
{
|
||||
AsymmetricKeyParameter publicKey = x509Certificate.GetPublicKey();
|
||||
Asn1Object asn1Object;
|
||||
if (X509CertificateStructure.GetInstance(asn1Object) == 0)
|
||||
{
|
||||
CertificateEncodingException ex = new CertificateEncodingException("unable to get encoding for forward");
|
||||
goto IL_61;
|
||||
}
|
||||
}
|
||||
X509Certificate x509Certificate2 = this.reverse;
|
||||
X509CertificateStructure instance;
|
||||
if (x509Certificate2 != 0)
|
||||
{
|
||||
AsymmetricKeyParameter publicKey2 = x509Certificate2.GetPublicKey();
|
||||
Asn1Object asn1Object2;
|
||||
instance = X509CertificateStructure.GetInstance(asn1Object2);
|
||||
if (instance == 0)
|
||||
{
|
||||
goto IL_61;
|
||||
}
|
||||
}
|
||||
return new CertificatePair(num, instance).GetDerEncoded();
|
||||
IL_61:
|
||||
CertificateEncodingException ex2 = new CertificateEncodingException("unable to get encoding for reverse");
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x1700140C RID: 5132
|
||||
// (get) Token: 0x06007AF9 RID: 31481 RVA: 0x00199350 File Offset: 0x00197550
|
||||
[Token(Token = "0x1700140C")]
|
||||
public X509Certificate Forward
|
||||
{
|
||||
[Token(Token = "0x6007AF9")]
|
||||
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0")]
|
||||
get
|
||||
{
|
||||
return this.forward;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700140D RID: 5133
|
||||
// (get) Token: 0x06007AFA RID: 31482 RVA: 0x00199364 File Offset: 0x00197564
|
||||
[Token(Token = "0x1700140D")]
|
||||
public X509Certificate Reverse
|
||||
{
|
||||
[Token(Token = "0x6007AFA")]
|
||||
[Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240")]
|
||||
get
|
||||
{
|
||||
return this.reverse;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007AFB RID: 31483 RVA: 0x00199378 File Offset: 0x00197578
|
||||
[Token(Token = "0x6007AFB")]
|
||||
[Address(RVA = "0x52F870", Offset = "0x52E270", VA = "0x18052F870", Slot = "0")]
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj != this)
|
||||
{
|
||||
if (obj != 0 && obj != 0)
|
||||
{
|
||||
X509Certificate x509Certificate = this.forward;
|
||||
bool flag;
|
||||
if (flag)
|
||||
{
|
||||
X509Certificate x509Certificate2 = this.reverse;
|
||||
bool flag2;
|
||||
return flag2;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x06007AFC RID: 31484 RVA: 0x001993AC File Offset: 0x001975AC
|
||||
[Token(Token = "0x6007AFC")]
|
||||
[Address(RVA = "0x52FB00", Offset = "0x52E500", VA = "0x18052FB00", Slot = "2")]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007AFC)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509CertificatePair::GetHashCode()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_1:
|
||||
callvirt:void(object::Finalize, ldloc:X509Certificate[exp:object](var_1_17))
|
||||
stloc:int64(var_2_28, mul:uint32[exp:int64](conv.u4:uint32(ldc.i4:int32[exp:uint32](-1)), conv.u4:uint32(ldc.i4:int32[exp:uint32](17))))
|
||||
}
|
||||
|
||||
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: 0x04005844 RID: 22596
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005844")]
|
||||
private readonly X509Certificate forward;
|
||||
|
||||
// Token: 0x04005845 RID: 22597
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4005845")]
|
||||
private readonly X509Certificate reverse;
|
||||
}
|
||||
}
|
||||
+207
@@ -0,0 +1,207 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x02001327 RID: 4903
|
||||
[Token(Token = "0x2001327")]
|
||||
[StructLayout(3)]
|
||||
public class X509CertificateParser
|
||||
{
|
||||
// Token: 0x06007AFD RID: 31485 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6007AFD")]
|
||||
[Address(RVA = "0x530370", Offset = "0x52ED70", VA = "0x180530370")]
|
||||
private X509Certificate ReadDerCertificate(Asn1InputStream dIn)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06007AFE RID: 31486 RVA: 0x001993E4 File Offset: 0x001975E4
|
||||
[Token(Token = "0x6007AFE")]
|
||||
[Address(RVA = "0x52FC90", Offset = "0x52E690", VA = "0x18052FC90")]
|
||||
private X509Certificate GetCertificate()
|
||||
{
|
||||
if (this.sData != (ulong)0L)
|
||||
{
|
||||
Asn1Set asn1Set = this.sData;
|
||||
Asn1Encodable asn1Encodable;
|
||||
if (this.sDataObjectCount < asn1Encodable)
|
||||
{
|
||||
int num = this.sDataObjectCount;
|
||||
Asn1Set asn1Set2 = this.sData;
|
||||
int num2 = num + 1;
|
||||
this.sDataObjectCount = num2;
|
||||
IEnumerator enumerator = asn1Set2.GetEnumerator();
|
||||
while (enumerator == 0)
|
||||
{
|
||||
}
|
||||
while (enumerator == 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007AFF RID: 31487 RVA: 0x00199444 File Offset: 0x00197644
|
||||
[Token(Token = "0x6007AFF")]
|
||||
[Address(RVA = "0x530590", Offset = "0x52EF90", VA = "0x180530590")]
|
||||
private X509Certificate ReadPemCertificate(Stream inStream)
|
||||
{
|
||||
Asn1Sequence asn1Sequence = X509CertificateParser.PemCertParser.ReadPemObject(inStream);
|
||||
if (asn1Sequence == 0)
|
||||
{
|
||||
}
|
||||
X509CertificateStructure instance = X509CertificateStructure.GetInstance(asn1Sequence);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007B00 RID: 31488 RVA: 0x00199470 File Offset: 0x00197670
|
||||
[Token(Token = "0x6007B00")]
|
||||
[Address(RVA = "0x52FC30", Offset = "0x52E630", VA = "0x18052FC30", Slot = "4")]
|
||||
protected virtual X509Certificate CreateX509Certificate(X509CertificateStructure c)
|
||||
{
|
||||
return new X509Certificate(c);
|
||||
}
|
||||
|
||||
// Token: 0x06007B01 RID: 31489 RVA: 0x00199484 File Offset: 0x00197684
|
||||
[Token(Token = "0x6007B01")]
|
||||
[Address(RVA = "0x52FDB0", Offset = "0x52E7B0", VA = "0x18052FDB0")]
|
||||
public X509Certificate ReadCertificate(byte[] input)
|
||||
{
|
||||
int num;
|
||||
MemoryStream memoryStream = new MemoryStream(input, num != 0);
|
||||
num = 0;
|
||||
return this.ReadCertificate(memoryStream);
|
||||
}
|
||||
|
||||
// Token: 0x06007B02 RID: 31490 RVA: 0x001994A4 File Offset: 0x001976A4
|
||||
[Token(Token = "0x6007B02")]
|
||||
[Address(RVA = "0x5300C0", Offset = "0x52EAC0", VA = "0x1805300C0")]
|
||||
public ICollection ReadCertificates(byte[] input)
|
||||
{
|
||||
MemoryStream memoryStream;
|
||||
do
|
||||
{
|
||||
int num;
|
||||
memoryStream = new MemoryStream(input, num != 0);
|
||||
num = 0;
|
||||
IList list = Platform.CreateArrayList();
|
||||
int num2 = 0;
|
||||
if (this.ReadCertificate(memoryStream) == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
int num3 = 0;
|
||||
if (num3 < num2)
|
||||
{
|
||||
num3 += num3;
|
||||
num3++;
|
||||
}
|
||||
}
|
||||
while (this.ReadCertificate(memoryStream) != 0);
|
||||
memoryStream += memoryStream;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007B03 RID: 31491 RVA: 0x001994FC File Offset: 0x001976FC
|
||||
[Token(Token = "0x6007B03")]
|
||||
[Address(RVA = "0x52FE20", Offset = "0x52E820", VA = "0x18052FE20")]
|
||||
public X509Certificate ReadCertificate(Stream inStream)
|
||||
{
|
||||
if (inStream != 0)
|
||||
{
|
||||
inStream.Dispose();
|
||||
Stream stream = this.currentStream;
|
||||
int num = 0;
|
||||
if (stream == 0 || stream != inStream)
|
||||
{
|
||||
this.sDataObjectCount = num;
|
||||
this.sData = num;
|
||||
this.currentStream = inStream;
|
||||
}
|
||||
string text;
|
||||
if (this.sData == 0)
|
||||
{
|
||||
PushbackStream pushbackStream = new PushbackStream(inStream);
|
||||
int num2;
|
||||
pushbackStream.WriteByte((byte)num2);
|
||||
if (num2 == 48)
|
||||
{
|
||||
Asn1InputStream asn1InputStream = new Asn1InputStream(pushbackStream);
|
||||
X509Certificate x509Certificate = this.ReadDerCertificate(asn1InputStream);
|
||||
}
|
||||
Asn1Sequence asn1Sequence = X509CertificateParser.PemCertParser.ReadPemObject(pushbackStream);
|
||||
if (asn1Sequence != 0)
|
||||
{
|
||||
X509CertificateStructure instance = X509CertificateStructure.GetInstance(asn1Sequence);
|
||||
text = this.ToString();
|
||||
}
|
||||
}
|
||||
int num3 = this.sDataObjectCount;
|
||||
this.sData = text;
|
||||
this.sDataObjectCount = text;
|
||||
return this.GetCertificate();
|
||||
}
|
||||
ArgumentNullException ex = new ArgumentNullException("inStream");
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007B04 RID: 31492 RVA: 0x001995E8 File Offset: 0x001977E8
|
||||
[Token(Token = "0x6007B04")]
|
||||
[Address(RVA = "0x530230", Offset = "0x52EC30", VA = "0x180530230")]
|
||||
public ICollection ReadCertificates(Stream inStream)
|
||||
{
|
||||
do
|
||||
{
|
||||
IList list = Platform.CreateArrayList();
|
||||
int num = 0;
|
||||
if (this.ReadCertificate(inStream) == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
int num2 = 0;
|
||||
if (num2 < num)
|
||||
{
|
||||
num2 += num2;
|
||||
num2++;
|
||||
}
|
||||
}
|
||||
while (this.ReadCertificate(inStream) != 0);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007B05 RID: 31493 RVA: 0x00199628 File Offset: 0x00197828
|
||||
[Token(Token = "0x6007B05")]
|
||||
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
||||
public X509CertificateParser()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04005846 RID: 22598
|
||||
[Token(Token = "0x4005846")]
|
||||
private static readonly PemParser PemCertParser = new PemParser("CERTIFICATE");
|
||||
|
||||
// Token: 0x04005847 RID: 22599
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005847")]
|
||||
private Asn1Set sData;
|
||||
|
||||
// Token: 0x04005848 RID: 22600
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4005848")]
|
||||
private int sDataObjectCount;
|
||||
|
||||
// Token: 0x04005849 RID: 22601
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4005849")]
|
||||
private Stream currentStream;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,526 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Operators;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Security.Certificates;
|
||||
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.Utilities.Encoders;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x02001328 RID: 4904
|
||||
[Token(Token = "0x2001328")]
|
||||
[StructLayout(3)]
|
||||
public class X509Crl : X509ExtensionBase
|
||||
{
|
||||
// Token: 0x06007B07 RID: 31495 RVA: 0x00199658 File Offset: 0x00197858
|
||||
[Token(Token = "0x6007B07")]
|
||||
[Address(RVA = "0x536970", Offset = "0x535370", VA = "0x180536970")]
|
||||
public X509Crl(CertificateList c)
|
||||
{
|
||||
this.c = c;
|
||||
string signatureName = X509SignatureUtilities.GetSignatureName(c.sigAlgID);
|
||||
this.sigAlgName = signatureName;
|
||||
DerObjectIdentifier objectID = c.sigAlgID.ObjectID;
|
||||
if (objectID == 0)
|
||||
{
|
||||
this.sigAlgParams = objectID;
|
||||
}
|
||||
byte[] derEncoded = c.sigAlgID.ObjectID.GetDerEncoded();
|
||||
this.sigAlgParams = derEncoded;
|
||||
bool flag;
|
||||
this.isIndirect = flag;
|
||||
}
|
||||
|
||||
// Token: 0x06007B08 RID: 31496 RVA: 0x001996DC File Offset: 0x001978DC
|
||||
[Token(Token = "0x6007B08")]
|
||||
[Address(RVA = "0x5356C0", Offset = "0x5340C0", VA = "0x1805356C0", Slot = "8")]
|
||||
protected override X509Extensions GetX509Extensions()
|
||||
{
|
||||
int version = this.c.Version;
|
||||
return this.c.tbsCertList.crlExtensions;
|
||||
}
|
||||
|
||||
// Token: 0x06007B09 RID: 31497 RVA: 0x00199710 File Offset: 0x00197910
|
||||
[Token(Token = "0x6007B09")]
|
||||
[Address(RVA = "0x5351D0", Offset = "0x533BD0", VA = "0x1805351D0", Slot = "13")]
|
||||
public virtual byte[] GetEncoded()
|
||||
{
|
||||
return this.c.GetDerEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x06007B0A RID: 31498 RVA: 0x00199734 File Offset: 0x00197934
|
||||
[Token(Token = "0x6007B0A")]
|
||||
[Address(RVA = "0x536870", Offset = "0x535270", VA = "0x180536870", Slot = "14")]
|
||||
public virtual void Verify(AsymmetricKeyParameter publicKey)
|
||||
{
|
||||
Asn1VerifierFactoryProvider asn1VerifierFactoryProvider = new Asn1VerifierFactoryProvider(publicKey);
|
||||
ISet criticalExtensionOids = ((IX509Extension)this).GetCriticalExtensionOids();
|
||||
}
|
||||
|
||||
// Token: 0x06007B0B RID: 31499 RVA: 0x00199750 File Offset: 0x00197950
|
||||
[Token(Token = "0x6007B0B")]
|
||||
[Address(RVA = "0x5368F0", Offset = "0x5352F0", VA = "0x1805368F0", Slot = "15")]
|
||||
public virtual void Verify(IVerifierFactoryProvider verifierProvider)
|
||||
{
|
||||
CertificateList certificateList = this.c;
|
||||
ISet criticalExtensionOids = ((IX509Extension)this).GetCriticalExtensionOids();
|
||||
}
|
||||
|
||||
// Token: 0x06007B0C RID: 31500 RVA: 0x00199774 File Offset: 0x00197974
|
||||
[Token(Token = "0x6007B0C")]
|
||||
[Address(RVA = "0x534EA0", Offset = "0x5338A0", VA = "0x180534EA0", Slot = "16")]
|
||||
protected virtual void CheckSignature(IVerifierFactory verifier)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007B0C)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Crl::CheckSignature(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IVerifierFactory)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_55:
|
||||
stloc:CrlException(var_8_5F, newobj:CrlException(CrlException::.ctor, ldstr:string("Signature algorithm on CertificateList does not match TbsCertList.")))
|
||||
}
|
||||
|
||||
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: 0x1700140E RID: 5134
|
||||
// (get) Token: 0x06007B0D RID: 31501 RVA: 0x001997E4 File Offset: 0x001979E4
|
||||
[Token(Token = "0x1700140E")]
|
||||
public virtual int Version
|
||||
{
|
||||
[Token(Token = "0x6007B0D")]
|
||||
[Address(RVA = "0x5329F0", Offset = "0x5313F0", VA = "0x1805329F0", Slot = "17")]
|
||||
get
|
||||
{
|
||||
return this.c.Version;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700140F RID: 5135
|
||||
// (get) Token: 0x06007B0E RID: 31502 RVA: 0x00199804 File Offset: 0x00197A04
|
||||
[Token(Token = "0x1700140F")]
|
||||
public virtual X509Name IssuerDN
|
||||
{
|
||||
[Token(Token = "0x6007B0E")]
|
||||
[Address(RVA = "0x536C00", Offset = "0x535600", VA = "0x180536C00", Slot = "18")]
|
||||
get
|
||||
{
|
||||
return this.c.Issuer;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001410 RID: 5136
|
||||
// (get) Token: 0x06007B0F RID: 31503 RVA: 0x00199824 File Offset: 0x00197A24
|
||||
[Token(Token = "0x17001410")]
|
||||
public virtual DateTime ThisUpdate
|
||||
{
|
||||
[Token(Token = "0x6007B0F")]
|
||||
[Address(RVA = "0x536CC0", Offset = "0x5356C0", VA = "0x180536CC0", Slot = "19")]
|
||||
get
|
||||
{
|
||||
return this.c.ThisUpdate.ToDateTime();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001411 RID: 5137
|
||||
// (get) Token: 0x06007B10 RID: 31504 RVA: 0x00199848 File Offset: 0x00197A48
|
||||
[Token(Token = "0x17001411")]
|
||||
public virtual DateTimeObject NextUpdate
|
||||
{
|
||||
[Token(Token = "0x6007B10")]
|
||||
[Address(RVA = "0x536C20", Offset = "0x535620", VA = "0x180536C20", Slot = "20")]
|
||||
get
|
||||
{
|
||||
if (this.c.NextUpdate == 0)
|
||||
{
|
||||
}
|
||||
return new DateTimeObject(this.c.NextUpdate.ToDateTime());
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007B11 RID: 31505 RVA: 0x00199880 File Offset: 0x00197A80
|
||||
[Token(Token = "0x6007B11")]
|
||||
[Address(RVA = "0x5357F0", Offset = "0x5341F0", VA = "0x1805357F0")]
|
||||
private ISet LoadCrlEntries()
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
HashSet hashSet = new HashSet();
|
||||
IEnumerable revokedCertificateEnumeration = this.c.GetRevokedCertificateEnumeration();
|
||||
int version = this.Version;
|
||||
if (version != 0)
|
||||
{
|
||||
if (num < version)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
bool flag = this.isIndirect;
|
||||
if (version == 0)
|
||||
{
|
||||
}
|
||||
if (version == 0)
|
||||
{
|
||||
goto IL_9D;
|
||||
}
|
||||
X509CrlEntry x509CrlEntry;
|
||||
x509CrlEntry.c = version;
|
||||
x509CrlEntry.isIndirect = flag;
|
||||
x509CrlEntry.previousCertificateIssuer = version;
|
||||
X509Name x509Name = x509CrlEntry.loadCertificateIssuer();
|
||||
x509CrlEntry.certificateIssuer = x509Name;
|
||||
uint num2;
|
||||
if (num < (int)num2)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
x509CrlEntry += x509CrlEntry;
|
||||
num += 19;
|
||||
}
|
||||
if (num != 0)
|
||||
{
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
throw new NullReferenceException();
|
||||
IL_9D:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007B12 RID: 31506 RVA: 0x00199930 File Offset: 0x00197B30
|
||||
[Token(Token = "0x6007B12")]
|
||||
[Address(RVA = "0x535280", Offset = "0x533C80", VA = "0x180535280", Slot = "21")]
|
||||
public virtual X509CrlEntry GetRevokedCertificate(BigInteger serialNumber)
|
||||
{
|
||||
X509CrlEntry x509CrlEntry;
|
||||
for (;;)
|
||||
{
|
||||
int num = 0;
|
||||
IEnumerable enumerable;
|
||||
if (enumerable != 0)
|
||||
{
|
||||
if (enumerable == 0)
|
||||
{
|
||||
}
|
||||
if (enumerable == 0)
|
||||
{
|
||||
goto IL_6D;
|
||||
}
|
||||
x509CrlEntry.c = enumerable;
|
||||
x509CrlEntry.isIndirect = num != 0;
|
||||
x509CrlEntry.previousCertificateIssuer = enumerable;
|
||||
X509Name x509Name = x509CrlEntry.loadCertificateIssuer();
|
||||
x509CrlEntry.certificateIssuer = x509Name;
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
if (typeof(IDisposable).TypeHandle == (ulong)115L)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (typeof(IDisposable).TypeHandle == (ulong)113L)
|
||||
{
|
||||
goto IL_55;
|
||||
}
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
goto IL_55;
|
||||
}
|
||||
}
|
||||
return x509CrlEntry;
|
||||
IL_55:
|
||||
throw new NullReferenceException();
|
||||
IL_6D:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007B13 RID: 31507 RVA: 0x001999B0 File Offset: 0x00197BB0
|
||||
[Token(Token = "0x6007B13")]
|
||||
[Address(RVA = "0x535530", Offset = "0x533F30", VA = "0x180535530", Slot = "22")]
|
||||
public virtual ISet GetRevokedCertificates()
|
||||
{
|
||||
ISet set = this.LoadCrlEntries();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007B14 RID: 31508 RVA: 0x001999CC File Offset: 0x00197BCC
|
||||
[Token(Token = "0x6007B14")]
|
||||
[Address(RVA = "0x535600", Offset = "0x534000", VA = "0x180535600", Slot = "23")]
|
||||
public virtual byte[] GetTbsCertList()
|
||||
{
|
||||
return this.c.tbsCertList.GetDerEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x06007B15 RID: 31509 RVA: 0x001999FC File Offset: 0x00197BFC
|
||||
[Token(Token = "0x6007B15")]
|
||||
[Address(RVA = "0x531510", Offset = "0x52FF10", VA = "0x180531510", Slot = "24")]
|
||||
public virtual byte[] GetSignature()
|
||||
{
|
||||
return this.c.GetSignatureOctets();
|
||||
}
|
||||
|
||||
// Token: 0x17001412 RID: 5138
|
||||
// (get) Token: 0x06007B16 RID: 31510 RVA: 0x00199A1C File Offset: 0x00197C1C
|
||||
[Token(Token = "0x17001412")]
|
||||
public virtual string SigAlgName
|
||||
{
|
||||
[Token(Token = "0x6007B16")]
|
||||
[Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240", Slot = "25")]
|
||||
get
|
||||
{
|
||||
return this.sigAlgName;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001413 RID: 5139
|
||||
// (get) Token: 0x06007B17 RID: 31511 RVA: 0x00199A30 File Offset: 0x00197C30
|
||||
[Token(Token = "0x17001413")]
|
||||
public virtual string SigAlgOid
|
||||
{
|
||||
[Token(Token = "0x6007B17")]
|
||||
[Address(RVA = "0x532960", Offset = "0x531360", VA = "0x180532960", Slot = "26")]
|
||||
get
|
||||
{
|
||||
Asn1Object asn1Object = this.c.sigAlgID.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007B18 RID: 31512 RVA: 0x00199A54 File Offset: 0x00197C54
|
||||
[Token(Token = "0x6007B18")]
|
||||
[Address(RVA = "0x5355A0", Offset = "0x533FA0", VA = "0x1805355A0", Slot = "27")]
|
||||
public virtual byte[] GetSigAlgParams()
|
||||
{
|
||||
return Arrays.Clone(this.sigAlgParams);
|
||||
}
|
||||
|
||||
// Token: 0x06007B19 RID: 31513 RVA: 0x00199A6C File Offset: 0x00197C6C
|
||||
[Token(Token = "0x6007B19")]
|
||||
[Address(RVA = "0x535110", Offset = "0x533B10", VA = "0x180535110", Slot = "0")]
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj != this)
|
||||
{
|
||||
if (obj != 0 && obj != 0)
|
||||
{
|
||||
Asn1Object asn1Object = this.c.ToAsn1Object();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x06007B1A RID: 31514 RVA: 0x00199A9C File Offset: 0x00197C9C
|
||||
[Token(Token = "0x6007B1A")]
|
||||
[Address(RVA = "0x528AC0", Offset = "0x5274C0", VA = "0x180528AC0", Slot = "2")]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
Asn1Object asn1Object = this.c.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007B1B RID: 31515 RVA: 0x00199ABC File Offset: 0x00197CBC
|
||||
[Token(Token = "0x6007B1B")]
|
||||
[Address(RVA = "0x535B20", Offset = "0x534520", VA = "0x180535B20", Slot = "3")]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder;
|
||||
int num8;
|
||||
do
|
||||
{
|
||||
int num = 0;
|
||||
stringBuilder = new StringBuilder();
|
||||
string newLine = Platform.NewLine;
|
||||
StringBuilder stringBuilder2 = stringBuilder.Append(" Version: ");
|
||||
StringBuilder stringBuilder4;
|
||||
StringBuilder stringBuilder3 = stringBuilder4.Append(newLine);
|
||||
StringBuilder stringBuilder5 = stringBuilder.Append(" IssuerDN: ");
|
||||
int version = this.Version;
|
||||
StringBuilder stringBuilder6 = stringBuilder5.Append(version).Append(newLine);
|
||||
StringBuilder stringBuilder7 = stringBuilder.Append(" This update: ");
|
||||
X509Name issuerDN = this.IssuerDN;
|
||||
StringBuilder stringBuilder8 = stringBuilder7.Append(issuerDN).Append(newLine);
|
||||
StringBuilder stringBuilder9 = stringBuilder.Append(" Next update: ");
|
||||
DateTime thisUpdate = this.ThisUpdate;
|
||||
StringBuilder stringBuilder10 = stringBuilder9.Append(thisUpdate).Append(newLine);
|
||||
StringBuilder stringBuilder11 = stringBuilder.Append(" Signature Algorithm: ");
|
||||
byte[] signature = this.GetSignature();
|
||||
StringBuilder stringBuilder13;
|
||||
StringBuilder stringBuilder12 = stringBuilder13.Append(newLine);
|
||||
byte[] tbsCertList = this.GetTbsCertList();
|
||||
StringBuilder stringBuilder14 = stringBuilder.Append(" Signature: ");
|
||||
int num2 = 0;
|
||||
string text = Hex.ToHexString(tbsCertList, num2, 20);
|
||||
StringBuilder stringBuilder15 = stringBuilder.Append(text).Append(newLine);
|
||||
int length = tbsCertList.Length;
|
||||
uint num3;
|
||||
if (num3 < (uint)length)
|
||||
{
|
||||
int num4 = tbsCertList.Length;
|
||||
num4 -= (int)num3;
|
||||
int num5 = Math.Min(20, num4);
|
||||
StringBuilder stringBuilder16 = stringBuilder.Append(" ");
|
||||
string text2 = Hex.ToHexString(tbsCertList, (int)num3, num5);
|
||||
StringBuilder stringBuilder17 = stringBuilder.Append(text2).Append(newLine);
|
||||
num3 += (uint)20;
|
||||
}
|
||||
X509Extensions crlExtensions = this.c.tbsCertList.crlExtensions;
|
||||
if (crlExtensions != 0)
|
||||
{
|
||||
int num6;
|
||||
if (crlExtensions.ExtensionOids != 0)
|
||||
{
|
||||
StringBuilder stringBuilder18 = stringBuilder.Append(" Extensions: ");
|
||||
num6 = 0;
|
||||
StringBuilder stringBuilder19 = stringBuilder18.Append(newLine);
|
||||
}
|
||||
if (num < num6)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
num++;
|
||||
num += 19;
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
X509Extension extension = crlExtensions.GetExtension(num);
|
||||
if (extension.value == 0)
|
||||
{
|
||||
StringBuilder stringBuilder20 = stringBuilder.Append(newLine);
|
||||
}
|
||||
StringBuilder stringBuilder21 = stringBuilder.Append(" critical(");
|
||||
bool critical = extension.critical;
|
||||
StringBuilder stringBuilder22 = stringBuilder21.Append(critical).Append(") ");
|
||||
StringBuilder stringBuilder23 = stringBuilder.Append(" value = ");
|
||||
Asn1Object asn1Object;
|
||||
string text3 = Asn1Dump.DumpAsString(asn1Object);
|
||||
CrlDistPoint instance = CrlDistPoint.GetInstance(stringBuilder23.Append(text3).Append(newLine));
|
||||
CrlDistPoint instance2 = CrlDistPoint.GetInstance(stringBuilder.Append(instance).Append(newLine));
|
||||
IssuingDistributionPoint instance3 = IssuingDistributionPoint.GetInstance(stringBuilder.Append(instance2).Append(newLine));
|
||||
StringBuilder stringBuilder24 = stringBuilder.Append(instance3).Append(newLine);
|
||||
CrlNumber crlNumber = new CrlNumber(DerInteger.GetInstance(asn1Object).PositiveValue);
|
||||
string text4 = "Base CRL: " + crlNumber;
|
||||
StringBuilder stringBuilder25 = stringBuilder.Append(text4).Append(newLine);
|
||||
CrlNumber crlNumber2 = new CrlNumber(DerInteger.GetInstance(asn1Object).PositiveValue);
|
||||
StringBuilder stringBuilder26 = stringBuilder.Append(crlNumber2).Append(newLine);
|
||||
StringBuilder stringBuilder27 = stringBuilder.Append(" value = ").Append("*****");
|
||||
int num7 = 0;
|
||||
StringBuilder stringBuilder28 = stringBuilder27.Append(newLine);
|
||||
num8 = 0;
|
||||
if (num8 < num7)
|
||||
{
|
||||
num8 += num8;
|
||||
num8++;
|
||||
}
|
||||
while (num8 != 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
num8 += num8;
|
||||
if (stringBuilder.Append(newLine) != 0)
|
||||
{
|
||||
}
|
||||
if (num8 != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num8 != 0);
|
||||
int hashCode = stringBuilder.GetHashCode();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007B1C RID: 31516 RVA: 0x00199DE0 File Offset: 0x00197FE0
|
||||
[Token(Token = "0x6007B1C")]
|
||||
[Address(RVA = "0x535710", Offset = "0x534110", VA = "0x180535710", Slot = "28")]
|
||||
public virtual bool IsRevoked(X509Certificate cert)
|
||||
{
|
||||
CrlEntry[] revokedCertificates = this.c.GetRevokedCertificates();
|
||||
if (revokedCertificates != 0)
|
||||
{
|
||||
int version = cert.Version;
|
||||
int num = 0;
|
||||
int length = revokedCertificates.Length;
|
||||
if (num < length)
|
||||
{
|
||||
if (revokedCertificates[num].userCertificate.Value == 0)
|
||||
{
|
||||
num++;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x17001414 RID: 5140
|
||||
// (get) Token: 0x06007B1D RID: 31517 RVA: 0x00199E34 File Offset: 0x00198034
|
||||
[Token(Token = "0x17001414")]
|
||||
protected virtual bool IsIndirectCrl
|
||||
{
|
||||
[Token(Token = "0x6007B1D")]
|
||||
[Address(RVA = "0x536AE0", Offset = "0x5354E0", VA = "0x180536AE0", Slot = "29")]
|
||||
get
|
||||
{
|
||||
DerObjectIdentifier issuingDistributionPoint = X509Extensions.IssuingDistributionPoint;
|
||||
ISet criticalExtensionOids = this.GetCriticalExtensionOids();
|
||||
if (criticalExtensionOids != 0)
|
||||
{
|
||||
Asn1Object asn1Object;
|
||||
IssuingDistributionPoint instance = IssuingDistributionPoint.GetInstance(asn1Object);
|
||||
}
|
||||
CrlException ex = new CrlException("Exception reading IssuingDistributionPoint" + issuingDistributionPoint);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400584A RID: 22602
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400584A")]
|
||||
private readonly CertificateList c;
|
||||
|
||||
// Token: 0x0400584B RID: 22603
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400584B")]
|
||||
private readonly string sigAlgName;
|
||||
|
||||
// Token: 0x0400584C RID: 22604
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400584C")]
|
||||
private readonly byte[] sigAlgParams;
|
||||
|
||||
// Token: 0x0400584D RID: 22605
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x400584D")]
|
||||
private readonly bool isIndirect;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,233 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x02001329 RID: 4905
|
||||
[Token(Token = "0x2001329")]
|
||||
[StructLayout(3)]
|
||||
public class X509CrlEntry : X509ExtensionBase
|
||||
{
|
||||
// Token: 0x06007B1E RID: 31518 RVA: 0x00199E74 File Offset: 0x00198074
|
||||
[Token(Token = "0x6007B1E")]
|
||||
[Address(RVA = "0x533790", Offset = "0x532190", VA = "0x180533790")]
|
||||
public X509CrlEntry(CrlEntry c)
|
||||
{
|
||||
this.c = c;
|
||||
X509Name x509Name = this.loadCertificateIssuer();
|
||||
this.certificateIssuer = x509Name;
|
||||
}
|
||||
|
||||
// Token: 0x06007B1F RID: 31519 RVA: 0x00199E9C File Offset: 0x0019809C
|
||||
[Token(Token = "0x6007B1F")]
|
||||
[Address(RVA = "0x5337D0", Offset = "0x5321D0", VA = "0x1805337D0")]
|
||||
public X509CrlEntry(CrlEntry c, bool isIndirect, X509Name previousCertificateIssuer)
|
||||
{
|
||||
this.c = c;
|
||||
this.isIndirect = isIndirect;
|
||||
this.previousCertificateIssuer = previousCertificateIssuer;
|
||||
X509Name x509Name = this.loadCertificateIssuer();
|
||||
this.certificateIssuer = x509Name;
|
||||
}
|
||||
|
||||
// Token: 0x06007B20 RID: 31520 RVA: 0x00199ED4 File Offset: 0x001980D4
|
||||
[Token(Token = "0x6007B20")]
|
||||
[Address(RVA = "0x5338C0", Offset = "0x5322C0", VA = "0x1805338C0")]
|
||||
private X509Name loadCertificateIssuer()
|
||||
{
|
||||
if (this.isIndirect)
|
||||
{
|
||||
if (this.GetCriticalExtensionOids() != 0)
|
||||
{
|
||||
Asn1Object asn1Object;
|
||||
GeneralName[] names = GeneralNames.GetInstance(asn1Object).GetNames();
|
||||
int num = 0;
|
||||
int length = names.Length;
|
||||
if (num < length)
|
||||
{
|
||||
GeneralName generalName = names[num];
|
||||
if (generalName.tag != 4)
|
||||
{
|
||||
num++;
|
||||
}
|
||||
return X509Name.GetInstance(generalName.obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.previousCertificateIssuer;
|
||||
}
|
||||
|
||||
// Token: 0x06007B21 RID: 31521 RVA: 0x00199F60 File Offset: 0x00198160
|
||||
[Token(Token = "0x6007B21")]
|
||||
[Address(RVA = "0x3C1230", Offset = "0x3BFC30", VA = "0x1803C1230")]
|
||||
public X509Name GetCertificateIssuer()
|
||||
{
|
||||
return this.certificateIssuer;
|
||||
}
|
||||
|
||||
// Token: 0x06007B22 RID: 31522 RVA: 0x00199F74 File Offset: 0x00198174
|
||||
[Token(Token = "0x6007B22")]
|
||||
[Address(RVA = "0x532FB0", Offset = "0x5319B0", VA = "0x180532FB0", Slot = "8")]
|
||||
protected override X509Extensions GetX509Extensions()
|
||||
{
|
||||
return this.c.Extensions;
|
||||
}
|
||||
|
||||
// Token: 0x06007B23 RID: 31523 RVA: 0x00199F94 File Offset: 0x00198194
|
||||
[Token(Token = "0x6007B23")]
|
||||
[Address(RVA = "0x532F00", Offset = "0x531900", VA = "0x180532F00")]
|
||||
public byte[] GetEncoded()
|
||||
{
|
||||
return this.c.GetDerEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x17001415 RID: 5141
|
||||
// (get) Token: 0x06007B24 RID: 31524 RVA: 0x00199FB8 File Offset: 0x001981B8
|
||||
[Token(Token = "0x17001415")]
|
||||
public BigInteger SerialNumber
|
||||
{
|
||||
[Token(Token = "0x6007B24")]
|
||||
[Address(RVA = "0x533890", Offset = "0x532290", VA = "0x180533890")]
|
||||
get
|
||||
{
|
||||
return this.c.userCertificate.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001416 RID: 5142
|
||||
// (get) Token: 0x06007B25 RID: 31525 RVA: 0x00199FDC File Offset: 0x001981DC
|
||||
[Token(Token = "0x17001416")]
|
||||
public DateTime RevocationDate
|
||||
{
|
||||
[Token(Token = "0x6007B25")]
|
||||
[Address(RVA = "0x533860", Offset = "0x532260", VA = "0x180533860")]
|
||||
get
|
||||
{
|
||||
return this.c.revocationDate.ToDateTime();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001417 RID: 5143
|
||||
// (get) Token: 0x06007B26 RID: 31526 RVA: 0x0019A000 File Offset: 0x00198200
|
||||
[Token(Token = "0x17001417")]
|
||||
public bool HasExtensions
|
||||
{
|
||||
[Token(Token = "0x6007B26")]
|
||||
[Address(RVA = "0x533830", Offset = "0x532230", VA = "0x180533830")]
|
||||
get
|
||||
{
|
||||
return this.c.Extensions != 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007B27 RID: 31527 RVA: 0x0019A024 File Offset: 0x00198224
|
||||
[Token(Token = "0x6007B27")]
|
||||
[Address(RVA = "0x532FD0", Offset = "0x5319D0", VA = "0x180532FD0", Slot = "3")]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder;
|
||||
string newLine;
|
||||
StringBuilder stringBuilder9;
|
||||
do
|
||||
{
|
||||
stringBuilder = new StringBuilder();
|
||||
newLine = Platform.NewLine;
|
||||
StringBuilder stringBuilder2 = stringBuilder.Append(" userCertificate: ");
|
||||
BigInteger value = this.c.userCertificate.Value;
|
||||
StringBuilder stringBuilder3 = stringBuilder2.Append(value).Append(newLine);
|
||||
StringBuilder stringBuilder4 = stringBuilder.Append(" revocationDate: ");
|
||||
DateTime dateTime = this.c.revocationDate.ToDateTime();
|
||||
StringBuilder stringBuilder5 = stringBuilder4.Append(dateTime).Append(newLine);
|
||||
StringBuilder stringBuilder6 = stringBuilder.Append(" certificateIssuer: ");
|
||||
X509Name x509Name = this.certificateIssuer;
|
||||
StringBuilder stringBuilder7 = stringBuilder6.Append(x509Name).Append(newLine);
|
||||
X509Extensions extensions = this.c.Extensions;
|
||||
if (extensions == 0 || extensions.ExtensionOids == 0)
|
||||
{
|
||||
goto IL_1E1;
|
||||
}
|
||||
StringBuilder stringBuilder8 = stringBuilder.Append(" crlEntryExtensions:");
|
||||
int num = 0;
|
||||
stringBuilder9 = stringBuilder8.Append(newLine);
|
||||
int num2 = 0;
|
||||
if (num2 < num)
|
||||
{
|
||||
num2 += num2;
|
||||
num2++;
|
||||
}
|
||||
if (stringBuilder9 == 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (stringBuilder9 == 0);
|
||||
X509Extension x509Extension;
|
||||
if (x509Extension.value == 0)
|
||||
{
|
||||
StringBuilder stringBuilder10 = stringBuilder.Append(newLine);
|
||||
}
|
||||
StringBuilder stringBuilder11 = stringBuilder.Append(" critical(");
|
||||
bool critical = x509Extension.critical;
|
||||
StringBuilder stringBuilder12 = stringBuilder11.Append(critical).Append(") ");
|
||||
StringBuilder stringBuilder13 = stringBuilder.Append(" value = ");
|
||||
Asn1Object asn1Object;
|
||||
string text = Asn1Dump.DumpAsString(asn1Object);
|
||||
StringBuilder stringBuilder14 = stringBuilder13.Append(text);
|
||||
StringBuilder stringBuilder15 = stringBuilder13.Append("Certificate issuer: ");
|
||||
if (asn1Object == 0)
|
||||
{
|
||||
}
|
||||
if (asn1Object == 0)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
GeneralNames instance = GeneralNames.GetInstance(asn1Object);
|
||||
StringBuilder stringBuilder16 = stringBuilder15.Append(instance);
|
||||
CrlReason crlReason = new CrlReason(DerEnumerated.GetInstance(asn1Object));
|
||||
StringBuilder stringBuilder17 = stringBuilder.Append(crlReason);
|
||||
StringBuilder stringBuilder18 = stringBuilder.Append(newLine);
|
||||
StringBuilder stringBuilder19 = stringBuilder.Append(" value = ").Append("*****");
|
||||
int num3 = 0;
|
||||
StringBuilder stringBuilder20 = stringBuilder19.Append(newLine);
|
||||
int num4 = 0;
|
||||
if (num4 < num3)
|
||||
{
|
||||
num4 += num4;
|
||||
num4++;
|
||||
}
|
||||
while (num4 != 0)
|
||||
{
|
||||
}
|
||||
IL_1E1:
|
||||
int num5 = stringBuilder.GetHashCode();
|
||||
num5 += 19;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0400584E RID: 22606
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400584E")]
|
||||
private CrlEntry c;
|
||||
|
||||
// Token: 0x0400584F RID: 22607
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400584F")]
|
||||
private bool isIndirect;
|
||||
|
||||
// Token: 0x04005850 RID: 22608
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4005850")]
|
||||
private X509Name previousCertificateIssuer;
|
||||
|
||||
// Token: 0x04005851 RID: 22609
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4005851")]
|
||||
private X509Name certificateIssuer;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,215 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x0200132A RID: 4906
|
||||
[Token(Token = "0x200132A")]
|
||||
[StructLayout(3)]
|
||||
public class X509CrlParser
|
||||
{
|
||||
// Token: 0x06007B28 RID: 31528 RVA: 0x0019A234 File Offset: 0x00198434
|
||||
[Token(Token = "0x6007B28")]
|
||||
[Address(RVA = "0x534490", Offset = "0x532E90", VA = "0x180534490")]
|
||||
public X509CrlParser()
|
||||
{
|
||||
this.lazyAsn1 = false;
|
||||
}
|
||||
|
||||
// Token: 0x06007B29 RID: 31529 RVA: 0x0019A250 File Offset: 0x00198450
|
||||
[Token(Token = "0x6007B29")]
|
||||
[Address(RVA = "0x5344B0", Offset = "0x532EB0", VA = "0x1805344B0")]
|
||||
public X509CrlParser(bool lazyAsn1)
|
||||
{
|
||||
this.lazyAsn1 = lazyAsn1;
|
||||
}
|
||||
|
||||
// Token: 0x06007B2A RID: 31530 RVA: 0x0019A26C File Offset: 0x0019846C
|
||||
[Token(Token = "0x6007B2A")]
|
||||
[Address(RVA = "0x534380", Offset = "0x532D80", VA = "0x180534380")]
|
||||
private X509Crl ReadPemCrl(Stream inStream)
|
||||
{
|
||||
Asn1Sequence asn1Sequence = X509CrlParser.PemCrlParser.ReadPemObject(inStream);
|
||||
if (asn1Sequence == 0)
|
||||
{
|
||||
}
|
||||
CertificateList instance = CertificateList.GetInstance(asn1Sequence);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007B2B RID: 31531 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6007B2B")]
|
||||
[Address(RVA = "0x534160", Offset = "0x532B60", VA = "0x180534160")]
|
||||
private X509Crl ReadDerCrl(Asn1InputStream dIn)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06007B2C RID: 31532 RVA: 0x0019A298 File Offset: 0x00198498
|
||||
[Token(Token = "0x6007B2C")]
|
||||
[Address(RVA = "0x533AC0", Offset = "0x5324C0", VA = "0x180533AC0")]
|
||||
private X509Crl GetCrl()
|
||||
{
|
||||
Asn1Encodable asn1Encodable;
|
||||
if (this.sCrlData != 0 && this.sCrlDataObjectCount < asn1Encodable)
|
||||
{
|
||||
int num = this.sCrlDataObjectCount;
|
||||
Asn1Set asn1Set = this.sCrlData;
|
||||
int num2 = num + 1;
|
||||
this.sCrlDataObjectCount = num2;
|
||||
IEnumerator enumerator = asn1Set.GetEnumerator();
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007B2D RID: 31533 RVA: 0x0019A2E0 File Offset: 0x001984E0
|
||||
[Token(Token = "0x6007B2D")]
|
||||
[Address(RVA = "0x533A60", Offset = "0x532460", VA = "0x180533A60", Slot = "4")]
|
||||
protected virtual X509Crl CreateX509Crl(CertificateList c)
|
||||
{
|
||||
return new X509Crl(c);
|
||||
}
|
||||
|
||||
// Token: 0x06007B2E RID: 31534 RVA: 0x0019A2F4 File Offset: 0x001984F4
|
||||
[Token(Token = "0x6007B2E")]
|
||||
[Address(RVA = "0x533E40", Offset = "0x532840", VA = "0x180533E40")]
|
||||
public X509Crl ReadCrl(byte[] input)
|
||||
{
|
||||
int num;
|
||||
MemoryStream memoryStream = new MemoryStream(input, num != 0);
|
||||
num = 0;
|
||||
return this.ReadCrl(memoryStream);
|
||||
}
|
||||
|
||||
// Token: 0x06007B2F RID: 31535 RVA: 0x0019A314 File Offset: 0x00198514
|
||||
[Token(Token = "0x6007B2F")]
|
||||
[Address(RVA = "0x533FF0", Offset = "0x5329F0", VA = "0x180533FF0")]
|
||||
public ICollection ReadCrls(byte[] input)
|
||||
{
|
||||
MemoryStream memoryStream;
|
||||
do
|
||||
{
|
||||
int num;
|
||||
memoryStream = new MemoryStream(input, num != 0);
|
||||
num = 0;
|
||||
IList list = Platform.CreateArrayList();
|
||||
int num2 = 0;
|
||||
if (this.ReadCrl(memoryStream) == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
int num3 = 0;
|
||||
if (num3 < num2)
|
||||
{
|
||||
num3 += num3;
|
||||
num3++;
|
||||
}
|
||||
}
|
||||
while (this.ReadCrl(memoryStream) != 0);
|
||||
memoryStream += memoryStream;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007B30 RID: 31536 RVA: 0x0019A36C File Offset: 0x0019856C
|
||||
[Token(Token = "0x6007B30")]
|
||||
[Address(RVA = "0x533B50", Offset = "0x532550", VA = "0x180533B50")]
|
||||
public X509Crl ReadCrl(Stream inStream)
|
||||
{
|
||||
if (inStream != 0)
|
||||
{
|
||||
inStream.Dispose();
|
||||
Stream stream = this.currentCrlStream;
|
||||
int num = 0;
|
||||
if (stream == 0 || stream != inStream)
|
||||
{
|
||||
this.sCrlDataObjectCount = num;
|
||||
this.sCrlData = num;
|
||||
this.currentCrlStream = inStream;
|
||||
}
|
||||
string text;
|
||||
if (this.sCrlData == 0)
|
||||
{
|
||||
PushbackStream pushbackStream = new PushbackStream(inStream);
|
||||
int num2;
|
||||
pushbackStream.WriteByte((byte)num2);
|
||||
if (num2 == 48)
|
||||
{
|
||||
if (this.lazyAsn1)
|
||||
{
|
||||
LazyAsn1InputStream lazyAsn1InputStream = new LazyAsn1InputStream(pushbackStream);
|
||||
}
|
||||
Asn1InputStream asn1InputStream = new Asn1InputStream(pushbackStream);
|
||||
X509Crl x509Crl = this.ReadDerCrl(asn1InputStream);
|
||||
}
|
||||
Asn1Sequence asn1Sequence = X509CrlParser.PemCrlParser.ReadPemObject(pushbackStream);
|
||||
if (asn1Sequence != 0)
|
||||
{
|
||||
CertificateList instance = CertificateList.GetInstance(asn1Sequence);
|
||||
text = this.ToString();
|
||||
}
|
||||
}
|
||||
int num3 = this.sCrlDataObjectCount;
|
||||
this.sCrlData = text;
|
||||
this.sCrlDataObjectCount = text;
|
||||
return this.GetCrl();
|
||||
}
|
||||
ArgumentNullException ex = new ArgumentNullException("inStream");
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007B31 RID: 31537 RVA: 0x0019A444 File Offset: 0x00198644
|
||||
[Token(Token = "0x6007B31")]
|
||||
[Address(RVA = "0x533EB0", Offset = "0x5328B0", VA = "0x180533EB0")]
|
||||
public ICollection ReadCrls(Stream inStream)
|
||||
{
|
||||
do
|
||||
{
|
||||
IList list = Platform.CreateArrayList();
|
||||
int num = 0;
|
||||
if (this.ReadCrl(inStream) == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
int num2 = 0;
|
||||
if (num2 < num)
|
||||
{
|
||||
num2 += num2;
|
||||
num2++;
|
||||
}
|
||||
}
|
||||
while (this.ReadCrl(inStream) != 0);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x04005852 RID: 22610
|
||||
[Token(Token = "0x4005852")]
|
||||
private static readonly PemParser PemCrlParser = new PemParser("CRL");
|
||||
|
||||
// Token: 0x04005853 RID: 22611
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005853")]
|
||||
private readonly bool lazyAsn1;
|
||||
|
||||
// Token: 0x04005854 RID: 22612
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4005854")]
|
||||
private Asn1Set sCrlData;
|
||||
|
||||
// Token: 0x04005855 RID: 22613
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4005855")]
|
||||
private int sCrlDataObjectCount;
|
||||
|
||||
// Token: 0x04005856 RID: 22614
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4005856")]
|
||||
private Stream currentCrlStream;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
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.Utilities.Collections;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x0200132B RID: 4907
|
||||
[Token(Token = "0x200132B")]
|
||||
[StructLayout(3)]
|
||||
public abstract class X509ExtensionBase : IX509Extension
|
||||
{
|
||||
// Token: 0x06007B33 RID: 31539
|
||||
[Token(Token = "0x6007B33")]
|
||||
[Address(Slot = "8")]
|
||||
protected abstract X509Extensions GetX509Extensions();
|
||||
|
||||
// Token: 0x06007B34 RID: 31540 RVA: 0x0019A4A0 File Offset: 0x001986A0
|
||||
[Token(Token = "0x6007B34")]
|
||||
[Address(RVA = "0x536D10", Offset = "0x535710", VA = "0x180536D10", Slot = "9")]
|
||||
protected virtual ISet GetExtensionOids(bool critical)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
int num = 0;
|
||||
Asn1OctetString asn1OctetString;
|
||||
if (asn1OctetString == 0)
|
||||
{
|
||||
}
|
||||
HashSet hashSet = new HashSet();
|
||||
IEnumerable enumerable;
|
||||
if (enumerable != 0)
|
||||
{
|
||||
if (num < enumerable)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
if (enumerable == 0)
|
||||
{
|
||||
}
|
||||
if (enumerable == 0)
|
||||
{
|
||||
goto IL_5A;
|
||||
}
|
||||
X509Extension x509Extension;
|
||||
while (x509Extension.critical != critical)
|
||||
{
|
||||
}
|
||||
if (hashSet.GetEnumerator() != 0)
|
||||
{
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
IL_5A:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007B35 RID: 31541 RVA: 0x0019A50C File Offset: 0x0019870C
|
||||
[Token(Token = "0x6007B35")]
|
||||
[Address(RVA = "0x537090", Offset = "0x535A90", VA = "0x180537090", Slot = "10")]
|
||||
public virtual ISet GetNonCriticalExtensionOids()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007B35)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections.ISet BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509ExtensionBase::GetNonCriticalExtensionOids()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:X509Extensions(var_0_06, call:X509Extensions(X509ExtensionBase::GetX509Extensions, ldloc:X509ExtensionBase(this)))
|
||||
}
|
||||
|
||||
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: 0x06007B36 RID: 31542 RVA: 0x0019A520 File Offset: 0x00198720
|
||||
[Token(Token = "0x6007B36")]
|
||||
[Address(RVA = "0x536CF0", Offset = "0x5356F0", VA = "0x180536CF0", Slot = "11")]
|
||||
public virtual ISet GetCriticalExtensionOids()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007B36)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections.ISet BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509ExtensionBase::GetCriticalExtensionOids()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:X509Extensions(var_0_06, call:X509Extensions(X509ExtensionBase::GetX509Extensions, ldloc:X509ExtensionBase(this)))
|
||||
}
|
||||
|
||||
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: 0x06007B37 RID: 31543 RVA: 0x0019A534 File Offset: 0x00198734
|
||||
[Token(Token = "0x6007B37")]
|
||||
[Address(RVA = "0x537010", Offset = "0x535A10", VA = "0x180537010", Slot = "6")]
|
||||
[Obsolete]
|
||||
public Asn1OctetString GetExtensionValue(string oid)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007B37)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1OctetString BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509ExtensionBase::GetExtensionValue(System.String)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:DerObjectIdentifier(var_0_06, newobj:DerObjectIdentifier(DerObjectIdentifier::.ctor, ldloc:string(oid)))
|
||||
stloc:X509Extensions(var_1_0D, call:X509Extensions(X509ExtensionBase::GetX509Extensions, ldloc:X509ExtensionBase(this)))
|
||||
}
|
||||
|
||||
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: 0x06007B38 RID: 31544 RVA: 0x0019A550 File Offset: 0x00198750
|
||||
[Token(Token = "0x6007B38")]
|
||||
[Address(RVA = "0x536FC0", Offset = "0x5359C0", VA = "0x180536FC0", Slot = "12")]
|
||||
public virtual Asn1OctetString GetExtensionValue(DerObjectIdentifier oid)
|
||||
{
|
||||
Asn1OctetString asn1OctetString;
|
||||
X509Extension x509Extension;
|
||||
if (asn1OctetString != 0 && x509Extension != 0)
|
||||
{
|
||||
return x509Extension.value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007B39 RID: 31545 RVA: 0x0019A570 File Offset: 0x00198770
|
||||
[Token(Token = "0x6007B39")]
|
||||
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
||||
protected X509ExtensionBase()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x0200132C RID: 4908
|
||||
[Token(Token = "0x200132C")]
|
||||
[StructLayout(3)]
|
||||
public class X509KeyUsage : Asn1Encodable
|
||||
{
|
||||
// Token: 0x06007B3A RID: 31546 RVA: 0x0019A584 File Offset: 0x00198784
|
||||
[Token(Token = "0x6007B3A")]
|
||||
[Address(RVA = "0x537730", Offset = "0x536130", VA = "0x180537730")]
|
||||
public X509KeyUsage(int usage)
|
||||
{
|
||||
this.usage = usage;
|
||||
}
|
||||
|
||||
// Token: 0x06007B3B RID: 31547 RVA: 0x0019A5A0 File Offset: 0x001987A0
|
||||
[Token(Token = "0x6007B3B")]
|
||||
[Address(RVA = "0x5376D0", Offset = "0x5360D0", VA = "0x1805376D0", Slot = "5")]
|
||||
public override Asn1Object ToAsn1Object()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007B3B)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1Object BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509KeyUsage::ToAsn1Object()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:KeyUsage(var_0_0B, newobj:KeyUsage(KeyUsage::.ctor, ldfld:int32(X509KeyUsage::usage, ldloc:X509KeyUsage(this))))
|
||||
}
|
||||
|
||||
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: 0x04005857 RID: 22615
|
||||
[Token(Token = "0x4005857")]
|
||||
public const int DigitalSignature = 128;
|
||||
|
||||
// Token: 0x04005858 RID: 22616
|
||||
[Token(Token = "0x4005858")]
|
||||
public const int NonRepudiation = 64;
|
||||
|
||||
// Token: 0x04005859 RID: 22617
|
||||
[Token(Token = "0x4005859")]
|
||||
public const int KeyEncipherment = 32;
|
||||
|
||||
// Token: 0x0400585A RID: 22618
|
||||
[Token(Token = "0x400585A")]
|
||||
public const int DataEncipherment = 16;
|
||||
|
||||
// Token: 0x0400585B RID: 22619
|
||||
[Token(Token = "0x400585B")]
|
||||
public const int KeyAgreement = 8;
|
||||
|
||||
// Token: 0x0400585C RID: 22620
|
||||
[Token(Token = "0x400585C")]
|
||||
public const int KeyCertSign = 4;
|
||||
|
||||
// Token: 0x0400585D RID: 22621
|
||||
[Token(Token = "0x400585D")]
|
||||
public const int CrlSign = 2;
|
||||
|
||||
// Token: 0x0400585E RID: 22622
|
||||
[Token(Token = "0x400585E")]
|
||||
public const int EncipherOnly = 1;
|
||||
|
||||
// Token: 0x0400585F RID: 22623
|
||||
[Token(Token = "0x400585F")]
|
||||
public const int DecipherOnly = 32768;
|
||||
|
||||
// Token: 0x04005860 RID: 22624
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005860")]
|
||||
private readonly int usage;
|
||||
}
|
||||
}
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.CryptoPro;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Nist;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Oiw;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.TeleTrust;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x0200132D RID: 4909
|
||||
[Token(Token = "0x200132D")]
|
||||
[StructLayout(3)]
|
||||
internal class X509SignatureUtilities
|
||||
{
|
||||
// Token: 0x06007B3C RID: 31548 RVA: 0x0019A5B8 File Offset: 0x001987B8
|
||||
[Token(Token = "0x6007B3C")]
|
||||
[Address(RVA = "0x537E40", Offset = "0x536840", VA = "0x180537E40")]
|
||||
internal static void SetSignatureParameters(ISigner signature, Asn1Encodable parameters)
|
||||
{
|
||||
if (parameters != 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007B3D RID: 31549 RVA: 0x0019A5D0 File Offset: 0x001987D0
|
||||
[Token(Token = "0x6007B3D")]
|
||||
[Address(RVA = "0x537B80", Offset = "0x536580", VA = "0x180537B80")]
|
||||
internal static string GetSignatureName(AlgorithmIdentifier sigAlgId)
|
||||
{
|
||||
DerObjectIdentifier objectID = sigAlgId.ObjectID;
|
||||
if (objectID != 0)
|
||||
{
|
||||
Asn1Object asn1Object = sigAlgId.ToAsn1Object();
|
||||
Asn1Object asn1Object2 = sigAlgId.ToAsn1Object();
|
||||
Asn1SequenceParser parser = Asn1Sequence.GetInstance(objectID).Parser;
|
||||
string text;
|
||||
return text + "withECDSA";
|
||||
}
|
||||
Asn1Object asn1Object3 = sigAlgId.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007B3E RID: 31550 RVA: 0x0019A630 File Offset: 0x00198830
|
||||
[Token(Token = "0x6007B3E")]
|
||||
[Address(RVA = "0x537760", Offset = "0x536160", VA = "0x180537760")]
|
||||
private static string GetDigestAlgName(DerObjectIdentifier digestAlgOID)
|
||||
{
|
||||
DerObjectIdentifier md = PkcsObjectIdentifiers.MD5;
|
||||
DerObjectIdentifier idSha = OiwObjectIdentifiers.IdSha1;
|
||||
DerObjectIdentifier idSha2 = NistObjectIdentifiers.IdSha224;
|
||||
DerObjectIdentifier idSha3 = NistObjectIdentifiers.IdSha256;
|
||||
DerObjectIdentifier idSha4 = NistObjectIdentifiers.IdSha384;
|
||||
DerObjectIdentifier idSha5 = NistObjectIdentifiers.IdSha512;
|
||||
DerObjectIdentifier ripeMD = TeleTrusTObjectIdentifiers.RipeMD128;
|
||||
DerObjectIdentifier ripeMD2 = TeleTrusTObjectIdentifiers.RipeMD160;
|
||||
DerObjectIdentifier ripeMD3 = TeleTrusTObjectIdentifiers.RipeMD256;
|
||||
DerObjectIdentifier gostR = CryptoProObjectIdentifiers.GostR3411;
|
||||
return digestAlgOID.identifier;
|
||||
}
|
||||
|
||||
// Token: 0x06007B3F RID: 31551 RVA: 0x0019A6C8 File Offset: 0x001988C8
|
||||
[Token(Token = "0x6007B3F")]
|
||||
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
||||
public X509SignatureUtilities()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06007B40 RID: 31552 RVA: 0x0019A6DC File Offset: 0x001988DC
|
||||
// Note: this type is marked as 'beforefieldinit'.
|
||||
[Token(Token = "0x6007B40")]
|
||||
[Address(RVA = "0x537ED0", Offset = "0x5368D0", VA = "0x180537ED0")]
|
||||
static X509SignatureUtilities()
|
||||
{
|
||||
DerNull instance = DerNull.Instance;
|
||||
}
|
||||
|
||||
// Token: 0x04005861 RID: 22625
|
||||
[Token(Token = "0x4005861")]
|
||||
private static readonly Asn1Null derNull;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,257 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.CryptoPro;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Nist;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Oiw;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.TeleTrust;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Security;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x0200132E RID: 4910
|
||||
[Token(Token = "0x200132E")]
|
||||
[StructLayout(3)]
|
||||
internal class X509Utilities
|
||||
{
|
||||
// Token: 0x06007B41 RID: 31553 RVA: 0x0019A6F0 File Offset: 0x001988F0
|
||||
[Token(Token = "0x6007B41")]
|
||||
[Address(RVA = "0x538C50", Offset = "0x537650", VA = "0x180538C50")]
|
||||
static X509Utilities()
|
||||
{
|
||||
IDictionary dictionary = Platform.CreateHashtable();
|
||||
X509Utilities.algorithms = dictionary;
|
||||
X509Utilities.exParams = Platform.CreateHashtable();
|
||||
X509Utilities.noParams = new HashSet();
|
||||
IDictionary dictionary2 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier md2WithRsaEncryption = PkcsObjectIdentifiers.MD2WithRsaEncryption;
|
||||
IDictionary dictionary3 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier md2WithRsaEncryption2 = PkcsObjectIdentifiers.MD2WithRsaEncryption;
|
||||
IDictionary dictionary4 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier md5WithRsaEncryption = PkcsObjectIdentifiers.MD5WithRsaEncryption;
|
||||
IDictionary dictionary5 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier md5WithRsaEncryption2 = PkcsObjectIdentifiers.MD5WithRsaEncryption;
|
||||
IDictionary dictionary6 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier sha1WithRsaEncryption = PkcsObjectIdentifiers.Sha1WithRsaEncryption;
|
||||
IDictionary dictionary7 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier sha1WithRsaEncryption2 = PkcsObjectIdentifiers.Sha1WithRsaEncryption;
|
||||
IDictionary dictionary8 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier sha224WithRsaEncryption = PkcsObjectIdentifiers.Sha224WithRsaEncryption;
|
||||
IDictionary dictionary9 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier sha224WithRsaEncryption2 = PkcsObjectIdentifiers.Sha224WithRsaEncryption;
|
||||
IDictionary dictionary10 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier sha256WithRsaEncryption = PkcsObjectIdentifiers.Sha256WithRsaEncryption;
|
||||
IDictionary dictionary11 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier sha256WithRsaEncryption2 = PkcsObjectIdentifiers.Sha256WithRsaEncryption;
|
||||
IDictionary dictionary12 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier sha384WithRsaEncryption = PkcsObjectIdentifiers.Sha384WithRsaEncryption;
|
||||
IDictionary dictionary13 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier sha384WithRsaEncryption2 = PkcsObjectIdentifiers.Sha384WithRsaEncryption;
|
||||
IDictionary dictionary14 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier sha512WithRsaEncryption = PkcsObjectIdentifiers.Sha512WithRsaEncryption;
|
||||
IDictionary dictionary15 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier sha512WithRsaEncryption2 = PkcsObjectIdentifiers.Sha512WithRsaEncryption;
|
||||
IDictionary dictionary16 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier idRsassaPss = PkcsObjectIdentifiers.IdRsassaPss;
|
||||
IDictionary dictionary17 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier idRsassaPss2 = PkcsObjectIdentifiers.IdRsassaPss;
|
||||
IDictionary dictionary18 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier idRsassaPss3 = PkcsObjectIdentifiers.IdRsassaPss;
|
||||
IDictionary dictionary19 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier idRsassaPss4 = PkcsObjectIdentifiers.IdRsassaPss;
|
||||
IDictionary dictionary20 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier idRsassaPss5 = PkcsObjectIdentifiers.IdRsassaPss;
|
||||
IDictionary dictionary21 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier rsaSignatureWithRipeMD = TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD160;
|
||||
IDictionary dictionary22 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier rsaSignatureWithRipeMD2 = TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD160;
|
||||
IDictionary dictionary23 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier rsaSignatureWithRipeMD3 = TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD128;
|
||||
IDictionary dictionary24 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier rsaSignatureWithRipeMD4 = TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD128;
|
||||
IDictionary dictionary25 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier rsaSignatureWithRipeMD5 = TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD256;
|
||||
IDictionary dictionary26 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier rsaSignatureWithRipeMD6 = TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD256;
|
||||
IDictionary dictionary27 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier idDsaWithSha = X9ObjectIdentifiers.IdDsaWithSha1;
|
||||
IDictionary dictionary28 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier idDsaWithSha2 = X9ObjectIdentifiers.IdDsaWithSha1;
|
||||
IDictionary dictionary29 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier dsaWithSha = NistObjectIdentifiers.DsaWithSha224;
|
||||
IDictionary dictionary30 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier dsaWithSha2 = NistObjectIdentifiers.DsaWithSha256;
|
||||
IDictionary dictionary31 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier dsaWithSha3 = NistObjectIdentifiers.DsaWithSha384;
|
||||
IDictionary dictionary32 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier dsaWithSha4 = NistObjectIdentifiers.DsaWithSha512;
|
||||
IDictionary dictionary33 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier ecdsaWithSha = X9ObjectIdentifiers.ECDsaWithSha1;
|
||||
IDictionary dictionary34 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier ecdsaWithSha2 = X9ObjectIdentifiers.ECDsaWithSha1;
|
||||
IDictionary dictionary35 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier ecdsaWithSha3 = X9ObjectIdentifiers.ECDsaWithSha224;
|
||||
IDictionary dictionary36 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier ecdsaWithSha4 = X9ObjectIdentifiers.ECDsaWithSha256;
|
||||
IDictionary dictionary37 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier ecdsaWithSha5 = X9ObjectIdentifiers.ECDsaWithSha384;
|
||||
IDictionary dictionary38 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier ecdsaWithSha6 = X9ObjectIdentifiers.ECDsaWithSha512;
|
||||
IDictionary dictionary39 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier gostR3411x94WithGostR3410x = CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x94;
|
||||
IDictionary dictionary40 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier gostR3411x94WithGostR3410x2 = CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x94;
|
||||
IDictionary dictionary41 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier gostR3411x94WithGostR3410x3 = CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x2001;
|
||||
IDictionary dictionary42 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier gostR3411x94WithGostR3410x4 = CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x2001;
|
||||
IDictionary dictionary43 = X509Utilities.algorithms;
|
||||
DerObjectIdentifier gostR3411x94WithGostR3410x5 = CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x2001;
|
||||
ISet set = X509Utilities.noParams;
|
||||
ISet set2 = X509Utilities.noParams;
|
||||
ISet set3 = X509Utilities.noParams;
|
||||
ISet set4 = X509Utilities.noParams;
|
||||
ISet set5 = X509Utilities.noParams;
|
||||
ISet set6 = X509Utilities.noParams;
|
||||
ISet set7 = X509Utilities.noParams;
|
||||
ISet set8 = X509Utilities.noParams;
|
||||
ISet set9 = X509Utilities.noParams;
|
||||
ISet set10 = X509Utilities.noParams;
|
||||
ISet set11 = X509Utilities.noParams;
|
||||
ISet set12 = X509Utilities.noParams;
|
||||
DerObjectIdentifier idSha = OiwObjectIdentifiers.IdSha1;
|
||||
DerNull instance = DerNull.Instance;
|
||||
AlgorithmIdentifier algorithmIdentifier = new AlgorithmIdentifier(idSha, instance);
|
||||
IDictionary dictionary44 = X509Utilities.exParams;
|
||||
RsassaPssParameters rsassaPssParameters = X509Utilities.CreatePssParams(algorithmIdentifier, 20);
|
||||
DerObjectIdentifier idSha2 = NistObjectIdentifiers.IdSha224;
|
||||
DerNull instance2 = DerNull.Instance;
|
||||
AlgorithmIdentifier algorithmIdentifier2 = new AlgorithmIdentifier(idSha2, instance2);
|
||||
IDictionary dictionary45 = X509Utilities.exParams;
|
||||
RsassaPssParameters rsassaPssParameters2 = X509Utilities.CreatePssParams(algorithmIdentifier2, 28);
|
||||
DerObjectIdentifier idSha3 = NistObjectIdentifiers.IdSha256;
|
||||
DerNull instance3 = DerNull.Instance;
|
||||
AlgorithmIdentifier algorithmIdentifier3 = new AlgorithmIdentifier(idSha3, instance3);
|
||||
IDictionary dictionary46 = X509Utilities.exParams;
|
||||
RsassaPssParameters rsassaPssParameters3 = X509Utilities.CreatePssParams(algorithmIdentifier3, 32);
|
||||
DerObjectIdentifier idSha4 = NistObjectIdentifiers.IdSha384;
|
||||
DerNull instance4 = DerNull.Instance;
|
||||
AlgorithmIdentifier algorithmIdentifier4 = new AlgorithmIdentifier(idSha4, instance4);
|
||||
IDictionary dictionary47 = X509Utilities.exParams;
|
||||
RsassaPssParameters rsassaPssParameters4 = X509Utilities.CreatePssParams(algorithmIdentifier4, 48);
|
||||
DerObjectIdentifier idSha5 = NistObjectIdentifiers.IdSha512;
|
||||
DerNull instance5 = DerNull.Instance;
|
||||
AlgorithmIdentifier algorithmIdentifier5 = new AlgorithmIdentifier(idSha5, instance5);
|
||||
IDictionary dictionary48 = X509Utilities.exParams;
|
||||
RsassaPssParameters rsassaPssParameters5 = X509Utilities.CreatePssParams(algorithmIdentifier5, 64);
|
||||
}
|
||||
|
||||
// Token: 0x06007B42 RID: 31554 RVA: 0x0019AAA0 File Offset: 0x00198CA0
|
||||
[Token(Token = "0x6007B42")]
|
||||
[Address(RVA = "0x5384C0", Offset = "0x536EC0", VA = "0x1805384C0")]
|
||||
private static RsassaPssParameters CreatePssParams(AlgorithmIdentifier hashAlgId, int saltSize)
|
||||
{
|
||||
AlgorithmIdentifier algorithmIdentifier = new AlgorithmIdentifier(PkcsObjectIdentifiers.IdMgf1, hashAlgId);
|
||||
DerInteger derInteger = new DerInteger(saltSize);
|
||||
DerInteger derInteger2 = new DerInteger(1);
|
||||
return new RsassaPssParameters(hashAlgId, algorithmIdentifier, derInteger, derInteger2);
|
||||
}
|
||||
|
||||
// Token: 0x06007B43 RID: 31555 RVA: 0x0019AAD0 File Offset: 0x00198CD0
|
||||
[Token(Token = "0x6007B43")]
|
||||
[Address(RVA = "0x538690", Offset = "0x537090", VA = "0x180538690")]
|
||||
internal static DerObjectIdentifier GetAlgorithmOid(string algorithmName)
|
||||
{
|
||||
string text = Platform.ToUpperInvariant(algorithmName);
|
||||
IDictionary dictionary = X509Utilities.algorithms;
|
||||
if (text == 0)
|
||||
{
|
||||
return new DerObjectIdentifier(text);
|
||||
}
|
||||
IDictionary dictionary2 = X509Utilities.algorithms;
|
||||
IDictionary dictionary3 = X509Utilities.algorithms;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007B44 RID: 31556 RVA: 0x0019AB0C File Offset: 0x00198D0C
|
||||
[Token(Token = "0x6007B44")]
|
||||
[Address(RVA = "0x538810", Offset = "0x537210", VA = "0x180538810")]
|
||||
internal static AlgorithmIdentifier GetSigAlgID(DerObjectIdentifier sigOid, string algorithmName)
|
||||
{
|
||||
ISet set = X509Utilities.noParams;
|
||||
string text = Platform.ToUpperInvariant(algorithmName);
|
||||
IDictionary dictionary = X509Utilities.exParams;
|
||||
if (text == 0)
|
||||
{
|
||||
DerNull instance = DerNull.Instance;
|
||||
return new AlgorithmIdentifier(sigOid, instance);
|
||||
}
|
||||
IDictionary dictionary2 = X509Utilities.exParams;
|
||||
AlgorithmIdentifier algorithmIdentifier = new AlgorithmIdentifier(sigOid);
|
||||
IDictionary dictionary3 = X509Utilities.algorithms;
|
||||
return new AlgorithmIdentifier(sigOid);
|
||||
}
|
||||
|
||||
// Token: 0x06007B45 RID: 31557 RVA: 0x0019AB64 File Offset: 0x00198D64
|
||||
[Token(Token = "0x6007B45")]
|
||||
[Address(RVA = "0x5385E0", Offset = "0x536FE0", VA = "0x1805385E0")]
|
||||
internal static IEnumerable GetAlgNames()
|
||||
{
|
||||
IDictionary dictionary = X509Utilities.algorithms;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007B46 RID: 31558 RVA: 0x0019AB7C File Offset: 0x00198D7C
|
||||
[Token(Token = "0x6007B46")]
|
||||
[Address(RVA = "0x538A80", Offset = "0x537480", VA = "0x180538A80")]
|
||||
internal static byte[] GetSignatureForObject(DerObjectIdentifier sigOid, string sigName, AsymmetricKeyParameter privateKey, SecureRandom random, Asn1Encodable ae)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007B46)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Utilities::GetSignatureForObject(BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.DerObjectIdentifier,System.String,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.AsymmetricKeyParameter,BestHTTP.SecureProtocol.Org.BouncyCastle.Security.SecureRandom,BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1Encodable)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_2E:
|
||||
stloc:ArgumentNullException(var_4_38, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("sigOid")))
|
||||
}
|
||||
|
||||
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: 0x06007B47 RID: 31559 RVA: 0x0019ABC4 File Offset: 0x00198DC4
|
||||
[Token(Token = "0x6007B47")]
|
||||
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
||||
public X509Utilities()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04005862 RID: 22626
|
||||
[Token(Token = "0x4005862")]
|
||||
private static readonly IDictionary algorithms;
|
||||
|
||||
// Token: 0x04005863 RID: 22627
|
||||
[Token(Token = "0x4005863")]
|
||||
private static readonly IDictionary exParams;
|
||||
|
||||
// Token: 0x04005864 RID: 22628
|
||||
[Token(Token = "0x4005864")]
|
||||
private static readonly ISet noParams;
|
||||
}
|
||||
}
|
||||
+219
@@ -0,0 +1,219 @@
|
||||
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.Crypto.Operators;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Security;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x0200132F RID: 4911
|
||||
[Token(Token = "0x200132F")]
|
||||
[StructLayout(3)]
|
||||
public class X509V1CertificateGenerator
|
||||
{
|
||||
// Token: 0x06007B48 RID: 31560 RVA: 0x0019ABD8 File Offset: 0x00198DD8
|
||||
[Token(Token = "0x6007B48")]
|
||||
[Address(RVA = "0x53A8B0", Offset = "0x5392B0", VA = "0x18053A8B0")]
|
||||
public X509V1CertificateGenerator()
|
||||
{
|
||||
V1TbsCertificateGenerator v1TbsCertificateGenerator = new V1TbsCertificateGenerator();
|
||||
this.tbsGen = v1TbsCertificateGenerator;
|
||||
}
|
||||
|
||||
// Token: 0x06007B49 RID: 31561 RVA: 0x0019ABF8 File Offset: 0x00198DF8
|
||||
[Token(Token = "0x6007B49")]
|
||||
[Address(RVA = "0x53A4A0", Offset = "0x538EA0", VA = "0x18053A4A0")]
|
||||
public void Reset()
|
||||
{
|
||||
V1TbsCertificateGenerator v1TbsCertificateGenerator = new V1TbsCertificateGenerator();
|
||||
this.tbsGen = v1TbsCertificateGenerator;
|
||||
}
|
||||
|
||||
// Token: 0x06007B4A RID: 31562 RVA: 0x0019AC14 File Offset: 0x00198E14
|
||||
[Token(Token = "0x6007B4A")]
|
||||
[Address(RVA = "0x53A6C0", Offset = "0x5390C0", VA = "0x18053A6C0")]
|
||||
public void SetSerialNumber(BigInteger serialNumber)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007B4A)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509V1CertificateGenerator::SetSerialNumber(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_25:
|
||||
stloc:ArgumentException(var_2_34, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("serial number must be a positive integer"), ldstr:string("serialNumber")))
|
||||
}
|
||||
|
||||
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: 0x06007B4B RID: 31563 RVA: 0x0019AC58 File Offset: 0x00198E58
|
||||
[Token(Token = "0x6007B4B")]
|
||||
[Address(RVA = "0x53A4F0", Offset = "0x538EF0", VA = "0x18053A4F0")]
|
||||
public void SetIssuerDN(X509Name issuer)
|
||||
{
|
||||
this.tbsGen.issuer = issuer;
|
||||
}
|
||||
|
||||
// Token: 0x06007B4C RID: 31564 RVA: 0x0019AC78 File Offset: 0x00198E78
|
||||
[Token(Token = "0x6007B4C")]
|
||||
[Address(RVA = "0x53A580", Offset = "0x538F80", VA = "0x18053A580")]
|
||||
public void SetNotBefore(DateTime date)
|
||||
{
|
||||
V1TbsCertificateGenerator v1TbsCertificateGenerator = this.tbsGen;
|
||||
Time time = new Time(date);
|
||||
v1TbsCertificateGenerator.startDate = time;
|
||||
}
|
||||
|
||||
// Token: 0x06007B4D RID: 31565 RVA: 0x0019ACA0 File Offset: 0x00198EA0
|
||||
[Token(Token = "0x6007B4D")]
|
||||
[Address(RVA = "0x53A510", Offset = "0x538F10", VA = "0x18053A510")]
|
||||
public void SetNotAfter(DateTime date)
|
||||
{
|
||||
V1TbsCertificateGenerator v1TbsCertificateGenerator = this.tbsGen;
|
||||
Time time = new Time(date);
|
||||
v1TbsCertificateGenerator.endDate = time;
|
||||
}
|
||||
|
||||
// Token: 0x06007B4E RID: 31566 RVA: 0x0019ACC8 File Offset: 0x00198EC8
|
||||
[Token(Token = "0x6007B4E")]
|
||||
[Address(RVA = "0x53A890", Offset = "0x539290", VA = "0x18053A890")]
|
||||
public void SetSubjectDN(X509Name subject)
|
||||
{
|
||||
this.tbsGen.subject = subject;
|
||||
}
|
||||
|
||||
// Token: 0x06007B4F RID: 31567 RVA: 0x0019ACE8 File Offset: 0x00198EE8
|
||||
[Token(Token = "0x6007B4F")]
|
||||
[Address(RVA = "0x53A5F0", Offset = "0x538FF0", VA = "0x18053A5F0")]
|
||||
public void SetPublicKey(AsymmetricKeyParameter publicKey)
|
||||
{
|
||||
V1TbsCertificateGenerator v1TbsCertificateGenerator = this.tbsGen;
|
||||
SubjectPublicKeyInfo subjectPublicKeyInfo = SubjectPublicKeyInfoFactory.CreateSubjectPublicKeyInfo(publicKey);
|
||||
v1TbsCertificateGenerator.subjectPublicKeyInfo = subjectPublicKeyInfo;
|
||||
}
|
||||
|
||||
// Token: 0x06007B50 RID: 31568 RVA: 0x0019AD20 File Offset: 0x00198F20
|
||||
[Token(Token = "0x6007B50")]
|
||||
[Address(RVA = "0x53A780", Offset = "0x539180", VA = "0x18053A780")]
|
||||
[Obsolete]
|
||||
public void SetSignatureAlgorithm(string signatureAlgorithm)
|
||||
{
|
||||
this.signatureAlgorithm = signatureAlgorithm;
|
||||
DerObjectIdentifier algorithmOid = X509Utilities.GetAlgorithmOid(signatureAlgorithm);
|
||||
this.sigOID = algorithmOid;
|
||||
AlgorithmIdentifier sigAlgID = X509Utilities.GetSigAlgID(algorithmOid, signatureAlgorithm);
|
||||
this.sigAlgId = sigAlgID;
|
||||
this.tbsGen.signature = sigAlgID;
|
||||
}
|
||||
|
||||
// Token: 0x06007B51 RID: 31569 RVA: 0x0019AD70 File Offset: 0x00198F70
|
||||
[Token(Token = "0x6007B51")]
|
||||
[Address(RVA = "0x53A100", Offset = "0x538B00", VA = "0x18053A100")]
|
||||
[Obsolete]
|
||||
public X509Certificate Generate(AsymmetricKeyParameter privateKey)
|
||||
{
|
||||
int num;
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, num);
|
||||
num = 0;
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x06007B52 RID: 31570 RVA: 0x0019AD94 File Offset: 0x00198F94
|
||||
[Token(Token = "0x6007B52")]
|
||||
[Address(RVA = "0x53A060", Offset = "0x538A60", VA = "0x18053A060")]
|
||||
[Obsolete]
|
||||
public X509Certificate Generate(AsymmetricKeyParameter privateKey, SecureRandom random)
|
||||
{
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, random);
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x06007B53 RID: 31571 RVA: 0x0019ADB8 File Offset: 0x00198FB8
|
||||
[Token(Token = "0x6007B53")]
|
||||
[Address(RVA = "0x53A190", Offset = "0x538B90", VA = "0x18053A190")]
|
||||
public X509Certificate Generate(ISignatureFactory signatureCalculatorFactory)
|
||||
{
|
||||
byte[] derEncoded;
|
||||
for (;;)
|
||||
{
|
||||
V1TbsCertificateGenerator v1TbsCertificateGenerator = this.tbsGen;
|
||||
if (signatureCalculatorFactory != 0)
|
||||
{
|
||||
derEncoded = this.tbsGen.GenerateTbsCertificate().GetDerEncoded();
|
||||
if (derEncoded != 0 && derEncoded != 0)
|
||||
{
|
||||
if (derEncoded == 0)
|
||||
{
|
||||
}
|
||||
if (derEncoded != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
DerBitString derBitString = new DerBitString(derEncoded);
|
||||
X509CertificateStructure x509CertificateStructure;
|
||||
return new X509Certificate(x509CertificateStructure);
|
||||
}
|
||||
|
||||
// Token: 0x06007B54 RID: 31572 RVA: 0x0019AE14 File Offset: 0x00199014
|
||||
[Token(Token = "0x6007B54")]
|
||||
[Address(RVA = "0x539FA0", Offset = "0x5389A0", VA = "0x180539FA0")]
|
||||
private X509Certificate GenerateJcaObject(TbsCertificateStructure tbsCert, AlgorithmIdentifier sigAlg, byte[] signature)
|
||||
{
|
||||
DerBitString derBitString = new DerBitString(signature);
|
||||
return new X509Certificate(new X509CertificateStructure(tbsCert, sigAlg, derBitString));
|
||||
}
|
||||
|
||||
// Token: 0x17001418 RID: 5144
|
||||
// (get) Token: 0x06007B55 RID: 31573 RVA: 0x0019AE38 File Offset: 0x00199038
|
||||
[Token(Token = "0x17001418")]
|
||||
public IEnumerable SignatureAlgNames
|
||||
{
|
||||
[Token(Token = "0x6007B55")]
|
||||
[Address(RVA = "0x53A910", Offset = "0x539310", VA = "0x18053A910")]
|
||||
get
|
||||
{
|
||||
return X509Utilities.GetAlgNames();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04005865 RID: 22629
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005865")]
|
||||
private V1TbsCertificateGenerator tbsGen;
|
||||
|
||||
// Token: 0x04005866 RID: 22630
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4005866")]
|
||||
private DerObjectIdentifier sigOID;
|
||||
|
||||
// Token: 0x04005867 RID: 22631
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4005867")]
|
||||
private AlgorithmIdentifier sigAlgId;
|
||||
|
||||
// Token: 0x04005868 RID: 22632
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4005868")]
|
||||
private string signatureAlgorithm;
|
||||
}
|
||||
}
|
||||
+434
@@ -0,0 +1,434 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
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.Crypto.Operators;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x02001330 RID: 4912
|
||||
[Token(Token = "0x2001330")]
|
||||
[StructLayout(3)]
|
||||
public class X509V2AttributeCertificate : X509ExtensionBase, IX509AttributeCertificate, IX509Extension
|
||||
{
|
||||
// Token: 0x06007B56 RID: 31574 RVA: 0x0019AE4C File Offset: 0x0019904C
|
||||
[Token(Token = "0x6007B56")]
|
||||
[Address(RVA = "0x53C000", Offset = "0x53AA00", VA = "0x18053C000")]
|
||||
private static AttributeCertificate GetObject(Stream input)
|
||||
{
|
||||
return AttributeCertificate.GetInstance(Asn1Object.FromStream(input));
|
||||
}
|
||||
|
||||
// Token: 0x06007B57 RID: 31575 RVA: 0x0019AE64 File Offset: 0x00199064
|
||||
[Token(Token = "0x6007B57")]
|
||||
[Address(RVA = "0x53C2F0", Offset = "0x53ACF0", VA = "0x18053C2F0")]
|
||||
public X509V2AttributeCertificate(Stream encIn)
|
||||
{
|
||||
AttributeCertificate @object = X509V2AttributeCertificate.GetObject(encIn);
|
||||
}
|
||||
|
||||
// Token: 0x06007B58 RID: 31576 RVA: 0x0019AE78 File Offset: 0x00199078
|
||||
[Token(Token = "0x6007B58")]
|
||||
[Address(RVA = "0x53C270", Offset = "0x53AC70", VA = "0x18053C270")]
|
||||
public X509V2AttributeCertificate(byte[] encoded)
|
||||
{
|
||||
int num;
|
||||
MemoryStream memoryStream = new MemoryStream(encoded, num != 0);
|
||||
num = 0;
|
||||
AttributeCertificate @object = X509V2AttributeCertificate.GetObject(memoryStream);
|
||||
}
|
||||
|
||||
// Token: 0x06007B59 RID: 31577 RVA: 0x0019AE98 File Offset: 0x00199098
|
||||
[Token(Token = "0x6007B59")]
|
||||
[Address(RVA = "0x53C320", Offset = "0x53AD20", VA = "0x18053C320")]
|
||||
internal X509V2AttributeCertificate(AttributeCertificate cert)
|
||||
{
|
||||
this.cert = cert;
|
||||
DateTime dateTime = cert.acinfo.attrCertValidityPeriod.notAfterTime.ToDateTime();
|
||||
this.notAfter = dateTime;
|
||||
DateTime dateTime2 = cert.acinfo.attrCertValidityPeriod.notBeforeTime.ToDateTime();
|
||||
this.notBefore = dateTime2;
|
||||
}
|
||||
|
||||
// Token: 0x17001419 RID: 5145
|
||||
// (get) Token: 0x06007B5A RID: 31578 RVA: 0x0019AF18 File Offset: 0x00199118
|
||||
[Token(Token = "0x17001419")]
|
||||
public virtual int Version
|
||||
{
|
||||
[Token(Token = "0x6007B5A")]
|
||||
[Address(RVA = "0x53C660", Offset = "0x53B060", VA = "0x18053C660", Slot = "29")]
|
||||
get
|
||||
{
|
||||
int intValue = this.cert.acinfo.version.Value.IntValue;
|
||||
return intValue + 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700141A RID: 5146
|
||||
// (get) Token: 0x06007B5B RID: 31579 RVA: 0x0019AF4C File Offset: 0x0019914C
|
||||
[Token(Token = "0x1700141A")]
|
||||
public virtual BigInteger SerialNumber
|
||||
{
|
||||
[Token(Token = "0x6007B5B")]
|
||||
[Address(RVA = "0x53C610", Offset = "0x53B010", VA = "0x18053C610", Slot = "30")]
|
||||
get
|
||||
{
|
||||
return this.cert.acinfo.serialNumber.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700141B RID: 5147
|
||||
// (get) Token: 0x06007B5C RID: 31580 RVA: 0x0019AF74 File Offset: 0x00199174
|
||||
[Token(Token = "0x1700141B")]
|
||||
public virtual AttributeCertificateHolder Holder
|
||||
{
|
||||
[Token(Token = "0x6007B5C")]
|
||||
[Address(RVA = "0x53C430", Offset = "0x53AE30", VA = "0x18053C430", Slot = "31")]
|
||||
get
|
||||
{
|
||||
Asn1Object asn1Object;
|
||||
do
|
||||
{
|
||||
asn1Object = this.cert.acinfo.holder.ToAsn1Object();
|
||||
if (asn1Object == 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (asn1Object == 0);
|
||||
AttributeCertificateHolder attributeCertificateHolder;
|
||||
return attributeCertificateHolder;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700141C RID: 5148
|
||||
// (get) Token: 0x06007B5D RID: 31581 RVA: 0x0019AFA8 File Offset: 0x001991A8
|
||||
[Token(Token = "0x1700141C")]
|
||||
public virtual AttributeCertificateIssuer Issuer
|
||||
{
|
||||
[Token(Token = "0x6007B5D")]
|
||||
[Address(RVA = "0x53C590", Offset = "0x53AF90", VA = "0x18053C590", Slot = "32")]
|
||||
get
|
||||
{
|
||||
Asn1Encodable obj = this.cert.acinfo.issuer.obj;
|
||||
AttributeCertificateIssuer attributeCertificateIssuer;
|
||||
attributeCertificateIssuer.form = obj;
|
||||
return attributeCertificateIssuer;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700141D RID: 5149
|
||||
// (get) Token: 0x06007B5E RID: 31582 RVA: 0x0019AFDC File Offset: 0x001991DC
|
||||
[Token(Token = "0x1700141D")]
|
||||
public virtual DateTime NotBefore
|
||||
{
|
||||
[Token(Token = "0x6007B5E")]
|
||||
[Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240", Slot = "33")]
|
||||
get
|
||||
{
|
||||
return this.notBefore;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700141E RID: 5150
|
||||
// (get) Token: 0x06007B5F RID: 31583 RVA: 0x0019AFF0 File Offset: 0x001991F0
|
||||
[Token(Token = "0x1700141E")]
|
||||
public virtual DateTime NotAfter
|
||||
{
|
||||
[Token(Token = "0x6007B5F")]
|
||||
[Address(RVA = "0x3C1220", Offset = "0x3BFC20", VA = "0x1803C1220", Slot = "34")]
|
||||
get
|
||||
{
|
||||
return this.notAfter;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007B60 RID: 31584 RVA: 0x0019B004 File Offset: 0x00199204
|
||||
[Token(Token = "0x6007B60")]
|
||||
[Address(RVA = "0x53BEC0", Offset = "0x53A8C0", VA = "0x18053BEC0", Slot = "35")]
|
||||
public virtual bool[] GetIssuerUniqueID()
|
||||
{
|
||||
DerBitString issuerUniqueID = this.cert.acinfo.issuerUniqueID;
|
||||
if (issuerUniqueID == 0)
|
||||
{
|
||||
}
|
||||
byte[] octets = issuerUniqueID.GetOctets();
|
||||
byte[] bytes = issuerUniqueID.GetBytes();
|
||||
int num = octets.Length;
|
||||
num -= bytes;
|
||||
bool[] array = new bool[num];
|
||||
int num2 = 0;
|
||||
int length = array.Length;
|
||||
if (num2 != length)
|
||||
{
|
||||
num2 += num;
|
||||
num2 -= num;
|
||||
num2++;
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x1700141F RID: 5151
|
||||
// (get) Token: 0x06007B61 RID: 31585 RVA: 0x0019B07C File Offset: 0x0019927C
|
||||
[Token(Token = "0x1700141F")]
|
||||
public virtual bool IsValidNow
|
||||
{
|
||||
[Token(Token = "0x6007B61")]
|
||||
[Address(RVA = "0x53C520", Offset = "0x53AF20", VA = "0x18053C520", Slot = "36")]
|
||||
get
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007B61)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509V2AttributeCertificate::get_IsValidNow()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:DateTime(var_1_07, callgetter:DateTime(DateTime::get_UtcNow))
|
||||
stloc:int32(var_2_0E, callgetter:int32(IX509AttributeCertificate::get_Version, ldloc:X509V2AttributeCertificate[exp:IX509AttributeCertificate](this)))
|
||||
}
|
||||
|
||||
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: 0x06007B62 RID: 31586 RVA: 0x0019B098 File Offset: 0x00199298
|
||||
[Token(Token = "0x6007B62")]
|
||||
[Address(RVA = "0x53C0E0", Offset = "0x53AAE0", VA = "0x18053C0E0", Slot = "37")]
|
||||
public virtual bool IsValid(DateTime date)
|
||||
{
|
||||
AttributeCertificateIssuer issuer = this.Issuer;
|
||||
return this.NotBefore <= 0;
|
||||
}
|
||||
|
||||
// Token: 0x06007B63 RID: 31587 RVA: 0x0019B0BC File Offset: 0x001992BC
|
||||
[Token(Token = "0x6007B63")]
|
||||
[Address(RVA = "0x53B6E0", Offset = "0x53A0E0", VA = "0x18053B6E0", Slot = "38")]
|
||||
public virtual void CheckValidity()
|
||||
{
|
||||
DateTime utcNow = DateTime.UtcNow;
|
||||
int version = ((IX509AttributeCertificate)this).Version;
|
||||
}
|
||||
|
||||
// Token: 0x06007B64 RID: 31588 RVA: 0x0019B0D8 File Offset: 0x001992D8
|
||||
[Token(Token = "0x6007B64")]
|
||||
[Address(RVA = "0x53B750", Offset = "0x53A150", VA = "0x18053B750", Slot = "39")]
|
||||
public virtual void CheckValidity(DateTime date)
|
||||
{
|
||||
DateTime dateTime = this.NotBefore;
|
||||
AttributeCertificateIssuer issuer = this.Issuer;
|
||||
}
|
||||
|
||||
// Token: 0x17001420 RID: 5152
|
||||
// (get) Token: 0x06007B65 RID: 31589 RVA: 0x0019B104 File Offset: 0x00199304
|
||||
[Token(Token = "0x17001420")]
|
||||
public virtual AlgorithmIdentifier SignatureAlgorithm
|
||||
{
|
||||
[Token(Token = "0x6007B65")]
|
||||
[Address(RVA = "0x53C640", Offset = "0x53B040", VA = "0x18053C640", Slot = "40")]
|
||||
get
|
||||
{
|
||||
return this.cert.signatureAlgorithm;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007B66 RID: 31590 RVA: 0x0019B124 File Offset: 0x00199324
|
||||
[Token(Token = "0x6007B66")]
|
||||
[Address(RVA = "0x531510", Offset = "0x52FF10", VA = "0x180531510", Slot = "41")]
|
||||
public virtual byte[] GetSignature()
|
||||
{
|
||||
return this.cert.GetSignatureOctets();
|
||||
}
|
||||
|
||||
// Token: 0x06007B67 RID: 31591 RVA: 0x0019B144 File Offset: 0x00199344
|
||||
[Token(Token = "0x6007B67")]
|
||||
[Address(RVA = "0x53C1D0", Offset = "0x53ABD0", VA = "0x18053C1D0", Slot = "42")]
|
||||
public virtual void Verify(AsymmetricKeyParameter key)
|
||||
{
|
||||
Asn1VerifierFactory asn1VerifierFactory = new Asn1VerifierFactory(this.cert.signatureAlgorithm, key);
|
||||
int version = ((IX509AttributeCertificate)this).Version;
|
||||
}
|
||||
|
||||
// Token: 0x06007B68 RID: 31592 RVA: 0x0019B170 File Offset: 0x00199370
|
||||
[Token(Token = "0x6007B68")]
|
||||
[Address(RVA = "0x53C150", Offset = "0x53AB50", VA = "0x18053C150", Slot = "43")]
|
||||
public virtual void Verify(IVerifierFactoryProvider verifierProvider)
|
||||
{
|
||||
AttributeCertificate attributeCertificate = this.cert;
|
||||
int version = ((IX509AttributeCertificate)this).Version;
|
||||
}
|
||||
|
||||
// Token: 0x06007B69 RID: 31593 RVA: 0x0019B194 File Offset: 0x00199394
|
||||
[Token(Token = "0x6007B69")]
|
||||
[Address(RVA = "0x53B400", Offset = "0x539E00", VA = "0x18053B400", Slot = "44")]
|
||||
protected virtual void CheckSignature(IVerifierFactory verifier)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007B69)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509V2AttributeCertificate::CheckSignature(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IVerifierFactory)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_3E:
|
||||
stloc:InvalidKeyException(var_5_48, newobj:InvalidKeyException(InvalidKeyException::.ctor, ldstr:string("Public key presented not for certificate signature")))
|
||||
}
|
||||
|
||||
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: 0x06007B6A RID: 31594 RVA: 0x0019B1EC File Offset: 0x001993EC
|
||||
[Token(Token = "0x6007B6A")]
|
||||
[Address(RVA = "0x53BEA0", Offset = "0x53A8A0", VA = "0x18053BEA0", Slot = "45")]
|
||||
public virtual byte[] GetEncoded()
|
||||
{
|
||||
return this.cert.GetEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x06007B6B RID: 31595 RVA: 0x0019B20C File Offset: 0x0019940C
|
||||
[Token(Token = "0x6007B6B")]
|
||||
[Address(RVA = "0x53C0B0", Offset = "0x53AAB0", VA = "0x18053C0B0", Slot = "8")]
|
||||
protected override X509Extensions GetX509Extensions()
|
||||
{
|
||||
return this.cert.acinfo.extensions;
|
||||
}
|
||||
|
||||
// Token: 0x06007B6C RID: 31596 RVA: 0x0019B230 File Offset: 0x00199430
|
||||
[Token(Token = "0x6007B6C")]
|
||||
[Address(RVA = "0x53B970", Offset = "0x53A370", VA = "0x18053B970", Slot = "46")]
|
||||
public virtual X509Attribute[] GetAttributes()
|
||||
{
|
||||
Asn1Sequence attributes = this.cert.acinfo.attributes;
|
||||
Asn1Encodable asn1Encodable;
|
||||
X509Attribute[] array = new X509Attribute[asn1Encodable];
|
||||
int num = 0;
|
||||
Asn1Encodable asn1Encodable2;
|
||||
if (num != asn1Encodable2)
|
||||
{
|
||||
Asn1SequenceParser parser = attributes.Parser;
|
||||
X509Attribute x509Attribute;
|
||||
AttributeX509 attributeX;
|
||||
x509Attribute.attr = attributeX;
|
||||
num++;
|
||||
array[0] = x509Attribute;
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x06007B6D RID: 31597 RVA: 0x0019B284 File Offset: 0x00199484
|
||||
[Token(Token = "0x6007B6D")]
|
||||
[Address(RVA = "0x53BAD0", Offset = "0x53A4D0", VA = "0x18053BAD0", Slot = "47")]
|
||||
public virtual X509Attribute[] GetAttributes(string oid)
|
||||
{
|
||||
int num;
|
||||
X509Attribute[] array;
|
||||
do
|
||||
{
|
||||
Asn1Sequence attributes = this.cert.acinfo.attributes;
|
||||
IList list = Platform.CreateArrayList();
|
||||
num = 0;
|
||||
Asn1Encodable asn1Encodable;
|
||||
if (num != asn1Encodable)
|
||||
{
|
||||
Asn1SequenceParser parser = attributes.Parser;
|
||||
X509Attribute x509Attribute;
|
||||
AttributeX509 attributeX;
|
||||
x509Attribute.attr = attributeX;
|
||||
if (attributeX.attrType.identifier.Equals(oid))
|
||||
{
|
||||
}
|
||||
num++;
|
||||
}
|
||||
array = new X509Attribute[asn1Encodable];
|
||||
if (num < list)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
if (num >= num)
|
||||
{
|
||||
return array;
|
||||
}
|
||||
uint num2;
|
||||
if (num < (int)num2)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
ulong num3;
|
||||
num3 += num3;
|
||||
num3 += num3;
|
||||
}
|
||||
while (num == 0 || num == 0);
|
||||
num++;
|
||||
array[0] = num;
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x06007B6E RID: 31598 RVA: 0x0019B33C File Offset: 0x0019953C
|
||||
[Token(Token = "0x6007B6E")]
|
||||
[Address(RVA = "0x53B8B0", Offset = "0x53A2B0", VA = "0x18053B8B0", Slot = "0")]
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj != this)
|
||||
{
|
||||
if (obj != 0 && obj != 0)
|
||||
{
|
||||
Asn1Object asn1Object = this.cert.ToAsn1Object();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x06007B6F RID: 31599 RVA: 0x0019B36C File Offset: 0x0019956C
|
||||
[Token(Token = "0x6007B6F")]
|
||||
[Address(RVA = "0x528AC0", Offset = "0x5274C0", VA = "0x180528AC0", Slot = "2")]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
Asn1Object asn1Object = this.cert.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x04005869 RID: 22633
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005869")]
|
||||
private readonly AttributeCertificate cert;
|
||||
|
||||
// Token: 0x0400586A RID: 22634
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400586A")]
|
||||
private readonly DateTime notBefore;
|
||||
|
||||
// Token: 0x0400586B RID: 22635
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400586B")]
|
||||
private readonly DateTime notAfter;
|
||||
}
|
||||
}
|
||||
+254
@@ -0,0 +1,254 @@
|
||||
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.Crypto.Operators;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Security;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x02001331 RID: 4913
|
||||
[Token(Token = "0x2001331")]
|
||||
[StructLayout(3)]
|
||||
public class X509V2AttributeCertificateGenerator
|
||||
{
|
||||
// Token: 0x06007B70 RID: 31600 RVA: 0x0019B38C File Offset: 0x0019958C
|
||||
[Token(Token = "0x6007B70")]
|
||||
[Address(RVA = "0x53B330", Offset = "0x539D30", VA = "0x18053B330")]
|
||||
public X509V2AttributeCertificateGenerator()
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = new X509ExtensionsGenerator();
|
||||
this.extGenerator = x509ExtensionsGenerator;
|
||||
base..ctor();
|
||||
V2AttributeCertificateInfoGenerator v2AttributeCertificateInfoGenerator = new V2AttributeCertificateInfoGenerator();
|
||||
this.acInfoGen = v2AttributeCertificateInfoGenerator;
|
||||
}
|
||||
|
||||
// Token: 0x06007B71 RID: 31601 RVA: 0x0019B3BC File Offset: 0x001995BC
|
||||
[Token(Token = "0x6007B71")]
|
||||
[Address(RVA = "0x53AF90", Offset = "0x539990", VA = "0x18053AF90")]
|
||||
public void Reset()
|
||||
{
|
||||
V2AttributeCertificateInfoGenerator v2AttributeCertificateInfoGenerator = new V2AttributeCertificateInfoGenerator();
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
this.acInfoGen = v2AttributeCertificateInfoGenerator;
|
||||
x509ExtensionsGenerator.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x06007B72 RID: 31602 RVA: 0x0019B3EC File Offset: 0x001995EC
|
||||
[Token(Token = "0x6007B72")]
|
||||
[Address(RVA = "0x53B000", Offset = "0x539A00", VA = "0x18053B000")]
|
||||
public void SetHolder(AttributeCertificateHolder holder)
|
||||
{
|
||||
V2AttributeCertificateInfoGenerator v2AttributeCertificateInfoGenerator = this.acInfoGen;
|
||||
Holder holder2 = holder.holder;
|
||||
v2AttributeCertificateInfoGenerator.holder = holder2;
|
||||
}
|
||||
|
||||
// Token: 0x06007B73 RID: 31603 RVA: 0x0019B414 File Offset: 0x00199614
|
||||
[Token(Token = "0x6007B73")]
|
||||
[Address(RVA = "0x53B090", Offset = "0x539A90", VA = "0x18053B090")]
|
||||
public void SetIssuer(AttributeCertificateIssuer issuer)
|
||||
{
|
||||
V2AttributeCertificateInfoGenerator v2AttributeCertificateInfoGenerator = this.acInfoGen;
|
||||
AttCertIssuer instance = AttCertIssuer.GetInstance(issuer.form);
|
||||
v2AttributeCertificateInfoGenerator.issuer = instance;
|
||||
}
|
||||
|
||||
// Token: 0x06007B74 RID: 31604 RVA: 0x0019B444 File Offset: 0x00199644
|
||||
[Token(Token = "0x6007B74")]
|
||||
[Address(RVA = "0x53B1B0", Offset = "0x539BB0", VA = "0x18053B1B0")]
|
||||
public void SetSerialNumber(BigInteger serialNumber)
|
||||
{
|
||||
V2AttributeCertificateInfoGenerator v2AttributeCertificateInfoGenerator = this.acInfoGen;
|
||||
DerInteger derInteger = new DerInteger(serialNumber);
|
||||
v2AttributeCertificateInfoGenerator.serialNumber = derInteger;
|
||||
}
|
||||
|
||||
// Token: 0x06007B75 RID: 31605 RVA: 0x0019B46C File Offset: 0x0019966C
|
||||
[Token(Token = "0x6007B75")]
|
||||
[Address(RVA = "0x53B140", Offset = "0x539B40", VA = "0x18053B140")]
|
||||
public void SetNotBefore(DateTime date)
|
||||
{
|
||||
V2AttributeCertificateInfoGenerator v2AttributeCertificateInfoGenerator = this.acInfoGen;
|
||||
DerGeneralizedTime derGeneralizedTime = new DerGeneralizedTime(date);
|
||||
v2AttributeCertificateInfoGenerator.startDate = derGeneralizedTime;
|
||||
}
|
||||
|
||||
// Token: 0x06007B76 RID: 31606 RVA: 0x0019B494 File Offset: 0x00199694
|
||||
[Token(Token = "0x6007B76")]
|
||||
[Address(RVA = "0x53B0D0", Offset = "0x539AD0", VA = "0x18053B0D0")]
|
||||
public void SetNotAfter(DateTime date)
|
||||
{
|
||||
V2AttributeCertificateInfoGenerator v2AttributeCertificateInfoGenerator = this.acInfoGen;
|
||||
DerGeneralizedTime derGeneralizedTime = new DerGeneralizedTime(date);
|
||||
v2AttributeCertificateInfoGenerator.endDate = derGeneralizedTime;
|
||||
}
|
||||
|
||||
// Token: 0x06007B77 RID: 31607 RVA: 0x0019B4BC File Offset: 0x001996BC
|
||||
[Token(Token = "0x6007B77")]
|
||||
[Address(RVA = "0x53B220", Offset = "0x539C20", VA = "0x18053B220")]
|
||||
[Obsolete]
|
||||
public void SetSignatureAlgorithm(string signatureAlgorithm)
|
||||
{
|
||||
this.signatureAlgorithm = signatureAlgorithm;
|
||||
DerObjectIdentifier algorithmOid = X509Utilities.GetAlgorithmOid(signatureAlgorithm);
|
||||
this.sigOID = algorithmOid;
|
||||
AlgorithmIdentifier sigAlgID = X509Utilities.GetSigAlgID(algorithmOid, signatureAlgorithm);
|
||||
this.sigAlgId = sigAlgID;
|
||||
this.acInfoGen.signature = sigAlgID;
|
||||
}
|
||||
|
||||
// Token: 0x06007B78 RID: 31608 RVA: 0x0019B504 File Offset: 0x00199704
|
||||
[Token(Token = "0x6007B78")]
|
||||
[Address(RVA = "0x53A960", Offset = "0x539360", VA = "0x18053A960")]
|
||||
public void AddAttribute(X509Attribute attribute)
|
||||
{
|
||||
V2AttributeCertificateInfoGenerator v2AttributeCertificateInfoGenerator = this.acInfoGen;
|
||||
AttributeX509 instance = AttributeX509.GetInstance(attribute.ToAsn1Object());
|
||||
v2AttributeCertificateInfoGenerator.AddAttribute(instance);
|
||||
}
|
||||
|
||||
// Token: 0x06007B79 RID: 31609 RVA: 0x0019B534 File Offset: 0x00199734
|
||||
[Token(Token = "0x6007B79")]
|
||||
[Address(RVA = "0x53B030", Offset = "0x539A30", VA = "0x18053B030")]
|
||||
public void SetIssuerUniqueId(bool[] iui)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007B79)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509V2AttributeCertificateGenerator::SetIssuerUniqueId(System.Boolean[])
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:Exception(var_0_0A, call:Exception(Platform::CreateNotImplementedException, ldstr:string("SetIssuerUniqueId()")))
|
||||
}
|
||||
|
||||
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: 0x06007B7A RID: 31610 RVA: 0x0019B54C File Offset: 0x0019974C
|
||||
[Token(Token = "0x6007B7A")]
|
||||
[Address(RVA = "0x53A9B0", Offset = "0x5393B0", VA = "0x18053A9B0")]
|
||||
public void AddExtension(string oid, bool critical, Asn1Encodable extensionValue)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
||||
x509ExtensionsGenerator.AddExtension(derObjectIdentifier, critical, extensionValue);
|
||||
}
|
||||
|
||||
// Token: 0x06007B7B RID: 31611 RVA: 0x0019B578 File Offset: 0x00199778
|
||||
[Token(Token = "0x6007B7B")]
|
||||
[Address(RVA = "0x53AA60", Offset = "0x539460", VA = "0x18053AA60")]
|
||||
public void AddExtension(string oid, bool critical, byte[] extensionValue)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
||||
x509ExtensionsGenerator.AddExtension(derObjectIdentifier, critical, extensionValue);
|
||||
}
|
||||
|
||||
// Token: 0x06007B7C RID: 31612 RVA: 0x0019B5A4 File Offset: 0x001997A4
|
||||
[Token(Token = "0x6007B7C")]
|
||||
[Address(RVA = "0x53AF00", Offset = "0x539900", VA = "0x18053AF00")]
|
||||
[Obsolete]
|
||||
public IX509AttributeCertificate Generate(AsymmetricKeyParameter privateKey)
|
||||
{
|
||||
int num;
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, num);
|
||||
num = 0;
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x06007B7D RID: 31613 RVA: 0x0019B5C8 File Offset: 0x001997C8
|
||||
[Token(Token = "0x6007B7D")]
|
||||
[Address(RVA = "0x53AB10", Offset = "0x539510", VA = "0x18053AB10")]
|
||||
[Obsolete]
|
||||
public IX509AttributeCertificate Generate(AsymmetricKeyParameter privateKey, SecureRandom random)
|
||||
{
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, random);
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x06007B7E RID: 31614 RVA: 0x0019B5EC File Offset: 0x001997EC
|
||||
[Token(Token = "0x6007B7E")]
|
||||
[Address(RVA = "0x53ABB0", Offset = "0x5395B0", VA = "0x18053ABB0")]
|
||||
public IX509AttributeCertificate Generate(ISignatureFactory signatureCalculatorFactory)
|
||||
{
|
||||
bool isEmpty;
|
||||
do
|
||||
{
|
||||
isEmpty = this.extGenerator.IsEmpty;
|
||||
if (!isEmpty)
|
||||
{
|
||||
V2AttributeCertificateInfoGenerator v2AttributeCertificateInfoGenerator = this.acInfoGen;
|
||||
X509Extensions x509Extensions = this.extGenerator.Generate();
|
||||
v2AttributeCertificateInfoGenerator.extensions = x509Extensions;
|
||||
}
|
||||
if (!isEmpty)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (!isEmpty);
|
||||
this.acInfoGen.signature = isEmpty;
|
||||
byte[] derEncoded = this.acInfoGen.GenerateAttributeCertificateInfo().GetDerEncoded();
|
||||
if (derEncoded != 0 && derEncoded != 0)
|
||||
{
|
||||
DerBitString derBitString = new DerBitString(derEncoded);
|
||||
AttributeCertificate attributeCertificate;
|
||||
X509V2AttributeCertificate x509V2AttributeCertificate = new X509V2AttributeCertificate(attributeCertificate);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x17001421 RID: 5153
|
||||
// (get) Token: 0x06007B7F RID: 31615 RVA: 0x0019B68C File Offset: 0x0019988C
|
||||
[Token(Token = "0x17001421")]
|
||||
public IEnumerable SignatureAlgNames
|
||||
{
|
||||
[Token(Token = "0x6007B7F")]
|
||||
[Address(RVA = "0x53B3B0", Offset = "0x539DB0", VA = "0x18053B3B0")]
|
||||
get
|
||||
{
|
||||
return X509Utilities.GetAlgNames();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400586C RID: 22636
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400586C")]
|
||||
private readonly X509ExtensionsGenerator extGenerator;
|
||||
|
||||
// Token: 0x0400586D RID: 22637
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400586D")]
|
||||
private V2AttributeCertificateInfoGenerator acInfoGen;
|
||||
|
||||
// Token: 0x0400586E RID: 22638
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400586E")]
|
||||
private DerObjectIdentifier sigOID;
|
||||
|
||||
// Token: 0x0400586F RID: 22639
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x400586F")]
|
||||
private AlgorithmIdentifier sigAlgId;
|
||||
|
||||
// Token: 0x04005870 RID: 22640
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4005870")]
|
||||
private string signatureAlgorithm;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,312 @@
|
||||
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.Crypto.Operators;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Security;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x02001332 RID: 4914
|
||||
[Token(Token = "0x2001332")]
|
||||
[StructLayout(3)]
|
||||
public class X509V2CrlGenerator
|
||||
{
|
||||
// Token: 0x06007B80 RID: 31616 RVA: 0x0019B6A0 File Offset: 0x001998A0
|
||||
[Token(Token = "0x6007B80")]
|
||||
[Address(RVA = "0x53D630", Offset = "0x53C030", VA = "0x18053D630")]
|
||||
public X509V2CrlGenerator()
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = new X509ExtensionsGenerator();
|
||||
this.extGenerator = x509ExtensionsGenerator;
|
||||
base..ctor();
|
||||
V2TbsCertListGenerator v2TbsCertListGenerator = new V2TbsCertListGenerator();
|
||||
this.tbsGen = v2TbsCertListGenerator;
|
||||
}
|
||||
|
||||
// Token: 0x06007B81 RID: 31617 RVA: 0x0019B6D0 File Offset: 0x001998D0
|
||||
[Token(Token = "0x6007B81")]
|
||||
[Address(RVA = "0x53D3B0", Offset = "0x53BDB0", VA = "0x18053D3B0")]
|
||||
public void Reset()
|
||||
{
|
||||
V2TbsCertListGenerator v2TbsCertListGenerator = new V2TbsCertListGenerator();
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
this.tbsGen = v2TbsCertListGenerator;
|
||||
x509ExtensionsGenerator.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x06007B82 RID: 31618 RVA: 0x0019B700 File Offset: 0x00199900
|
||||
[Token(Token = "0x6007B82")]
|
||||
[Address(RVA = "0x53D420", Offset = "0x53BE20", VA = "0x18053D420")]
|
||||
public void SetIssuerDN(X509Name issuer)
|
||||
{
|
||||
this.tbsGen.issuer = issuer;
|
||||
}
|
||||
|
||||
// Token: 0x06007B83 RID: 31619 RVA: 0x0019B720 File Offset: 0x00199920
|
||||
[Token(Token = "0x6007B83")]
|
||||
[Address(RVA = "0x53D5C0", Offset = "0x53BFC0", VA = "0x18053D5C0")]
|
||||
public void SetThisUpdate(DateTime date)
|
||||
{
|
||||
V2TbsCertListGenerator v2TbsCertListGenerator = this.tbsGen;
|
||||
Time time = new Time(date);
|
||||
v2TbsCertListGenerator.thisUpdate = time;
|
||||
}
|
||||
|
||||
// Token: 0x06007B84 RID: 31620 RVA: 0x0019B748 File Offset: 0x00199948
|
||||
[Token(Token = "0x6007B84")]
|
||||
[Address(RVA = "0x53D440", Offset = "0x53BE40", VA = "0x18053D440")]
|
||||
public void SetNextUpdate(DateTime date)
|
||||
{
|
||||
V2TbsCertListGenerator v2TbsCertListGenerator = this.tbsGen;
|
||||
Time time = new Time(date);
|
||||
v2TbsCertListGenerator.nextUpdate = time;
|
||||
}
|
||||
|
||||
// Token: 0x06007B85 RID: 31621 RVA: 0x0019B770 File Offset: 0x00199970
|
||||
[Token(Token = "0x6007B85")]
|
||||
[Address(RVA = "0x53C770", Offset = "0x53B170", VA = "0x18053C770")]
|
||||
public void AddCrlEntry(BigInteger userCertificate, DateTime revocationDate, int reason)
|
||||
{
|
||||
V2TbsCertListGenerator v2TbsCertListGenerator = this.tbsGen;
|
||||
DerInteger derInteger = new DerInteger(userCertificate);
|
||||
Time time = new Time(revocationDate);
|
||||
v2TbsCertListGenerator.AddCrlEntry(derInteger, time, reason);
|
||||
}
|
||||
|
||||
// Token: 0x06007B86 RID: 31622 RVA: 0x0019B7A4 File Offset: 0x001999A4
|
||||
[Token(Token = "0x6007B86")]
|
||||
[Address(RVA = "0x53C830", Offset = "0x53B230", VA = "0x18053C830")]
|
||||
public void AddCrlEntry(BigInteger userCertificate, DateTime revocationDate, int reason, DateTime invalidityDate)
|
||||
{
|
||||
V2TbsCertListGenerator v2TbsCertListGenerator = this.tbsGen;
|
||||
DerInteger derInteger = new DerInteger(userCertificate);
|
||||
Time time = new Time(revocationDate);
|
||||
}
|
||||
|
||||
// Token: 0x06007B87 RID: 31623 RVA: 0x0019B7CC File Offset: 0x001999CC
|
||||
[Token(Token = "0x6007B87")]
|
||||
[Address(RVA = "0x53C6B0", Offset = "0x53B0B0", VA = "0x18053C6B0")]
|
||||
public void AddCrlEntry(BigInteger userCertificate, DateTime revocationDate, X509Extensions extensions)
|
||||
{
|
||||
V2TbsCertListGenerator v2TbsCertListGenerator = this.tbsGen;
|
||||
DerInteger derInteger = new DerInteger(userCertificate);
|
||||
Time time = new Time(revocationDate);
|
||||
v2TbsCertListGenerator.AddCrlEntry(derInteger, time, extensions);
|
||||
}
|
||||
|
||||
// Token: 0x06007B88 RID: 31624 RVA: 0x0019B800 File Offset: 0x00199A00
|
||||
[Token(Token = "0x6007B88")]
|
||||
[Address(RVA = "0x53C920", Offset = "0x53B320", VA = "0x18053C920")]
|
||||
public void AddCrl(X509Crl other)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007B88)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509V2CrlGenerator::AddCrl(BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Crl)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_4C:
|
||||
stloc:ArgumentNullException(var_5_56, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("other")))
|
||||
}
|
||||
|
||||
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: 0x06007B89 RID: 31625 RVA: 0x0019B864 File Offset: 0x00199A64
|
||||
[Token(Token = "0x6007B89")]
|
||||
[Address(RVA = "0x53D4B0", Offset = "0x53BEB0", VA = "0x18053D4B0")]
|
||||
[Obsolete]
|
||||
public void SetSignatureAlgorithm(string signatureAlgorithm)
|
||||
{
|
||||
this.signatureAlgorithm = signatureAlgorithm;
|
||||
DerObjectIdentifier algorithmOid = X509Utilities.GetAlgorithmOid(signatureAlgorithm);
|
||||
this.sigOID = algorithmOid;
|
||||
AlgorithmIdentifier sigAlgID = X509Utilities.GetSigAlgID(algorithmOid, signatureAlgorithm);
|
||||
this.sigAlgId = sigAlgID;
|
||||
this.tbsGen.signature = sigAlgID;
|
||||
}
|
||||
|
||||
// Token: 0x06007B8A RID: 31626 RVA: 0x0019B8B0 File Offset: 0x00199AB0
|
||||
[Token(Token = "0x6007B8A")]
|
||||
[Address(RVA = "0x53CCD0", Offset = "0x53B6D0", VA = "0x18053CCD0")]
|
||||
public void AddExtension(string oid, bool critical, Asn1Encodable extensionValue)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
||||
x509ExtensionsGenerator.AddExtension(derObjectIdentifier, critical, extensionValue);
|
||||
}
|
||||
|
||||
// Token: 0x06007B8B RID: 31627 RVA: 0x0019B8DC File Offset: 0x00199ADC
|
||||
[Token(Token = "0x6007B8B")]
|
||||
[Address(RVA = "0x53CB30", Offset = "0x53B530", VA = "0x18053CB30")]
|
||||
public void AddExtension(DerObjectIdentifier oid, bool critical, Asn1Encodable extensionValue)
|
||||
{
|
||||
this.extGenerator.AddExtension(oid, critical, extensionValue);
|
||||
}
|
||||
|
||||
// Token: 0x06007B8C RID: 31628 RVA: 0x0019B900 File Offset: 0x00199B00
|
||||
[Token(Token = "0x6007B8C")]
|
||||
[Address(RVA = "0x53CC10", Offset = "0x53B610", VA = "0x18053CC10")]
|
||||
public void AddExtension(string oid, bool critical, byte[] extensionValue)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
||||
DerOctetString derOctetString = new DerOctetString(extensionValue);
|
||||
x509ExtensionsGenerator.AddExtension(derObjectIdentifier, critical, derOctetString);
|
||||
}
|
||||
|
||||
// Token: 0x06007B8D RID: 31629 RVA: 0x0019B934 File Offset: 0x00199B34
|
||||
[Token(Token = "0x6007B8D")]
|
||||
[Address(RVA = "0x53CB60", Offset = "0x53B560", VA = "0x18053CB60")]
|
||||
public void AddExtension(DerObjectIdentifier oid, bool critical, byte[] extensionValue)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
DerOctetString derOctetString = new DerOctetString(extensionValue);
|
||||
x509ExtensionsGenerator.AddExtension(oid, critical, derOctetString);
|
||||
}
|
||||
|
||||
// Token: 0x06007B8E RID: 31630 RVA: 0x0019B960 File Offset: 0x00199B60
|
||||
[Token(Token = "0x6007B8E")]
|
||||
[Address(RVA = "0x53D320", Offset = "0x53BD20", VA = "0x18053D320")]
|
||||
[Obsolete]
|
||||
public X509Crl Generate(AsymmetricKeyParameter privateKey)
|
||||
{
|
||||
int num;
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, num);
|
||||
num = 0;
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x06007B8F RID: 31631 RVA: 0x0019B984 File Offset: 0x00199B84
|
||||
[Token(Token = "0x6007B8F")]
|
||||
[Address(RVA = "0x53CFA0", Offset = "0x53B9A0", VA = "0x18053CFA0")]
|
||||
[Obsolete]
|
||||
public X509Crl Generate(AsymmetricKeyParameter privateKey, SecureRandom random)
|
||||
{
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, random);
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x06007B90 RID: 31632 RVA: 0x0019B9A8 File Offset: 0x00199BA8
|
||||
[Token(Token = "0x6007B90")]
|
||||
[Address(RVA = "0x53D040", Offset = "0x53BA40", VA = "0x18053D040")]
|
||||
public X509Crl Generate(ISignatureFactory signatureCalculatorFactory)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
V2TbsCertListGenerator v2TbsCertListGenerator = this.tbsGen;
|
||||
if (signatureCalculatorFactory != 0)
|
||||
{
|
||||
if (!this.extGenerator.IsEmpty)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
V2TbsCertListGenerator v2TbsCertListGenerator2 = this.tbsGen;
|
||||
X509Extensions x509Extensions = x509ExtensionsGenerator.Generate();
|
||||
v2TbsCertListGenerator2.extensions = x509Extensions;
|
||||
}
|
||||
byte[] derEncoded = this.tbsGen.GenerateTbsCertList().GetDerEncoded();
|
||||
if (derEncoded != 0 && derEncoded != 0)
|
||||
{
|
||||
if (derEncoded == 0)
|
||||
{
|
||||
}
|
||||
if (derEncoded != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
X509Crl x509Crl;
|
||||
return x509Crl;
|
||||
}
|
||||
|
||||
// Token: 0x06007B91 RID: 31633 RVA: 0x0019BA2C File Offset: 0x00199C2C
|
||||
[Token(Token = "0x6007B91")]
|
||||
[Address(RVA = "0x53CD80", Offset = "0x53B780", VA = "0x18053CD80")]
|
||||
private TbsCertificateList GenerateCertList()
|
||||
{
|
||||
if (!this.extGenerator.IsEmpty)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
V2TbsCertListGenerator v2TbsCertListGenerator = this.tbsGen;
|
||||
X509Extensions x509Extensions = x509ExtensionsGenerator.Generate();
|
||||
v2TbsCertListGenerator.extensions = x509Extensions;
|
||||
}
|
||||
return this.tbsGen.GenerateTbsCertList();
|
||||
}
|
||||
|
||||
// Token: 0x06007B92 RID: 31634 RVA: 0x0019BA74 File Offset: 0x00199C74
|
||||
[Token(Token = "0x6007B92")]
|
||||
[Address(RVA = "0x53CDE0", Offset = "0x53B7E0", VA = "0x18053CDE0")]
|
||||
private X509Crl GenerateJcaObject(TbsCertificateList tbsCrl, AlgorithmIdentifier algId, byte[] signature)
|
||||
{
|
||||
Asn1Encodable[] array = new Asn1Encodable[3];
|
||||
if (tbsCrl != 0)
|
||||
{
|
||||
}
|
||||
array[0] = tbsCrl;
|
||||
if (algId != 0)
|
||||
{
|
||||
}
|
||||
array[1] = algId;
|
||||
DerBitString derBitString = new DerBitString(signature);
|
||||
if (derBitString != 0)
|
||||
{
|
||||
}
|
||||
array[2] = derBitString;
|
||||
return new X509Crl(CertificateList.GetInstance(new DerSequence(array)));
|
||||
}
|
||||
|
||||
// Token: 0x17001422 RID: 5154
|
||||
// (get) Token: 0x06007B93 RID: 31635 RVA: 0x0019BACC File Offset: 0x00199CCC
|
||||
[Token(Token = "0x17001422")]
|
||||
public IEnumerable SignatureAlgNames
|
||||
{
|
||||
[Token(Token = "0x6007B93")]
|
||||
[Address(RVA = "0x53D6B0", Offset = "0x53C0B0", VA = "0x18053D6B0")]
|
||||
get
|
||||
{
|
||||
return X509Utilities.GetAlgNames();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04005871 RID: 22641
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005871")]
|
||||
private readonly X509ExtensionsGenerator extGenerator;
|
||||
|
||||
// Token: 0x04005872 RID: 22642
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4005872")]
|
||||
private V2TbsCertListGenerator tbsGen;
|
||||
|
||||
// Token: 0x04005873 RID: 22643
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4005873")]
|
||||
private DerObjectIdentifier sigOID;
|
||||
|
||||
// Token: 0x04005874 RID: 22644
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4005874")]
|
||||
private AlgorithmIdentifier sigAlgId;
|
||||
|
||||
// Token: 0x04005875 RID: 22645
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4005875")]
|
||||
private string signatureAlgorithm;
|
||||
}
|
||||
}
|
||||
+365
@@ -0,0 +1,365 @@
|
||||
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.Crypto.Operators;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Security;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x02001333 RID: 4915
|
||||
[Token(Token = "0x2001333")]
|
||||
[StructLayout(3)]
|
||||
public class X509V3CertificateGenerator
|
||||
{
|
||||
// Token: 0x06007B94 RID: 31636 RVA: 0x0019BAE0 File Offset: 0x00199CE0
|
||||
[Token(Token = "0x6007B94")]
|
||||
[Address(RVA = "0x53E480", Offset = "0x53CE80", VA = "0x18053E480")]
|
||||
public X509V3CertificateGenerator()
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = new X509ExtensionsGenerator();
|
||||
this.extGenerator = x509ExtensionsGenerator;
|
||||
base..ctor();
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = new V3TbsCertificateGenerator();
|
||||
this.tbsGen = v3TbsCertificateGenerator;
|
||||
}
|
||||
|
||||
// Token: 0x06007B95 RID: 31637 RVA: 0x0019BB10 File Offset: 0x00199D10
|
||||
[Token(Token = "0x6007B95")]
|
||||
[Address(RVA = "0x53E080", Offset = "0x53CA80", VA = "0x18053E080")]
|
||||
public void Reset()
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = new V3TbsCertificateGenerator();
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
this.tbsGen = v3TbsCertificateGenerator;
|
||||
x509ExtensionsGenerator.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x06007B96 RID: 31638 RVA: 0x0019BB40 File Offset: 0x00199D40
|
||||
[Token(Token = "0x6007B96")]
|
||||
[Address(RVA = "0x53E250", Offset = "0x53CC50", VA = "0x18053E250")]
|
||||
public void SetSerialNumber(BigInteger serialNumber)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007B96)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509V3CertificateGenerator::SetSerialNumber(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_25:
|
||||
stloc:ArgumentException(var_2_34, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("serial number must be a positive integer"), ldstr:string("serialNumber")))
|
||||
}
|
||||
|
||||
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: 0x06007B97 RID: 31639 RVA: 0x0019BB84 File Offset: 0x00199D84
|
||||
[Token(Token = "0x6007B97")]
|
||||
[Address(RVA = "0x53E0F0", Offset = "0x53CAF0", VA = "0x18053E0F0")]
|
||||
public void SetIssuerDN(X509Name issuer)
|
||||
{
|
||||
this.tbsGen.issuer = issuer;
|
||||
}
|
||||
|
||||
// Token: 0x06007B98 RID: 31640 RVA: 0x0019BBA4 File Offset: 0x00199DA4
|
||||
[Token(Token = "0x6007B98")]
|
||||
[Address(RVA = "0x53E1B0", Offset = "0x53CBB0", VA = "0x18053E1B0")]
|
||||
public void SetNotBefore(DateTime date)
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = this.tbsGen;
|
||||
Time time = new Time(date);
|
||||
v3TbsCertificateGenerator.startDate = time;
|
||||
}
|
||||
|
||||
// Token: 0x06007B99 RID: 31641 RVA: 0x0019BBCC File Offset: 0x00199DCC
|
||||
[Token(Token = "0x6007B99")]
|
||||
[Address(RVA = "0x53E140", Offset = "0x53CB40", VA = "0x18053E140")]
|
||||
public void SetNotAfter(DateTime date)
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = this.tbsGen;
|
||||
Time time = new Time(date);
|
||||
v3TbsCertificateGenerator.endDate = time;
|
||||
}
|
||||
|
||||
// Token: 0x06007B9A RID: 31642 RVA: 0x0019BBF4 File Offset: 0x00199DF4
|
||||
[Token(Token = "0x6007B9A")]
|
||||
[Address(RVA = "0x53E430", Offset = "0x53CE30", VA = "0x18053E430")]
|
||||
public void SetSubjectDN(X509Name subject)
|
||||
{
|
||||
this.tbsGen.subject = subject;
|
||||
}
|
||||
|
||||
// Token: 0x06007B9B RID: 31643 RVA: 0x0019BC14 File Offset: 0x00199E14
|
||||
[Token(Token = "0x6007B9B")]
|
||||
[Address(RVA = "0x53E220", Offset = "0x53CC20", VA = "0x18053E220")]
|
||||
public void SetPublicKey(AsymmetricKeyParameter publicKey)
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = this.tbsGen;
|
||||
SubjectPublicKeyInfo subjectPublicKeyInfo = SubjectPublicKeyInfoFactory.CreateSubjectPublicKeyInfo(publicKey);
|
||||
v3TbsCertificateGenerator.subjectPublicKeyInfo = subjectPublicKeyInfo;
|
||||
}
|
||||
|
||||
// Token: 0x06007B9C RID: 31644 RVA: 0x0019BC3C File Offset: 0x00199E3C
|
||||
[Token(Token = "0x6007B9C")]
|
||||
[Address(RVA = "0x53E310", Offset = "0x53CD10", VA = "0x18053E310")]
|
||||
[Obsolete]
|
||||
public void SetSignatureAlgorithm(string signatureAlgorithm)
|
||||
{
|
||||
this.signatureAlgorithm = signatureAlgorithm;
|
||||
DerObjectIdentifier algorithmOid = X509Utilities.GetAlgorithmOid(signatureAlgorithm);
|
||||
this.sigOid = algorithmOid;
|
||||
AlgorithmIdentifier sigAlgID = X509Utilities.GetSigAlgID(algorithmOid, signatureAlgorithm);
|
||||
this.sigAlgId = sigAlgID;
|
||||
this.tbsGen.signature = sigAlgID;
|
||||
}
|
||||
|
||||
// Token: 0x06007B9D RID: 31645 RVA: 0x0019BC8C File Offset: 0x00199E8C
|
||||
[Token(Token = "0x6007B9D")]
|
||||
[Address(RVA = "0x53E450", Offset = "0x53CE50", VA = "0x18053E450")]
|
||||
public void SetSubjectUniqueID(bool[] uniqueID)
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = this.tbsGen;
|
||||
DerBitString derBitString = this.booleanToBitString(uniqueID);
|
||||
v3TbsCertificateGenerator.subjectUniqueID = derBitString;
|
||||
}
|
||||
|
||||
// Token: 0x06007B9E RID: 31646 RVA: 0x0019BCB8 File Offset: 0x00199EB8
|
||||
[Token(Token = "0x6007B9E")]
|
||||
[Address(RVA = "0x53E110", Offset = "0x53CB10", VA = "0x18053E110")]
|
||||
public void SetIssuerUniqueID(bool[] uniqueID)
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = this.tbsGen;
|
||||
DerBitString derBitString = this.booleanToBitString(uniqueID);
|
||||
v3TbsCertificateGenerator.issuerUniqueID = derBitString;
|
||||
}
|
||||
|
||||
// Token: 0x06007B9F RID: 31647 RVA: 0x0019BCE4 File Offset: 0x00199EE4
|
||||
[Token(Token = "0x6007B9F")]
|
||||
[Address(RVA = "0x53E500", Offset = "0x53CF00", VA = "0x18053E500")]
|
||||
private DerBitString booleanToBitString(bool[] id)
|
||||
{
|
||||
int num = id.Length;
|
||||
num += 7;
|
||||
byte[] array = new byte[id];
|
||||
int num2 = 0;
|
||||
int num3 = id.Length;
|
||||
if (num2 != num3)
|
||||
{
|
||||
num2 += id;
|
||||
num2 -= id;
|
||||
uint num4;
|
||||
num4 -= (uint)num2;
|
||||
num2++;
|
||||
}
|
||||
if (num2 < array.Length)
|
||||
{
|
||||
num3++;
|
||||
}
|
||||
uint num5;
|
||||
DerBitString derBitString = new DerBitString(array, (int)num5);
|
||||
if (num3 != 0)
|
||||
{
|
||||
num5 -= (uint)num3;
|
||||
return derBitString;
|
||||
}
|
||||
return derBitString;
|
||||
}
|
||||
|
||||
// Token: 0x06007BA0 RID: 31648 RVA: 0x0019BD50 File Offset: 0x00199F50
|
||||
[Token(Token = "0x6007BA0")]
|
||||
[Address(RVA = "0x53D870", Offset = "0x53C270", VA = "0x18053D870")]
|
||||
public void AddExtension(string oid, bool critical, Asn1Encodable extensionValue)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
||||
x509ExtensionsGenerator.AddExtension(derObjectIdentifier, critical, extensionValue);
|
||||
}
|
||||
|
||||
// Token: 0x06007BA1 RID: 31649 RVA: 0x0019BD7C File Offset: 0x00199F7C
|
||||
[Token(Token = "0x6007BA1")]
|
||||
[Address(RVA = "0x53CB30", Offset = "0x53B530", VA = "0x18053CB30")]
|
||||
public void AddExtension(DerObjectIdentifier oid, bool critical, Asn1Encodable extensionValue)
|
||||
{
|
||||
this.extGenerator.AddExtension(oid, critical, extensionValue);
|
||||
}
|
||||
|
||||
// Token: 0x06007BA2 RID: 31650 RVA: 0x0019BDA0 File Offset: 0x00199FA0
|
||||
[Token(Token = "0x6007BA2")]
|
||||
[Address(RVA = "0x53D700", Offset = "0x53C100", VA = "0x18053D700")]
|
||||
public void AddExtension(string oid, bool critical, byte[] extensionValue)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
||||
DerOctetString derOctetString = new DerOctetString(extensionValue);
|
||||
x509ExtensionsGenerator.AddExtension(derObjectIdentifier, critical, derOctetString);
|
||||
}
|
||||
|
||||
// Token: 0x06007BA3 RID: 31651 RVA: 0x0019BDD4 File Offset: 0x00199FD4
|
||||
[Token(Token = "0x6007BA3")]
|
||||
[Address(RVA = "0x53D7C0", Offset = "0x53C1C0", VA = "0x18053D7C0")]
|
||||
public void AddExtension(DerObjectIdentifier oid, bool critical, byte[] extensionValue)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
DerOctetString derOctetString = new DerOctetString(extensionValue);
|
||||
x509ExtensionsGenerator.AddExtension(oid, critical, derOctetString);
|
||||
}
|
||||
|
||||
// Token: 0x06007BA4 RID: 31652 RVA: 0x0019BE00 File Offset: 0x0019A000
|
||||
[Token(Token = "0x6007BA4")]
|
||||
[Address(RVA = "0x53DA90", Offset = "0x53C490", VA = "0x18053DA90")]
|
||||
public void CopyAndAddExtension(string oid, bool critical, X509Certificate cert)
|
||||
{
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
||||
this.CopyAndAddExtension(derObjectIdentifier, critical, cert);
|
||||
}
|
||||
|
||||
// Token: 0x06007BA5 RID: 31653 RVA: 0x0019BE20 File Offset: 0x0019A020
|
||||
[Token(Token = "0x6007BA5")]
|
||||
[Address(RVA = "0x53D920", Offset = "0x53C320", VA = "0x18053D920")]
|
||||
public void CopyAndAddExtension(DerObjectIdentifier oid, bool critical, X509Certificate cert)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007BA5)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509V3CertificateGenerator::CopyAndAddExtension(BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.DerObjectIdentifier,System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Certificate)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_24:
|
||||
stloc:CertificateParsingException(var_3_39, newobj:CertificateParsingException(CertificateParsingException::.ctor, call:string(string::Concat, ldstr:string[exp:object]("extension "), ldloc:DerObjectIdentifier[exp:object](oid), ldstr:string[exp:object](" not 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 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x06007BA6 RID: 31654 RVA: 0x0019BE68 File Offset: 0x0019A068
|
||||
[Token(Token = "0x6007BA6")]
|
||||
[Address(RVA = "0x53DFF0", Offset = "0x53C9F0", VA = "0x18053DFF0")]
|
||||
[Obsolete]
|
||||
public X509Certificate Generate(AsymmetricKeyParameter privateKey)
|
||||
{
|
||||
int num;
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, num);
|
||||
num = 0;
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x06007BA7 RID: 31655 RVA: 0x0019BE8C File Offset: 0x0019A08C
|
||||
[Token(Token = "0x6007BA7")]
|
||||
[Address(RVA = "0x53DBF0", Offset = "0x53C5F0", VA = "0x18053DBF0")]
|
||||
[Obsolete]
|
||||
public X509Certificate Generate(AsymmetricKeyParameter privateKey, SecureRandom random)
|
||||
{
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, random);
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x06007BA8 RID: 31656 RVA: 0x0019BEB0 File Offset: 0x0019A0B0
|
||||
[Token(Token = "0x6007BA8")]
|
||||
[Address(RVA = "0x53DC90", Offset = "0x53C690", VA = "0x18053DC90")]
|
||||
public X509Certificate Generate(ISignatureFactory signatureCalculatorFactory)
|
||||
{
|
||||
byte[] derEncoded;
|
||||
for (;;)
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = this.tbsGen;
|
||||
if (signatureCalculatorFactory != 0)
|
||||
{
|
||||
if (!this.extGenerator.IsEmpty)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator2 = this.tbsGen;
|
||||
X509Extensions x509Extensions = x509ExtensionsGenerator.Generate();
|
||||
v3TbsCertificateGenerator2.SetExtensions(x509Extensions);
|
||||
}
|
||||
derEncoded = this.tbsGen.GenerateTbsCertificate().GetDerEncoded();
|
||||
if (derEncoded != 0 && derEncoded != 0)
|
||||
{
|
||||
if (derEncoded == 0)
|
||||
{
|
||||
}
|
||||
if (derEncoded != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
DerBitString derBitString = new DerBitString(derEncoded);
|
||||
X509CertificateStructure x509CertificateStructure;
|
||||
return new X509Certificate(x509CertificateStructure);
|
||||
}
|
||||
|
||||
// Token: 0x06007BA9 RID: 31657 RVA: 0x0019BF40 File Offset: 0x0019A140
|
||||
[Token(Token = "0x6007BA9")]
|
||||
[Address(RVA = "0x53DB30", Offset = "0x53C530", VA = "0x18053DB30")]
|
||||
private X509Certificate GenerateJcaObject(TbsCertificateStructure tbsCert, AlgorithmIdentifier sigAlg, byte[] signature)
|
||||
{
|
||||
DerBitString derBitString = new DerBitString(signature);
|
||||
return new X509Certificate(new X509CertificateStructure(tbsCert, sigAlg, derBitString));
|
||||
}
|
||||
|
||||
// Token: 0x17001423 RID: 5155
|
||||
// (get) Token: 0x06007BAA RID: 31658 RVA: 0x0019BF64 File Offset: 0x0019A164
|
||||
[Token(Token = "0x17001423")]
|
||||
public IEnumerable SignatureAlgNames
|
||||
{
|
||||
[Token(Token = "0x6007BAA")]
|
||||
[Address(RVA = "0x53E650", Offset = "0x53D050", VA = "0x18053E650")]
|
||||
get
|
||||
{
|
||||
return X509Utilities.GetAlgNames();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04005876 RID: 22646
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005876")]
|
||||
private readonly X509ExtensionsGenerator extGenerator;
|
||||
|
||||
// Token: 0x04005877 RID: 22647
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4005877")]
|
||||
private V3TbsCertificateGenerator tbsGen;
|
||||
|
||||
// Token: 0x04005878 RID: 22648
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4005878")]
|
||||
private DerObjectIdentifier sigOid;
|
||||
|
||||
// Token: 0x04005879 RID: 22649
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4005879")]
|
||||
private AlgorithmIdentifier sigAlgId;
|
||||
|
||||
// Token: 0x0400587A RID: 22650
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x400587A")]
|
||||
private string signatureAlgorithm;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user