m
This commit is contained in:
+436
@@ -0,0 +1,436 @@
|
||||
using System;
|
||||
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: 0x020019D8 RID: 6616
|
||||
[Token(Token = "0x20019D8")]
|
||||
public class AttributeCertificateHolder : IX509Selector, ICloneable
|
||||
{
|
||||
// Token: 0x06009A28 RID: 39464 RVA: 0x001F7E0C File Offset: 0x001F600C
|
||||
[Token(Token = "0x6009A28")]
|
||||
[Address(RVA = "0x410070", Offset = "0x40F070", VA = "0x180410070")]
|
||||
internal AttributeCertificateHolder(Asn1Sequence seq)
|
||||
{
|
||||
Holder instance = Holder.GetInstance(seq);
|
||||
this.holder = instance;
|
||||
}
|
||||
|
||||
// Token: 0x06009A29 RID: 39465 RVA: 0x001F7E30 File Offset: 0x001F6030
|
||||
[Token(Token = "0x6009A29")]
|
||||
[Address(RVA = "0x4100A0", Offset = "0x40F0A0", VA = "0x1804100A0")]
|
||||
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: 0x06009A2A RID: 39466 RVA: 0x001F7E68 File Offset: 0x001F6068
|
||||
[Token(Token = "0x6009A2A")]
|
||||
[Address(RVA = "0x40FF10", Offset = "0x40EF10", VA = "0x18040FF10")]
|
||||
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: 0x06009A2B RID: 39467 RVA: 0x001F7EB0 File Offset: 0x001F60B0
|
||||
[Token(Token = "0x6009A2B")]
|
||||
[Address(RVA = "0x40FE90", Offset = "0x40EE90", VA = "0x18040FE90")]
|
||||
public AttributeCertificateHolder(X509Name principal)
|
||||
{
|
||||
Holder holder = new Holder(this.GenerateGeneralNames(principal));
|
||||
this.holder = holder;
|
||||
}
|
||||
|
||||
// Token: 0x06009A2C RID: 39468 RVA: 0x001F7ED8 File Offset: 0x001F60D8
|
||||
[Token(Token = "0x6009A2C")]
|
||||
[Address(RVA = "0x410170", Offset = "0x40F170", VA = "0x180410170")]
|
||||
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: 0x17001892 RID: 6290
|
||||
// (get) Token: 0x06009A2D RID: 39469 RVA: 0x001F7F14 File Offset: 0x001F6114
|
||||
[Token(Token = "0x17001892")]
|
||||
public int DigestedObjectType
|
||||
{
|
||||
[Token(Token = "0x6009A2D")]
|
||||
[Address(RVA = "0x4102E0", Offset = "0x40F2E0", VA = "0x1804102E0")]
|
||||
get
|
||||
{
|
||||
ObjectDigestInfo objectDigestInfo = this.holder.objectDigestInfo;
|
||||
if (objectDigestInfo == 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return objectDigestInfo.digestedObjectType.Value.IntValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001893 RID: 6291
|
||||
// (get) Token: 0x06009A2E RID: 39470 RVA: 0x001F7F4C File Offset: 0x001F614C
|
||||
[Token(Token = "0x17001893")]
|
||||
public string DigestAlgorithm
|
||||
{
|
||||
[Token(Token = "0x6009A2E")]
|
||||
[Address(RVA = "0x410290", Offset = "0x40F290", VA = "0x180410290")]
|
||||
get
|
||||
{
|
||||
ObjectDigestInfo objectDigestInfo = this.holder.objectDigestInfo;
|
||||
if (objectDigestInfo == 0)
|
||||
{
|
||||
}
|
||||
Asn1Object asn1Object = objectDigestInfo.digestAlgorithm.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009A2F RID: 39471 RVA: 0x001F7F7C File Offset: 0x001F617C
|
||||
[Token(Token = "0x6009A2F")]
|
||||
[Address(RVA = "0x40F4B0", Offset = "0x40E4B0", VA = "0x18040F4B0")]
|
||||
public byte[] GetObjectDigest()
|
||||
{
|
||||
ObjectDigestInfo objectDigestInfo = this.holder.objectDigestInfo;
|
||||
if (objectDigestInfo == 0)
|
||||
{
|
||||
}
|
||||
Asn1Object asn1Object = objectDigestInfo.objectDigest.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x17001894 RID: 6292
|
||||
// (get) Token: 0x06009A30 RID: 39472 RVA: 0x001F7FAC File Offset: 0x001F61AC
|
||||
[Token(Token = "0x17001894")]
|
||||
public string OtherObjectTypeID
|
||||
{
|
||||
[Token(Token = "0x6009A30")]
|
||||
[Address(RVA = "0x410330", Offset = "0x40F330", VA = "0x180410330")]
|
||||
get
|
||||
{
|
||||
ObjectDigestInfo objectDigestInfo = this.holder.objectDigestInfo;
|
||||
if (objectDigestInfo == 0)
|
||||
{
|
||||
}
|
||||
return objectDigestInfo.otherObjectTypeID.identifier;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009A31 RID: 39473 RVA: 0x001F7FDC File Offset: 0x001F61DC
|
||||
[Token(Token = "0x6009A31")]
|
||||
[Address(RVA = "0x40F200", Offset = "0x40E200", VA = "0x18040F200")]
|
||||
private GeneralNames GenerateGeneralNames(X509Name principal)
|
||||
{
|
||||
return new GeneralNames(new GeneralName(principal));
|
||||
}
|
||||
|
||||
// Token: 0x06009A32 RID: 39474 RVA: 0x001F7FF4 File Offset: 0x001F61F4
|
||||
[Token(Token = "0x6009A32")]
|
||||
[Address(RVA = "0x40FD40", Offset = "0x40ED40", VA = "0x18040FD40")]
|
||||
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: 0x06009A33 RID: 39475 RVA: 0x001F8048 File Offset: 0x001F6248
|
||||
[Token(Token = "0x6009A33")]
|
||||
[Address(RVA = "0x40F320", Offset = "0x40E320", VA = "0x18040F320")]
|
||||
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: 0x06009A34 RID: 39476 RVA: 0x001F80C4 File Offset: 0x001F62C4
|
||||
[Token(Token = "0x6009A34")]
|
||||
[Address(RVA = "0x40F4F0", Offset = "0x40E4F0", VA = "0x18040F4F0")]
|
||||
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: 0x06009A35 RID: 39477 RVA: 0x001F81E8 File Offset: 0x001F63E8
|
||||
[Token(Token = "0x6009A35")]
|
||||
[Address(RVA = "0x40F270", Offset = "0x40E270", VA = "0x18040F270")]
|
||||
public X509Name[] GetEntityNames()
|
||||
{
|
||||
GeneralNames entityName = this.holder.entityName;
|
||||
if (entityName == 0)
|
||||
{
|
||||
}
|
||||
return this.GetPrincipals(entityName);
|
||||
}
|
||||
|
||||
// Token: 0x06009A36 RID: 39478 RVA: 0x001F8214 File Offset: 0x001F6414
|
||||
[Token(Token = "0x6009A36")]
|
||||
[Address(RVA = "0x40F2E0", Offset = "0x40E2E0", VA = "0x18040F2E0")]
|
||||
public X509Name[] GetIssuer()
|
||||
{
|
||||
IssuerSerial baseCertificateID = this.holder.baseCertificateID;
|
||||
if (baseCertificateID == 0)
|
||||
{
|
||||
}
|
||||
GeneralNames issuer = baseCertificateID.issuer;
|
||||
return this.GetPrincipals(issuer);
|
||||
}
|
||||
|
||||
// Token: 0x17001895 RID: 6293
|
||||
// (get) Token: 0x06009A37 RID: 39479 RVA: 0x001F8248 File Offset: 0x001F6448
|
||||
[Token(Token = "0x17001895")]
|
||||
public BigInteger SerialNumber
|
||||
{
|
||||
[Token(Token = "0x6009A37")]
|
||||
[Address(RVA = "0x410370", Offset = "0x40F370", VA = "0x180410370")]
|
||||
get
|
||||
{
|
||||
IssuerSerial baseCertificateID = this.holder.baseCertificateID;
|
||||
if (baseCertificateID == 0)
|
||||
{
|
||||
}
|
||||
return baseCertificateID.serial.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009A38 RID: 39480 RVA: 0x001F8278 File Offset: 0x001F6478
|
||||
[Token(Token = "0x6009A38")]
|
||||
[Address(RVA = "0x40F010", Offset = "0x40E010", VA = "0x18040F010", 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: 0x06009A39 RID: 39481 RVA: 0x001F82B0 File Offset: 0x001F64B0
|
||||
[Token(Token = "0x6009A39")]
|
||||
[Address(RVA = "0x40F850", Offset = "0x40E850", VA = "0x18040F850")]
|
||||
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: 0x06009A3A RID: 39482 RVA: 0x001F8478 File Offset: 0x001F6678
|
||||
[Token(Token = "0x6009A3A")]
|
||||
[Address(RVA = "0x40F0F0", Offset = "0x40E0F0", VA = "0x18040F0F0", 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: 0x06009A3B RID: 39483 RVA: 0x001F84B0 File Offset: 0x001F66B0
|
||||
[Token(Token = "0x6009A3B")]
|
||||
[Address(RVA = "0x40F2B0", Offset = "0x40E2B0", VA = "0x18040F2B0", Slot = "2")]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
Asn1Object asn1Object = this.holder.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009A3C RID: 39484 RVA: 0x001F84D0 File Offset: 0x001F66D0
|
||||
[Token(Token = "0x6009A3C")]
|
||||
[Address(RVA = "0x40FC60", Offset = "0x40EC60", VA = "0x18040FC60", Slot = "4")]
|
||||
public bool Match(object obj)
|
||||
{
|
||||
while (obj != 0 && obj != 0)
|
||||
{
|
||||
if (obj != 0)
|
||||
{
|
||||
bool flag;
|
||||
return flag;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400682F RID: 26671
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400682F")]
|
||||
internal readonly Holder holder;
|
||||
}
|
||||
}
|
||||
+224
@@ -0,0 +1,224 @@
|
||||
using System;
|
||||
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: 0x020019D9 RID: 6617
|
||||
[Token(Token = "0x20019D9")]
|
||||
public class AttributeCertificateIssuer : IX509Selector, ICloneable
|
||||
{
|
||||
// Token: 0x06009A3D RID: 39485 RVA: 0x001F84F0 File Offset: 0x001F66F0
|
||||
[Token(Token = "0x6009A3D")]
|
||||
[Address(RVA = "0x410EE0", Offset = "0x40FEE0", VA = "0x180410EE0")]
|
||||
public AttributeCertificateIssuer(AttCertIssuer issuer)
|
||||
{
|
||||
Asn1Encodable obj = issuer.obj;
|
||||
this.form = obj;
|
||||
}
|
||||
|
||||
// Token: 0x06009A3E RID: 39486 RVA: 0x001F8518 File Offset: 0x001F6718
|
||||
[Token(Token = "0x6009A3E")]
|
||||
[Address(RVA = "0x410E30", Offset = "0x40FE30", VA = "0x180410E30")]
|
||||
public AttributeCertificateIssuer(X509Name principal)
|
||||
{
|
||||
V2Form v2Form = new V2Form(new GeneralNames(new GeneralName(principal)));
|
||||
this.form = v2Form;
|
||||
}
|
||||
|
||||
// Token: 0x06009A3F RID: 39487 RVA: 0x001F8544 File Offset: 0x001F6744
|
||||
[Token(Token = "0x6009A3F")]
|
||||
[Address(RVA = "0x410530", Offset = "0x40F530", VA = "0x180410530")]
|
||||
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: 0x06009A40 RID: 39488 RVA: 0x001F85EC File Offset: 0x001F67EC
|
||||
[Token(Token = "0x6009A40")]
|
||||
[Address(RVA = "0x4107F0", Offset = "0x40F7F0", VA = "0x1804107F0")]
|
||||
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: 0x06009A41 RID: 39489 RVA: 0x001F8680 File Offset: 0x001F6880
|
||||
[Token(Token = "0x6009A41")]
|
||||
[Address(RVA = "0x410CE0", Offset = "0x40FCE0", VA = "0x180410CE0")]
|
||||
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: 0x06009A42 RID: 39490 RVA: 0x001F86D4 File Offset: 0x001F68D4
|
||||
[Token(Token = "0x6009A42")]
|
||||
[Address(RVA = "0x4103B0", Offset = "0x40F3B0", VA = "0x1804103B0", Slot = "5")]
|
||||
public object Clone()
|
||||
{
|
||||
Asn1Encodable obj = AttCertIssuer.GetInstance(this.form).obj;
|
||||
AttributeCertificateIssuer attributeCertificateIssuer;
|
||||
attributeCertificateIssuer.form = obj;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009A43 RID: 39491 RVA: 0x001F8700 File Offset: 0x001F6900
|
||||
[Token(Token = "0x6009A43")]
|
||||
[Address(RVA = "0x4109E0", Offset = "0x40F9E0", VA = "0x1804109E0")]
|
||||
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: 0x06009A44 RID: 39492 RVA: 0x001F8768 File Offset: 0x001F6968
|
||||
[Token(Token = "0x6009A44")]
|
||||
[Address(RVA = "0x410420", Offset = "0x40F420", VA = "0x180410420", 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: 0x06009A45 RID: 39493 RVA: 0x001F87A0 File Offset: 0x001F69A0
|
||||
[Token(Token = "0x6009A45")]
|
||||
[Address(RVA = "0x40F2B0", Offset = "0x40E2B0", VA = "0x18040F2B0", Slot = "2")]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
Asn1Object asn1Object = this.form.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009A46 RID: 39494 RVA: 0x001F87C0 File Offset: 0x001F69C0
|
||||
[Token(Token = "0x6009A46")]
|
||||
[Address(RVA = "0x410C00", Offset = "0x40FC00", VA = "0x180410C00", Slot = "4")]
|
||||
public bool Match(object obj)
|
||||
{
|
||||
while (obj != 0 && obj != 0)
|
||||
{
|
||||
if (obj != 0)
|
||||
{
|
||||
bool flag;
|
||||
return flag;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04006830 RID: 26672
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006830")]
|
||||
internal readonly Asn1Encodable form;
|
||||
}
|
||||
}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
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: 0x020019FD RID: 6653
|
||||
[Token(Token = "0x20019FD")]
|
||||
public class AuthorityKeyIdentifierStructure : AuthorityKeyIdentifier
|
||||
{
|
||||
// Token: 0x06009BCA RID: 39882 RVA: 0x001FDFB0 File Offset: 0x001FC1B0
|
||||
[Token(Token = "0x6009BCA")]
|
||||
[Address(RVA = "0x411410", Offset = "0x410410", VA = "0x180411410")]
|
||||
public AuthorityKeyIdentifierStructure(Asn1OctetString encodedValue)
|
||||
{
|
||||
Asn1Object asn1Object;
|
||||
do
|
||||
{
|
||||
Stream octetStream = encodedValue.GetOctetStream();
|
||||
if (asn1Object == 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (asn1Object == 0);
|
||||
}
|
||||
|
||||
// Token: 0x06009BCB RID: 39883 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6009BCB")]
|
||||
[Address(RVA = "0x410F20", Offset = "0x40FF20", VA = "0x180410F20")]
|
||||
private static Asn1Sequence FromCertificate(X509Certificate certificate)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06009BCC RID: 39884 RVA: 0x001FDFD4 File Offset: 0x001FC1D4
|
||||
[Token(Token = "0x6009BCC")]
|
||||
[Address(RVA = "0x4112E0", Offset = "0x4102E0", VA = "0x1804112E0")]
|
||||
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: 0x06009BCD RID: 39885 RVA: 0x001FE008 File Offset: 0x001FC208
|
||||
[Token(Token = "0x6009BCD")]
|
||||
[Address(RVA = "0x411500", Offset = "0x410500", VA = "0x180411500")]
|
||||
public AuthorityKeyIdentifierStructure(X509Certificate certificate)
|
||||
{
|
||||
Asn1Sequence asn1Sequence = AuthorityKeyIdentifierStructure.FromCertificate(certificate);
|
||||
base..ctor(asn1Sequence);
|
||||
}
|
||||
|
||||
// Token: 0x06009BCE RID: 39886 RVA: 0x001FE024 File Offset: 0x001FC224
|
||||
[Token(Token = "0x6009BCE")]
|
||||
[Address(RVA = "0x4114D0", Offset = "0x4104D0", VA = "0x1804114D0")]
|
||||
public AuthorityKeyIdentifierStructure(AsymmetricKeyParameter pubKey)
|
||||
{
|
||||
Asn1Sequence asn1Sequence = AuthorityKeyIdentifierStructure.FromKey(pubKey);
|
||||
base..ctor(asn1Sequence);
|
||||
}
|
||||
}
|
||||
}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
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: 0x020019FE RID: 6654
|
||||
[Token(Token = "0x20019FE")]
|
||||
public class SubjectKeyIdentifierStructure : SubjectKeyIdentifier
|
||||
{
|
||||
// Token: 0x06009BCF RID: 39887 RVA: 0x001FE040 File Offset: 0x001FC240
|
||||
[Token(Token = "0x6009BCF")]
|
||||
[Address(RVA = "0x412F00", Offset = "0x411F00", VA = "0x180412F00")]
|
||||
public SubjectKeyIdentifierStructure(Asn1OctetString encodedValue)
|
||||
{
|
||||
Asn1Object asn1Object;
|
||||
do
|
||||
{
|
||||
Stream octetStream = encodedValue.GetOctetStream();
|
||||
if (asn1Object == 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (asn1Object == 0);
|
||||
}
|
||||
|
||||
// Token: 0x06009BD0 RID: 39888 RVA: 0x001FE064 File Offset: 0x001FC264
|
||||
[Token(Token = "0x6009BD0")]
|
||||
[Address(RVA = "0x412DB0", Offset = "0x411DB0", VA = "0x180412DB0")]
|
||||
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: 0x06009BD1 RID: 39889 RVA: 0x001FE0A0 File Offset: 0x001FC2A0
|
||||
[Token(Token = "0x6009BD1")]
|
||||
[Address(RVA = "0x412FC0", Offset = "0x411FC0", VA = "0x180412FC0")]
|
||||
public SubjectKeyIdentifierStructure(AsymmetricKeyParameter pubKey)
|
||||
{
|
||||
Asn1OctetString asn1OctetString = SubjectKeyIdentifierStructure.FromPublicKey(pubKey);
|
||||
base..ctor(asn1OctetString);
|
||||
}
|
||||
}
|
||||
}
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
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: 0x020019FF RID: 6655
|
||||
[Token(Token = "0x20019FF")]
|
||||
public class X509ExtensionUtilities
|
||||
{
|
||||
// Token: 0x06009BD2 RID: 39890 RVA: 0x001FE0BC File Offset: 0x001FC2BC
|
||||
[Token(Token = "0x6009BD2")]
|
||||
[Address(RVA = "0x41F2A0", Offset = "0x41E2A0", VA = "0x18041F2A0")]
|
||||
public static Asn1Object FromExtensionValue(Asn1OctetString extensionValue)
|
||||
{
|
||||
Stream octetStream = extensionValue.GetOctetStream();
|
||||
Asn1Object asn1Object;
|
||||
return asn1Object;
|
||||
}
|
||||
|
||||
// Token: 0x06009BD3 RID: 39891 RVA: 0x001FE0D8 File Offset: 0x001FC2D8
|
||||
[Token(Token = "0x6009BD3")]
|
||||
[Address(RVA = "0x41F760", Offset = "0x41E760", VA = "0x18041F760")]
|
||||
public static ICollection GetIssuerAlternativeNames(X509Certificate cert)
|
||||
{
|
||||
ISet criticalExtensionOids = cert.GetCriticalExtensionOids();
|
||||
ICollection collection;
|
||||
return collection;
|
||||
}
|
||||
|
||||
// Token: 0x06009BD4 RID: 39892 RVA: 0x001FE0F4 File Offset: 0x001FC2F4
|
||||
[Token(Token = "0x6009BD4")]
|
||||
[Address(RVA = "0x41F7F0", Offset = "0x41E7F0", VA = "0x18041F7F0")]
|
||||
public static ICollection GetSubjectAlternativeNames(X509Certificate cert)
|
||||
{
|
||||
ISet criticalExtensionOids = cert.GetCriticalExtensionOids();
|
||||
ICollection collection;
|
||||
return collection;
|
||||
}
|
||||
|
||||
// Token: 0x06009BD5 RID: 39893 RVA: 0x001FE110 File Offset: 0x001FC310
|
||||
[Token(Token = "0x6009BD5")]
|
||||
[Address(RVA = "0x41F2D0", Offset = "0x41E2D0", VA = "0x18041F2D0")]
|
||||
private static ICollection GetAlternativeName(Asn1OctetString extVal)
|
||||
{
|
||||
int num;
|
||||
Asn1Object asn1Object;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
IList list = Platform.CreateArrayList();
|
||||
if (extVal == 0)
|
||||
{
|
||||
goto IL_77;
|
||||
}
|
||||
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 != 0)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
IL_77:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009BD6 RID: 39894 RVA: 0x001FE1F0 File Offset: 0x001FC3F0
|
||||
[Token(Token = "0x6009BD6")]
|
||||
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
||||
public X509ExtensionUtilities()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x020019DA RID: 6618
|
||||
[Token(Token = "0x20019DA")]
|
||||
public interface IX509AttributeCertificate : IX509Extension
|
||||
{
|
||||
// Token: 0x17001896 RID: 6294
|
||||
// (get) Token: 0x06009A47 RID: 39495
|
||||
[Token(Token = "0x17001896")]
|
||||
int Version
|
||||
{
|
||||
[Token(Token = "0x6009A47")]
|
||||
[Address(Slot = "0")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x17001897 RID: 6295
|
||||
// (get) Token: 0x06009A48 RID: 39496
|
||||
[Token(Token = "0x17001897")]
|
||||
BigInteger SerialNumber
|
||||
{
|
||||
[Token(Token = "0x6009A48")]
|
||||
[Address(Slot = "1")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x17001898 RID: 6296
|
||||
// (get) Token: 0x06009A49 RID: 39497
|
||||
[Token(Token = "0x17001898")]
|
||||
DateTime NotBefore
|
||||
{
|
||||
[Token(Token = "0x6009A49")]
|
||||
[Address(Slot = "2")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x17001899 RID: 6297
|
||||
// (get) Token: 0x06009A4A RID: 39498
|
||||
[Token(Token = "0x17001899")]
|
||||
DateTime NotAfter
|
||||
{
|
||||
[Token(Token = "0x6009A4A")]
|
||||
[Address(Slot = "3")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x1700189A RID: 6298
|
||||
// (get) Token: 0x06009A4B RID: 39499
|
||||
[Token(Token = "0x1700189A")]
|
||||
AttributeCertificateHolder Holder
|
||||
{
|
||||
[Token(Token = "0x6009A4B")]
|
||||
[Address(Slot = "4")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x1700189B RID: 6299
|
||||
// (get) Token: 0x06009A4C RID: 39500
|
||||
[Token(Token = "0x1700189B")]
|
||||
AttributeCertificateIssuer Issuer
|
||||
{
|
||||
[Token(Token = "0x6009A4C")]
|
||||
[Address(Slot = "5")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x06009A4D RID: 39501
|
||||
[Token(Token = "0x6009A4D")]
|
||||
[Address(Slot = "6")]
|
||||
X509Attribute[] GetAttributes();
|
||||
|
||||
// Token: 0x06009A4E RID: 39502
|
||||
[Token(Token = "0x6009A4E")]
|
||||
[Address(Slot = "7")]
|
||||
X509Attribute[] GetAttributes(string oid);
|
||||
|
||||
// Token: 0x06009A4F RID: 39503
|
||||
[Token(Token = "0x6009A4F")]
|
||||
[Address(Slot = "8")]
|
||||
bool[] GetIssuerUniqueID();
|
||||
|
||||
// Token: 0x1700189C RID: 6300
|
||||
// (get) Token: 0x06009A50 RID: 39504
|
||||
[Token(Token = "0x1700189C")]
|
||||
bool IsValidNow
|
||||
{
|
||||
[Token(Token = "0x6009A50")]
|
||||
[Address(Slot = "9")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x06009A51 RID: 39505
|
||||
[Token(Token = "0x6009A51")]
|
||||
[Address(Slot = "10")]
|
||||
bool IsValid(DateTime date);
|
||||
|
||||
// Token: 0x06009A52 RID: 39506
|
||||
[Token(Token = "0x6009A52")]
|
||||
[Address(Slot = "11")]
|
||||
void CheckValidity();
|
||||
|
||||
// Token: 0x06009A53 RID: 39507
|
||||
[Token(Token = "0x6009A53")]
|
||||
[Address(Slot = "12")]
|
||||
void CheckValidity(DateTime date);
|
||||
|
||||
// Token: 0x06009A54 RID: 39508
|
||||
[Token(Token = "0x6009A54")]
|
||||
[Address(Slot = "13")]
|
||||
byte[] GetSignature();
|
||||
|
||||
// Token: 0x06009A55 RID: 39509
|
||||
[Token(Token = "0x6009A55")]
|
||||
[Address(Slot = "14")]
|
||||
void Verify(AsymmetricKeyParameter publicKey);
|
||||
|
||||
// Token: 0x06009A56 RID: 39510
|
||||
[Token(Token = "0x6009A56")]
|
||||
[Address(Slot = "15")]
|
||||
byte[] GetEncoded();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x020019DB RID: 6619
|
||||
[Token(Token = "0x20019DB")]
|
||||
public interface IX509Extension
|
||||
{
|
||||
// Token: 0x06009A57 RID: 39511
|
||||
[Token(Token = "0x6009A57")]
|
||||
[Address(Slot = "0")]
|
||||
ISet GetCriticalExtensionOids();
|
||||
|
||||
// Token: 0x06009A58 RID: 39512
|
||||
[Token(Token = "0x6009A58")]
|
||||
[Address(Slot = "1")]
|
||||
ISet GetNonCriticalExtensionOids();
|
||||
|
||||
// Token: 0x06009A59 RID: 39513
|
||||
[Token(Token = "0x6009A59")]
|
||||
[Address(Slot = "2")]
|
||||
[Obsolete]
|
||||
Asn1OctetString GetExtensionValue(string oid);
|
||||
|
||||
// Token: 0x06009A5A RID: 39514
|
||||
[Token(Token = "0x6009A5A")]
|
||||
[Address(Slot = "3")]
|
||||
Asn1OctetString GetExtensionValue(DerObjectIdentifier oid);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x020019DC RID: 6620
|
||||
[Token(Token = "0x20019DC")]
|
||||
internal class PemParser
|
||||
{
|
||||
// Token: 0x06009A5B RID: 39515 RVA: 0x001F87E0 File Offset: 0x001F69E0
|
||||
[Token(Token = "0x6009A5B")]
|
||||
[Address(RVA = "0x412850", Offset = "0x411850", VA = "0x180412850")]
|
||||
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: 0x06009A5C RID: 39516 RVA: 0x001F8854 File Offset: 0x001F6A54
|
||||
[Token(Token = "0x6009A5C")]
|
||||
[Address(RVA = "0x412500", Offset = "0x411500", VA = "0x180412500")]
|
||||
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: 0x06009A5D RID: 39517 RVA: 0x001F888C File Offset: 0x001F6A8C
|
||||
[Token(Token = "0x6009A5D")]
|
||||
[Address(RVA = "0x4125F0", Offset = "0x4115F0", VA = "0x1804125F0")]
|
||||
internal Asn1Sequence ReadPemObject(Stream inStream)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009A5D)
|
||||
|
||||
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: 0x04006831 RID: 26673
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006831")]
|
||||
private readonly string _header1;
|
||||
|
||||
// Token: 0x04006832 RID: 26674
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006832")]
|
||||
private readonly string _header2;
|
||||
|
||||
// Token: 0x04006833 RID: 26675
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4006833")]
|
||||
private readonly string _footer1;
|
||||
|
||||
// Token: 0x04006834 RID: 26676
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4006834")]
|
||||
private readonly string _footer2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
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: 0x020019DD RID: 6621
|
||||
[Token(Token = "0x20019DD")]
|
||||
public class PrincipalUtilities
|
||||
{
|
||||
// Token: 0x06009A5E RID: 39518 RVA: 0x001F8950 File Offset: 0x001F6B50
|
||||
[Token(Token = "0x6009A5E")]
|
||||
[Address(RVA = "0x412910", Offset = "0x411910", VA = "0x180412910")]
|
||||
public static X509Name GetIssuerX509Principal(X509Certificate cert)
|
||||
{
|
||||
DateTime notAfter = cert.NotAfter;
|
||||
Asn1Object asn1Object;
|
||||
return TbsCertificateStructure.GetInstance(asn1Object).issuer;
|
||||
}
|
||||
|
||||
// Token: 0x06009A5F RID: 39519 RVA: 0x001F897C File Offset: 0x001F6B7C
|
||||
[Token(Token = "0x6009A5F")]
|
||||
[Address(RVA = "0x412A90", Offset = "0x411A90", VA = "0x180412A90")]
|
||||
public static X509Name GetSubjectX509Principal(X509Certificate cert)
|
||||
{
|
||||
DateTime notAfter = cert.NotAfter;
|
||||
Asn1Object asn1Object;
|
||||
return TbsCertificateStructure.GetInstance(asn1Object).subject;
|
||||
}
|
||||
|
||||
// Token: 0x06009A60 RID: 39520 RVA: 0x001F89A8 File Offset: 0x001F6BA8
|
||||
[Token(Token = "0x6009A60")]
|
||||
[Address(RVA = "0x4129D0", Offset = "0x4119D0", VA = "0x1804129D0")]
|
||||
public static X509Name GetIssuerX509Principal(X509Crl crl)
|
||||
{
|
||||
ISet revokedCertificates = crl.GetRevokedCertificates();
|
||||
Asn1Object asn1Object;
|
||||
return TbsCertificateList.GetInstance(asn1Object).issuer;
|
||||
}
|
||||
|
||||
// Token: 0x06009A61 RID: 39521 RVA: 0x001F89D4 File Offset: 0x001F6BD4
|
||||
[Token(Token = "0x6009A61")]
|
||||
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
||||
public PrincipalUtilities()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x020019F1 RID: 6641
|
||||
[Token(Token = "0x20019F1")]
|
||||
public interface IX509Selector : ICloneable
|
||||
{
|
||||
// Token: 0x06009B53 RID: 39763
|
||||
[Token(Token = "0x6009B53")]
|
||||
[Address(Slot = "0")]
|
||||
bool Match(object obj);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x020019F2 RID: 6642
|
||||
[Token(Token = "0x20019F2")]
|
||||
public interface IX509Store
|
||||
{
|
||||
// Token: 0x06009B54 RID: 39764
|
||||
[Token(Token = "0x6009B54")]
|
||||
[Address(Slot = "0")]
|
||||
ICollection GetMatches(IX509Selector selector);
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x020019F3 RID: 6643
|
||||
[Token(Token = "0x20019F3")]
|
||||
public interface IX509StoreParameters
|
||||
{
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x020019F4 RID: 6644
|
||||
[Token(Token = "0x20019F4")]
|
||||
[Serializable]
|
||||
public class NoSuchStoreException : X509StoreException
|
||||
{
|
||||
// Token: 0x06009B55 RID: 39765 RVA: 0x001FC9F4 File Offset: 0x001FABF4
|
||||
[Token(Token = "0x6009B55")]
|
||||
[Address(RVA = "0x412430", Offset = "0x411430", VA = "0x180412430")]
|
||||
public NoSuchStoreException()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009B56 RID: 39766 RVA: 0x001FCA08 File Offset: 0x001FAC08
|
||||
[Token(Token = "0x6009B56")]
|
||||
[Address(RVA = "0x412490", Offset = "0x411490", VA = "0x180412490")]
|
||||
public NoSuchStoreException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009B57 RID: 39767 RVA: 0x001FCA1C File Offset: 0x001FAC1C
|
||||
[Token(Token = "0x6009B57")]
|
||||
[Address(RVA = "0x4123B0", Offset = "0x4113B0", VA = "0x1804123B0")]
|
||||
public NoSuchStoreException(string message, Exception e)
|
||||
: base(message, e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
+407
@@ -0,0 +1,407 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
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: 0x020019F5 RID: 6645
|
||||
[Token(Token = "0x20019F5")]
|
||||
public class X509AttrCertStoreSelector : IX509Selector, ICloneable
|
||||
{
|
||||
// Token: 0x06009B58 RID: 39768 RVA: 0x001FCA34 File Offset: 0x001FAC34
|
||||
[Token(Token = "0x6009B58")]
|
||||
[Address(RVA = "0x415730", Offset = "0x414730", VA = "0x180415730")]
|
||||
public X509AttrCertStoreSelector()
|
||||
{
|
||||
HashSet hashSet = new HashSet();
|
||||
this.targetNames = hashSet;
|
||||
HashSet hashSet2 = new HashSet();
|
||||
this.targetGroups = hashSet2;
|
||||
base..ctor();
|
||||
}
|
||||
|
||||
// Token: 0x06009B59 RID: 39769 RVA: 0x001FCA64 File Offset: 0x001FAC64
|
||||
[Token(Token = "0x6009B59")]
|
||||
[Address(RVA = "0x415620", Offset = "0x414620", VA = "0x180415620")]
|
||||
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: 0x06009B5A RID: 39770 RVA: 0x001FCB10 File Offset: 0x001FAD10
|
||||
[Token(Token = "0x6009B5A")]
|
||||
[Address(RVA = "0x414E70", Offset = "0x413E70", VA = "0x180414E70", Slot = "4")]
|
||||
public bool Match(object obj)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009B5A)
|
||||
|
||||
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: 0x06009B5B RID: 39771 RVA: 0x001FCC30 File Offset: 0x001FAE30
|
||||
[Token(Token = "0x6009B5B")]
|
||||
[Address(RVA = "0x414A40", Offset = "0x413A40", VA = "0x180414A40", 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: 0x170018C2 RID: 6338
|
||||
// (get) Token: 0x06009B5C RID: 39772 RVA: 0x001FCCDC File Offset: 0x001FAEDC
|
||||
// (set) Token: 0x06009B5D RID: 39773 RVA: 0x001FCCF0 File Offset: 0x001FAEF0
|
||||
[Token(Token = "0x170018C2")]
|
||||
public IX509AttributeCertificate AttributeCert
|
||||
{
|
||||
[Token(Token = "0x6009B5C")]
|
||||
[Address(RVA = "0x411530", Offset = "0x410530", VA = "0x180411530")]
|
||||
get
|
||||
{
|
||||
return this.attributeCert;
|
||||
}
|
||||
[Token(Token = "0x6009B5D")]
|
||||
[Address(RVA = "0x415800", Offset = "0x414800", VA = "0x180415800")]
|
||||
set
|
||||
{
|
||||
this.attributeCert = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018C3 RID: 6339
|
||||
// (get) Token: 0x06009B5E RID: 39774 RVA: 0x001FCD04 File Offset: 0x001FAF04
|
||||
// (set) Token: 0x06009B5F RID: 39775 RVA: 0x001FCD18 File Offset: 0x001FAF18
|
||||
[Token(Token = "0x170018C3")]
|
||||
[Obsolete]
|
||||
public DateTimeObject AttribueCertificateValid
|
||||
{
|
||||
[Token(Token = "0x6009B5E")]
|
||||
[Address(RVA = "0x4157B0", Offset = "0x4147B0", VA = "0x1804157B0")]
|
||||
get
|
||||
{
|
||||
return this.attributeCertificateValid;
|
||||
}
|
||||
[Token(Token = "0x6009B5F")]
|
||||
[Address(RVA = "0x4157F0", Offset = "0x4147F0", VA = "0x1804157F0")]
|
||||
set
|
||||
{
|
||||
this.attributeCertificateValid = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018C4 RID: 6340
|
||||
// (get) Token: 0x06009B60 RID: 39776 RVA: 0x001FCD2C File Offset: 0x001FAF2C
|
||||
// (set) Token: 0x06009B61 RID: 39777 RVA: 0x001FCD40 File Offset: 0x001FAF40
|
||||
[Token(Token = "0x170018C4")]
|
||||
public DateTimeObject AttributeCertificateValid
|
||||
{
|
||||
[Token(Token = "0x6009B60")]
|
||||
[Address(RVA = "0x4157B0", Offset = "0x4147B0", VA = "0x1804157B0")]
|
||||
get
|
||||
{
|
||||
return this.attributeCertificateValid;
|
||||
}
|
||||
[Token(Token = "0x6009B61")]
|
||||
[Address(RVA = "0x4157F0", Offset = "0x4147F0", VA = "0x1804157F0")]
|
||||
set
|
||||
{
|
||||
this.attributeCertificateValid = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018C5 RID: 6341
|
||||
// (get) Token: 0x06009B62 RID: 39778 RVA: 0x001FCD54 File Offset: 0x001FAF54
|
||||
// (set) Token: 0x06009B63 RID: 39779 RVA: 0x001FCD68 File Offset: 0x001FAF68
|
||||
[Token(Token = "0x170018C5")]
|
||||
public AttributeCertificateHolder Holder
|
||||
{
|
||||
[Token(Token = "0x6009B62")]
|
||||
[Address(RVA = "0x4157C0", Offset = "0x4147C0", VA = "0x1804157C0")]
|
||||
get
|
||||
{
|
||||
return this.holder;
|
||||
}
|
||||
[Token(Token = "0x6009B63")]
|
||||
[Address(RVA = "0x415810", Offset = "0x414810", VA = "0x180415810")]
|
||||
set
|
||||
{
|
||||
this.holder = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018C6 RID: 6342
|
||||
// (get) Token: 0x06009B64 RID: 39780 RVA: 0x001FCD7C File Offset: 0x001FAF7C
|
||||
// (set) Token: 0x06009B65 RID: 39781 RVA: 0x001FCD90 File Offset: 0x001FAF90
|
||||
[Token(Token = "0x170018C6")]
|
||||
public AttributeCertificateIssuer Issuer
|
||||
{
|
||||
[Token(Token = "0x6009B64")]
|
||||
[Address(RVA = "0x4157D0", Offset = "0x4147D0", VA = "0x1804157D0")]
|
||||
get
|
||||
{
|
||||
return this.issuer;
|
||||
}
|
||||
[Token(Token = "0x6009B65")]
|
||||
[Address(RVA = "0x415820", Offset = "0x414820", VA = "0x180415820")]
|
||||
set
|
||||
{
|
||||
this.issuer = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018C7 RID: 6343
|
||||
// (get) Token: 0x06009B66 RID: 39782 RVA: 0x001FCDA4 File Offset: 0x001FAFA4
|
||||
// (set) Token: 0x06009B67 RID: 39783 RVA: 0x001FCDB8 File Offset: 0x001FAFB8
|
||||
[Token(Token = "0x170018C7")]
|
||||
public BigInteger SerialNumber
|
||||
{
|
||||
[Token(Token = "0x6009B66")]
|
||||
[Address(RVA = "0x4157E0", Offset = "0x4147E0", VA = "0x1804157E0")]
|
||||
get
|
||||
{
|
||||
return this.serialNumber;
|
||||
}
|
||||
[Token(Token = "0x6009B67")]
|
||||
[Address(RVA = "0x415830", Offset = "0x414830", VA = "0x180415830")]
|
||||
set
|
||||
{
|
||||
this.serialNumber = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009B68 RID: 39784 RVA: 0x001FCDCC File Offset: 0x001FAFCC
|
||||
[Token(Token = "0x6009B68")]
|
||||
[Address(RVA = "0x4149E0", Offset = "0x4139E0", VA = "0x1804149E0")]
|
||||
public void AddTargetName(GeneralName name)
|
||||
{
|
||||
ISet set = this.targetNames;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009B69 RID: 39785 RVA: 0x001FCDE8 File Offset: 0x001FAFE8
|
||||
[Token(Token = "0x6009B69")]
|
||||
[Address(RVA = "0x414970", Offset = "0x413970", VA = "0x180414970")]
|
||||
public void AddTargetName(byte[] name)
|
||||
{
|
||||
GeneralName instance = GeneralName.GetInstance(Asn1Object.FromByteArray(name));
|
||||
ISet set = this.targetNames;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009B6A RID: 39786 RVA: 0x001FCE10 File Offset: 0x001FB010
|
||||
[Token(Token = "0x6009B6A")]
|
||||
[Address(RVA = "0x415600", Offset = "0x414600", VA = "0x180415600")]
|
||||
public void SetTargetNames(IEnumerable names)
|
||||
{
|
||||
ISet set = this.ExtractGeneralNames(names);
|
||||
this.targetNames = set;
|
||||
}
|
||||
|
||||
// Token: 0x06009B6B RID: 39787 RVA: 0x001FCE2C File Offset: 0x001FB02C
|
||||
[Token(Token = "0x6009B6B")]
|
||||
[Address(RVA = "0x414E10", Offset = "0x413E10", VA = "0x180414E10")]
|
||||
public IEnumerable GetTargetNames()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009B6B)
|
||||
|
||||
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: 0x06009B6C RID: 39788 RVA: 0x001FCE44 File Offset: 0x001FB044
|
||||
[Token(Token = "0x6009B6C")]
|
||||
[Address(RVA = "0x414910", Offset = "0x413910", VA = "0x180414910")]
|
||||
public void AddTargetGroup(GeneralName group)
|
||||
{
|
||||
ISet set = this.targetGroups;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009B6D RID: 39789 RVA: 0x001FCE60 File Offset: 0x001FB060
|
||||
[Token(Token = "0x6009B6D")]
|
||||
[Address(RVA = "0x4148A0", Offset = "0x4138A0", VA = "0x1804148A0")]
|
||||
public void AddTargetGroup(byte[] name)
|
||||
{
|
||||
GeneralName instance = GeneralName.GetInstance(Asn1Object.FromByteArray(name));
|
||||
ISet set = this.targetGroups;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009B6E RID: 39790 RVA: 0x001FCE88 File Offset: 0x001FB088
|
||||
[Token(Token = "0x6009B6E")]
|
||||
[Address(RVA = "0x4155E0", Offset = "0x4145E0", VA = "0x1804155E0")]
|
||||
public void SetTargetGroups(IEnumerable names)
|
||||
{
|
||||
ISet set = this.ExtractGeneralNames(names);
|
||||
this.targetGroups = set;
|
||||
}
|
||||
|
||||
// Token: 0x06009B6F RID: 39791 RVA: 0x001FCEA4 File Offset: 0x001FB0A4
|
||||
[Token(Token = "0x6009B6F")]
|
||||
[Address(RVA = "0x414DB0", Offset = "0x413DB0", VA = "0x180414DB0")]
|
||||
public IEnumerable GetTargetGroups()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009B6F)
|
||||
|
||||
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: 0x06009B70 RID: 39792 RVA: 0x001FCEBC File Offset: 0x001FB0BC
|
||||
[Token(Token = "0x6009B70")]
|
||||
[Address(RVA = "0x414B80", Offset = "0x413B80", VA = "0x180414B80")]
|
||||
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 (num == 0 || num != 0)
|
||||
{
|
||||
}
|
||||
Asn1Object asn1Object;
|
||||
if (GeneralName.GetInstance(asn1Object) != 0)
|
||||
{
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x04006877 RID: 26743
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006877")]
|
||||
private IX509AttributeCertificate attributeCert;
|
||||
|
||||
// Token: 0x04006878 RID: 26744
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006878")]
|
||||
private DateTimeObject attributeCertificateValid;
|
||||
|
||||
// Token: 0x04006879 RID: 26745
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4006879")]
|
||||
private AttributeCertificateHolder holder;
|
||||
|
||||
// Token: 0x0400687A RID: 26746
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x400687A")]
|
||||
private AttributeCertificateIssuer issuer;
|
||||
|
||||
// Token: 0x0400687B RID: 26747
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x400687B")]
|
||||
private BigInteger serialNumber;
|
||||
|
||||
// Token: 0x0400687C RID: 26748
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x400687C")]
|
||||
private ISet targetNames;
|
||||
|
||||
// Token: 0x0400687D RID: 26749
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x400687D")]
|
||||
private ISet targetGroups;
|
||||
}
|
||||
}
|
||||
+177
@@ -0,0 +1,177 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x020019F6 RID: 6646
|
||||
[Token(Token = "0x20019F6")]
|
||||
public class X509CertPairStoreSelector : IX509Selector, ICloneable
|
||||
{
|
||||
// Token: 0x06009B71 RID: 39793 RVA: 0x001FCF10 File Offset: 0x001FB110
|
||||
[Token(Token = "0x6009B71")]
|
||||
[Address(RVA = "0x4162F0", Offset = "0x4152F0", VA = "0x1804162F0")]
|
||||
private static X509CertStoreSelector CloneSelector(X509CertStoreSelector s)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009B71)
|
||||
|
||||
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: 0x06009B72 RID: 39794 RVA: 0x001FCF34 File Offset: 0x001FB134
|
||||
[Token(Token = "0x6009B72")]
|
||||
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
||||
public X509CertPairStoreSelector()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009B73 RID: 39795 RVA: 0x001FCF48 File Offset: 0x001FB148
|
||||
[Token(Token = "0x6009B73")]
|
||||
[Address(RVA = "0x416540", Offset = "0x415540", VA = "0x180416540")]
|
||||
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: 0x170018C8 RID: 6344
|
||||
// (get) Token: 0x06009B74 RID: 39796 RVA: 0x001FCF98 File Offset: 0x001FB198
|
||||
// (set) Token: 0x06009B75 RID: 39797 RVA: 0x001FCFAC File Offset: 0x001FB1AC
|
||||
[Token(Token = "0x170018C8")]
|
||||
public X509CertificatePair CertPair
|
||||
{
|
||||
[Token(Token = "0x6009B74")]
|
||||
[Address(RVA = "0x411530", Offset = "0x410530", VA = "0x180411530")]
|
||||
get
|
||||
{
|
||||
return this.certPair;
|
||||
}
|
||||
[Token(Token = "0x6009B75")]
|
||||
[Address(RVA = "0x415800", Offset = "0x414800", VA = "0x180415800")]
|
||||
set
|
||||
{
|
||||
this.certPair = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018C9 RID: 6345
|
||||
// (get) Token: 0x06009B76 RID: 39798 RVA: 0x001FCFC0 File Offset: 0x001FB1C0
|
||||
// (set) Token: 0x06009B77 RID: 39799 RVA: 0x001FCFD8 File Offset: 0x001FB1D8
|
||||
[Token(Token = "0x170018C9")]
|
||||
public X509CertStoreSelector ForwardSelector
|
||||
{
|
||||
[Token(Token = "0x6009B76")]
|
||||
[Address(RVA = "0x4165A0", Offset = "0x4155A0", VA = "0x1804165A0")]
|
||||
get
|
||||
{
|
||||
return X509CertPairStoreSelector.CloneSelector(this.forwardSelector);
|
||||
}
|
||||
[Token(Token = "0x6009B77")]
|
||||
[Address(RVA = "0x4165C0", Offset = "0x4155C0", VA = "0x1804165C0")]
|
||||
set
|
||||
{
|
||||
X509CertStoreSelector x509CertStoreSelector = X509CertPairStoreSelector.CloneSelector(value);
|
||||
this.forwardSelector = x509CertStoreSelector;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018CA RID: 6346
|
||||
// (get) Token: 0x06009B78 RID: 39800 RVA: 0x001FCFF4 File Offset: 0x001FB1F4
|
||||
// (set) Token: 0x06009B79 RID: 39801 RVA: 0x001FD00C File Offset: 0x001FB20C
|
||||
[Token(Token = "0x170018CA")]
|
||||
public X509CertStoreSelector ReverseSelector
|
||||
{
|
||||
[Token(Token = "0x6009B78")]
|
||||
[Address(RVA = "0x4165B0", Offset = "0x4155B0", VA = "0x1804165B0")]
|
||||
get
|
||||
{
|
||||
return X509CertPairStoreSelector.CloneSelector(this.reverseSelector);
|
||||
}
|
||||
[Token(Token = "0x6009B79")]
|
||||
[Address(RVA = "0x4165E0", Offset = "0x4155E0", VA = "0x1804165E0")]
|
||||
set
|
||||
{
|
||||
X509CertStoreSelector x509CertStoreSelector = X509CertPairStoreSelector.CloneSelector(value);
|
||||
this.reverseSelector = x509CertStoreSelector;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009B7A RID: 39802 RVA: 0x001FD028 File Offset: 0x001FB228
|
||||
[Token(Token = "0x6009B7A")]
|
||||
[Address(RVA = "0x416410", Offset = "0x415410", VA = "0x180416410", Slot = "4")]
|
||||
public bool Match(object obj)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009B7A)
|
||||
|
||||
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: 0x06009B7B RID: 39803 RVA: 0x001FD080 File Offset: 0x001FB280
|
||||
[Token(Token = "0x6009B7B")]
|
||||
[Address(RVA = "0x416390", Offset = "0x415390", VA = "0x180416390", 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: 0x0400687E RID: 26750
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400687E")]
|
||||
private X509CertificatePair certPair;
|
||||
|
||||
// Token: 0x0400687F RID: 26751
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400687F")]
|
||||
private X509CertStoreSelector forwardSelector;
|
||||
|
||||
// Token: 0x04006880 RID: 26752
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4006880")]
|
||||
private X509CertStoreSelector reverseSelector;
|
||||
}
|
||||
}
|
||||
+766
@@ -0,0 +1,766 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
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: 0x020019F7 RID: 6647
|
||||
[Token(Token = "0x20019F7")]
|
||||
public class X509CertStoreSelector : IX509Selector, ICloneable
|
||||
{
|
||||
// Token: 0x06009B7C RID: 39804 RVA: 0x001FD0CC File Offset: 0x001FB2CC
|
||||
[Token(Token = "0x6009B7C")]
|
||||
[Address(RVA = "0x417570", Offset = "0x416570", VA = "0x180417570")]
|
||||
public X509CertStoreSelector()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009B7D RID: 39805 RVA: 0x001FD0F0 File Offset: 0x001FB2F0
|
||||
[Token(Token = "0x6009B7D")]
|
||||
[Address(RVA = "0x417390", Offset = "0x416390", VA = "0x180417390")]
|
||||
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: 0x06009B7E RID: 39806 RVA: 0x001FD230 File Offset: 0x001FB430
|
||||
[Token(Token = "0x6009B7E")]
|
||||
[Address(RVA = "0x416600", Offset = "0x415600", VA = "0x180416600", 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: 0x170018CB RID: 6347
|
||||
// (get) Token: 0x06009B7F RID: 39807 RVA: 0x001FD370 File Offset: 0x001FB570
|
||||
// (set) Token: 0x06009B80 RID: 39808 RVA: 0x001FD388 File Offset: 0x001FB588
|
||||
[Token(Token = "0x170018CB")]
|
||||
public byte[] AuthorityKeyIdentifier
|
||||
{
|
||||
[Token(Token = "0x6009B7F")]
|
||||
[Address(RVA = "0x417580", Offset = "0x416580", VA = "0x180417580")]
|
||||
get
|
||||
{
|
||||
return Arrays.Clone(this.authorityKeyIdentifier);
|
||||
}
|
||||
[Token(Token = "0x6009B80")]
|
||||
[Address(RVA = "0x4177E0", Offset = "0x4167E0", VA = "0x1804177E0")]
|
||||
set
|
||||
{
|
||||
byte[] array = Arrays.Clone(value);
|
||||
this.authorityKeyIdentifier = array;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018CC RID: 6348
|
||||
// (get) Token: 0x06009B81 RID: 39809 RVA: 0x001FD3A4 File Offset: 0x001FB5A4
|
||||
// (set) Token: 0x06009B82 RID: 39810 RVA: 0x001FD3B8 File Offset: 0x001FB5B8
|
||||
[Token(Token = "0x170018CC")]
|
||||
public int BasicConstraints
|
||||
{
|
||||
[Token(Token = "0x6009B81")]
|
||||
[Address(RVA = "0x411540", Offset = "0x410540", VA = "0x180411540")]
|
||||
get
|
||||
{
|
||||
return this.basicConstraints;
|
||||
}
|
||||
[Token(Token = "0x6009B82")]
|
||||
[Address(RVA = "0x417850", Offset = "0x416850", VA = "0x180417850")]
|
||||
set
|
||||
{
|
||||
this.basicConstraints = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018CD RID: 6349
|
||||
// (get) Token: 0x06009B83 RID: 39811 RVA: 0x001FD3DC File Offset: 0x001FB5DC
|
||||
// (set) Token: 0x06009B84 RID: 39812 RVA: 0x001FD3F0 File Offset: 0x001FB5F0
|
||||
[Token(Token = "0x170018CD")]
|
||||
public X509Certificate Certificate
|
||||
{
|
||||
[Token(Token = "0x6009B83")]
|
||||
[Address(RVA = "0x4157C0", Offset = "0x4147C0", VA = "0x1804157C0")]
|
||||
get
|
||||
{
|
||||
return this.certificate;
|
||||
}
|
||||
[Token(Token = "0x6009B84")]
|
||||
[Address(RVA = "0x415810", Offset = "0x414810", VA = "0x180415810")]
|
||||
set
|
||||
{
|
||||
this.certificate = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018CE RID: 6350
|
||||
// (get) Token: 0x06009B85 RID: 39813 RVA: 0x001FD404 File Offset: 0x001FB604
|
||||
// (set) Token: 0x06009B86 RID: 39814 RVA: 0x001FD418 File Offset: 0x001FB618
|
||||
[Token(Token = "0x170018CE")]
|
||||
public DateTimeObject CertificateValid
|
||||
{
|
||||
[Token(Token = "0x6009B85")]
|
||||
[Address(RVA = "0x4157D0", Offset = "0x4147D0", VA = "0x1804157D0")]
|
||||
get
|
||||
{
|
||||
return this.certificateValid;
|
||||
}
|
||||
[Token(Token = "0x6009B86")]
|
||||
[Address(RVA = "0x415820", Offset = "0x414820", VA = "0x180415820")]
|
||||
set
|
||||
{
|
||||
this.certificateValid = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018CF RID: 6351
|
||||
// (get) Token: 0x06009B87 RID: 39815 RVA: 0x001FD42C File Offset: 0x001FB62C
|
||||
// (set) Token: 0x06009B88 RID: 39816 RVA: 0x001FD44C File Offset: 0x001FB64C
|
||||
[Token(Token = "0x170018CF")]
|
||||
public ISet ExtendedKeyUsage
|
||||
{
|
||||
[Token(Token = "0x6009B87")]
|
||||
[Address(RVA = "0x4175E0", Offset = "0x4165E0", VA = "0x1804175E0")]
|
||||
get
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009B87)
|
||||
|
||||
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 = "0x6009B88")]
|
||||
[Address(RVA = "0x4178D0", Offset = "0x4168D0", VA = "0x1804178D0")]
|
||||
set
|
||||
{
|
||||
if (value == 0)
|
||||
{
|
||||
this.extendedKeyUsage = value;
|
||||
return;
|
||||
}
|
||||
HashSet hashSet = new HashSet(value);
|
||||
this.extendedKeyUsage = hashSet;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018D0 RID: 6352
|
||||
// (get) Token: 0x06009B89 RID: 39817 RVA: 0x001FD474 File Offset: 0x001FB674
|
||||
// (set) Token: 0x06009B8A RID: 39818 RVA: 0x001FD488 File Offset: 0x001FB688
|
||||
[Token(Token = "0x170018D0")]
|
||||
public bool IgnoreX509NameOrdering
|
||||
{
|
||||
[Token(Token = "0x6009B89")]
|
||||
[Address(RVA = "0x417650", Offset = "0x416650", VA = "0x180417650")]
|
||||
get
|
||||
{
|
||||
return this.ignoreX509NameOrdering;
|
||||
}
|
||||
[Token(Token = "0x6009B8A")]
|
||||
[Address(RVA = "0x417950", Offset = "0x416950", VA = "0x180417950")]
|
||||
set
|
||||
{
|
||||
this.ignoreX509NameOrdering = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018D1 RID: 6353
|
||||
// (get) Token: 0x06009B8B RID: 39819 RVA: 0x001FD49C File Offset: 0x001FB69C
|
||||
// (set) Token: 0x06009B8C RID: 39820 RVA: 0x001FD4B0 File Offset: 0x001FB6B0
|
||||
[Token(Token = "0x170018D1")]
|
||||
public X509Name Issuer
|
||||
{
|
||||
[Token(Token = "0x6009B8B")]
|
||||
[Address(RVA = "0x417680", Offset = "0x416680", VA = "0x180417680")]
|
||||
get
|
||||
{
|
||||
return this.issuer;
|
||||
}
|
||||
[Token(Token = "0x6009B8C")]
|
||||
[Address(RVA = "0x417960", Offset = "0x416960", VA = "0x180417960")]
|
||||
set
|
||||
{
|
||||
this.issuer = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018D2 RID: 6354
|
||||
// (get) Token: 0x06009B8D RID: 39821 RVA: 0x001FD4C4 File Offset: 0x001FB6C4
|
||||
[Token(Token = "0x170018D2")]
|
||||
[Obsolete]
|
||||
public string IssuerAsString
|
||||
{
|
||||
[Token(Token = "0x6009B8D")]
|
||||
[Address(RVA = "0x417660", Offset = "0x416660", VA = "0x180417660")]
|
||||
get
|
||||
{
|
||||
X509Name x509Name = this.issuer;
|
||||
if (x509Name != 0)
|
||||
{
|
||||
Asn1Object asn1Object = x509Name.ToAsn1Object();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018D3 RID: 6355
|
||||
// (get) Token: 0x06009B8E RID: 39822 RVA: 0x001FD4E4 File Offset: 0x001FB6E4
|
||||
// (set) Token: 0x06009B8F RID: 39823 RVA: 0x001FD4FC File Offset: 0x001FB6FC
|
||||
[Token(Token = "0x170018D3")]
|
||||
public bool[] KeyUsage
|
||||
{
|
||||
[Token(Token = "0x6009B8E")]
|
||||
[Address(RVA = "0x417690", Offset = "0x416690", VA = "0x180417690")]
|
||||
get
|
||||
{
|
||||
return X509CertStoreSelector.CopyBoolArray(this.keyUsage);
|
||||
}
|
||||
[Token(Token = "0x6009B8F")]
|
||||
[Address(RVA = "0x417970", Offset = "0x416970", VA = "0x180417970")]
|
||||
set
|
||||
{
|
||||
bool[] array = X509CertStoreSelector.CopyBoolArray(value);
|
||||
this.keyUsage = array;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018D4 RID: 6356
|
||||
// (get) Token: 0x06009B90 RID: 39824 RVA: 0x001FD518 File Offset: 0x001FB718
|
||||
// (set) Token: 0x06009B91 RID: 39825 RVA: 0x001FD538 File Offset: 0x001FB738
|
||||
[Token(Token = "0x170018D4")]
|
||||
public ISet Policy
|
||||
{
|
||||
[Token(Token = "0x6009B90")]
|
||||
[Address(RVA = "0x4176A0", Offset = "0x4166A0", VA = "0x1804176A0")]
|
||||
get
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009B90)
|
||||
|
||||
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 = "0x6009B91")]
|
||||
[Address(RVA = "0x417990", Offset = "0x416990", VA = "0x180417990")]
|
||||
set
|
||||
{
|
||||
if (value == 0)
|
||||
{
|
||||
this.policy = value;
|
||||
return;
|
||||
}
|
||||
HashSet hashSet = new HashSet(value);
|
||||
this.policy = hashSet;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018D5 RID: 6357
|
||||
// (get) Token: 0x06009B92 RID: 39826 RVA: 0x001FD560 File Offset: 0x001FB760
|
||||
// (set) Token: 0x06009B93 RID: 39827 RVA: 0x001FD574 File Offset: 0x001FB774
|
||||
[Token(Token = "0x170018D5")]
|
||||
public DateTimeObject PrivateKeyValid
|
||||
{
|
||||
[Token(Token = "0x6009B92")]
|
||||
[Address(RVA = "0x417710", Offset = "0x416710", VA = "0x180417710")]
|
||||
get
|
||||
{
|
||||
return this.privateKeyValid;
|
||||
}
|
||||
[Token(Token = "0x6009B93")]
|
||||
[Address(RVA = "0x417A10", Offset = "0x416A10", VA = "0x180417A10")]
|
||||
set
|
||||
{
|
||||
this.privateKeyValid = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018D6 RID: 6358
|
||||
// (get) Token: 0x06009B94 RID: 39828 RVA: 0x001FD588 File Offset: 0x001FB788
|
||||
// (set) Token: 0x06009B95 RID: 39829 RVA: 0x001FD59C File Offset: 0x001FB79C
|
||||
[Token(Token = "0x170018D6")]
|
||||
public BigInteger SerialNumber
|
||||
{
|
||||
[Token(Token = "0x6009B94")]
|
||||
[Address(RVA = "0x417720", Offset = "0x416720", VA = "0x180417720")]
|
||||
get
|
||||
{
|
||||
return this.serialNumber;
|
||||
}
|
||||
[Token(Token = "0x6009B95")]
|
||||
[Address(RVA = "0x417A20", Offset = "0x416A20", VA = "0x180417A20")]
|
||||
set
|
||||
{
|
||||
this.serialNumber = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018D7 RID: 6359
|
||||
// (get) Token: 0x06009B96 RID: 39830 RVA: 0x001FD5B0 File Offset: 0x001FB7B0
|
||||
// (set) Token: 0x06009B97 RID: 39831 RVA: 0x001FD5C4 File Offset: 0x001FB7C4
|
||||
[Token(Token = "0x170018D7")]
|
||||
public X509Name Subject
|
||||
{
|
||||
[Token(Token = "0x6009B96")]
|
||||
[Address(RVA = "0x4177D0", Offset = "0x4167D0", VA = "0x1804177D0")]
|
||||
get
|
||||
{
|
||||
return this.subject;
|
||||
}
|
||||
[Token(Token = "0x6009B97")]
|
||||
[Address(RVA = "0x417AC0", Offset = "0x416AC0", VA = "0x180417AC0")]
|
||||
set
|
||||
{
|
||||
this.subject = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018D8 RID: 6360
|
||||
// (get) Token: 0x06009B98 RID: 39832 RVA: 0x001FD5D8 File Offset: 0x001FB7D8
|
||||
[Token(Token = "0x170018D8")]
|
||||
[Obsolete]
|
||||
public string SubjectAsString
|
||||
{
|
||||
[Token(Token = "0x6009B98")]
|
||||
[Address(RVA = "0x417730", Offset = "0x416730", VA = "0x180417730")]
|
||||
get
|
||||
{
|
||||
X509Name x509Name = this.subject;
|
||||
if (x509Name != 0)
|
||||
{
|
||||
Asn1Object asn1Object = x509Name.ToAsn1Object();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018D9 RID: 6361
|
||||
// (get) Token: 0x06009B99 RID: 39833 RVA: 0x001FD5F8 File Offset: 0x001FB7F8
|
||||
// (set) Token: 0x06009B9A RID: 39834 RVA: 0x001FD610 File Offset: 0x001FB810
|
||||
[Token(Token = "0x170018D9")]
|
||||
public byte[] SubjectKeyIdentifier
|
||||
{
|
||||
[Token(Token = "0x6009B99")]
|
||||
[Address(RVA = "0x417750", Offset = "0x416750", VA = "0x180417750")]
|
||||
get
|
||||
{
|
||||
return Arrays.Clone(this.subjectKeyIdentifier);
|
||||
}
|
||||
[Token(Token = "0x6009B9A")]
|
||||
[Address(RVA = "0x417A30", Offset = "0x416A30", VA = "0x180417A30")]
|
||||
set
|
||||
{
|
||||
byte[] array = Arrays.Clone(value);
|
||||
this.subjectKeyIdentifier = array;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018DA RID: 6362
|
||||
// (get) Token: 0x06009B9B RID: 39835 RVA: 0x001FD62C File Offset: 0x001FB82C
|
||||
// (set) Token: 0x06009B9C RID: 39836 RVA: 0x001FD640 File Offset: 0x001FB840
|
||||
[Token(Token = "0x170018DA")]
|
||||
public SubjectPublicKeyInfo SubjectPublicKey
|
||||
{
|
||||
[Token(Token = "0x6009B9B")]
|
||||
[Address(RVA = "0x4177C0", Offset = "0x4167C0", VA = "0x1804177C0")]
|
||||
get
|
||||
{
|
||||
return this.subjectPublicKey;
|
||||
}
|
||||
[Token(Token = "0x6009B9C")]
|
||||
[Address(RVA = "0x417AB0", Offset = "0x416AB0", VA = "0x180417AB0")]
|
||||
set
|
||||
{
|
||||
this.subjectPublicKey = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018DB RID: 6363
|
||||
// (get) Token: 0x06009B9D RID: 39837 RVA: 0x001FD654 File Offset: 0x001FB854
|
||||
// (set) Token: 0x06009B9E RID: 39838 RVA: 0x001FD668 File Offset: 0x001FB868
|
||||
[Token(Token = "0x170018DB")]
|
||||
public DerObjectIdentifier SubjectPublicKeyAlgID
|
||||
{
|
||||
[Token(Token = "0x6009B9D")]
|
||||
[Address(RVA = "0x4177B0", Offset = "0x4167B0", VA = "0x1804177B0")]
|
||||
get
|
||||
{
|
||||
return this.subjectPublicKeyAlgID;
|
||||
}
|
||||
[Token(Token = "0x6009B9E")]
|
||||
[Address(RVA = "0x417AA0", Offset = "0x416AA0", VA = "0x180417AA0")]
|
||||
set
|
||||
{
|
||||
this.subjectPublicKeyAlgID = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009B9F RID: 39839 RVA: 0x001FD67C File Offset: 0x001FB87C
|
||||
[Token(Token = "0x6009B9F")]
|
||||
[Address(RVA = "0x416A30", Offset = "0x415A30", VA = "0x180416A30", 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;
|
||||
if (num != -1)
|
||||
{
|
||||
if (typeof(IDisposable).TypeHandle == (ulong)735L)
|
||||
{
|
||||
}
|
||||
if (typeof(IDisposable).TypeHandle == (ulong)227L)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
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_EF;
|
||||
}
|
||||
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 (-1 == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
goto IL_2D;
|
||||
}
|
||||
while ((ulong)1L == 0UL)
|
||||
{
|
||||
}
|
||||
IL_EF:
|
||||
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: 0x06009BA0 RID: 39840 RVA: 0x001FD7FC File Offset: 0x001FB9FC
|
||||
[Token(Token = "0x6009BA0")]
|
||||
[Address(RVA = "0x416930", Offset = "0x415930", VA = "0x180416930")]
|
||||
internal static bool IssuersMatch(X509Name a, X509Name b)
|
||||
{
|
||||
if (a == 0)
|
||||
{
|
||||
return b == 0;
|
||||
}
|
||||
return a.Equivalent(b, true);
|
||||
}
|
||||
|
||||
// Token: 0x06009BA1 RID: 39841 RVA: 0x001FD81C File Offset: 0x001FBA1C
|
||||
[Token(Token = "0x6009BA1")]
|
||||
[Address(RVA = "0x416810", Offset = "0x415810", VA = "0x180416810")]
|
||||
private static bool[] CopyBoolArray(bool[] b)
|
||||
{
|
||||
while (b != 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009BA2 RID: 39842 RVA: 0x001FD830 File Offset: 0x001FBA30
|
||||
[Token(Token = "0x6009BA2")]
|
||||
[Address(RVA = "0x416890", Offset = "0x415890", VA = "0x180416890")]
|
||||
private static ISet CopySet(ISet s)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009BA2)
|
||||
|
||||
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: 0x06009BA3 RID: 39843 RVA: 0x001FD84C File Offset: 0x001FBA4C
|
||||
[Token(Token = "0x6009BA3")]
|
||||
[Address(RVA = "0x416900", Offset = "0x415900", VA = "0x180416900")]
|
||||
private static SubjectPublicKeyInfo GetSubjectPublicKey(X509Certificate c)
|
||||
{
|
||||
SubjectPublicKeyInfo subjectPublicKeyInfo;
|
||||
return subjectPublicKeyInfo;
|
||||
}
|
||||
|
||||
// Token: 0x06009BA4 RID: 39844 RVA: 0x001FD860 File Offset: 0x001FBA60
|
||||
[Token(Token = "0x6009BA4")]
|
||||
[Address(RVA = "0x416950", Offset = "0x415950", VA = "0x180416950")]
|
||||
private static bool MatchExtension(byte[] b, X509Certificate c, DerObjectIdentifier oid)
|
||||
{
|
||||
bool flag;
|
||||
return b == 0 || c.GetCriticalExtensionOids() == 0 || flag;
|
||||
}
|
||||
|
||||
// Token: 0x04006881 RID: 26753
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006881")]
|
||||
private byte[] authorityKeyIdentifier;
|
||||
|
||||
// Token: 0x04006882 RID: 26754
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006882")]
|
||||
private int basicConstraints = (int)((ulong)4294967295L);
|
||||
|
||||
// Token: 0x04006883 RID: 26755
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4006883")]
|
||||
private X509Certificate certificate;
|
||||
|
||||
// Token: 0x04006884 RID: 26756
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4006884")]
|
||||
private DateTimeObject certificateValid;
|
||||
|
||||
// Token: 0x04006885 RID: 26757
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4006885")]
|
||||
private ISet extendedKeyUsage;
|
||||
|
||||
// Token: 0x04006886 RID: 26758
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4006886")]
|
||||
private bool ignoreX509NameOrdering;
|
||||
|
||||
// Token: 0x04006887 RID: 26759
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4006887")]
|
||||
private X509Name issuer;
|
||||
|
||||
// Token: 0x04006888 RID: 26760
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x4006888")]
|
||||
private bool[] keyUsage;
|
||||
|
||||
// Token: 0x04006889 RID: 26761
|
||||
[FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x4006889")]
|
||||
private ISet policy;
|
||||
|
||||
// Token: 0x0400688A RID: 26762
|
||||
[FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x400688A")]
|
||||
private DateTimeObject privateKeyValid;
|
||||
|
||||
// Token: 0x0400688B RID: 26763
|
||||
[FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x400688B")]
|
||||
private BigInteger serialNumber;
|
||||
|
||||
// Token: 0x0400688C RID: 26764
|
||||
[FieldOffset(Offset = "0x68")]
|
||||
[Token(Token = "0x400688C")]
|
||||
private X509Name subject;
|
||||
|
||||
// Token: 0x0400688D RID: 26765
|
||||
[FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x400688D")]
|
||||
private byte[] subjectKeyIdentifier;
|
||||
|
||||
// Token: 0x0400688E RID: 26766
|
||||
[FieldOffset(Offset = "0x78")]
|
||||
[Token(Token = "0x400688E")]
|
||||
private SubjectPublicKeyInfo subjectPublicKey;
|
||||
|
||||
// Token: 0x0400688F RID: 26767
|
||||
[FieldOffset(Offset = "0x80")]
|
||||
[Token(Token = "0x400688F")]
|
||||
private DerObjectIdentifier subjectPublicKeyAlgID;
|
||||
}
|
||||
}
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x020019F8 RID: 6648
|
||||
[Token(Token = "0x20019F8")]
|
||||
internal class X509CollectionStore : IX509Store
|
||||
{
|
||||
// Token: 0x06009BA5 RID: 39845 RVA: 0x001FD884 File Offset: 0x001FBA84
|
||||
[Token(Token = "0x6009BA5")]
|
||||
[Address(RVA = "0x41B0E0", Offset = "0x41A0E0", VA = "0x18041B0E0")]
|
||||
internal X509CollectionStore(ICollection collection)
|
||||
{
|
||||
IList list = Platform.CreateArrayList(collection);
|
||||
this._local = list;
|
||||
}
|
||||
|
||||
// Token: 0x06009BA6 RID: 39846 RVA: 0x001FD8A8 File Offset: 0x001FBAA8
|
||||
[Token(Token = "0x6009BA6")]
|
||||
[Address(RVA = "0x41AE60", Offset = "0x419E60", VA = "0x18041AE60", 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)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
IList list2 = Platform.CreateArrayList(this._local);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x04006890 RID: 26768
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006890")]
|
||||
private ICollection _local;
|
||||
}
|
||||
}
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Text;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x020019F9 RID: 6649
|
||||
[Token(Token = "0x20019F9")]
|
||||
public class X509CollectionStoreParameters : IX509StoreParameters
|
||||
{
|
||||
// Token: 0x06009BA7 RID: 39847 RVA: 0x001FD91C File Offset: 0x001FBB1C
|
||||
[Token(Token = "0x6009BA7")]
|
||||
[Address(RVA = "0x41ADB0", Offset = "0x419DB0", VA = "0x18041ADB0")]
|
||||
public X509CollectionStoreParameters(ICollection collection)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009BA7)
|
||||
|
||||
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: 0x06009BA8 RID: 39848 RVA: 0x001FD94C File Offset: 0x001FBB4C
|
||||
[Token(Token = "0x6009BA8")]
|
||||
[Address(RVA = "0x41AC90", Offset = "0x419C90", VA = "0x18041AC90")]
|
||||
public ICollection GetCollection()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009BA8)
|
||||
|
||||
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: 0x06009BA9 RID: 39849 RVA: 0x001FD964 File Offset: 0x001FBB64
|
||||
[Token(Token = "0x6009BA9")]
|
||||
[Address(RVA = "0x41ACF0", Offset = "0x419CF0", VA = "0x18041ACF0", 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: 0x04006891 RID: 26769
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006891")]
|
||||
private readonly IList collection;
|
||||
}
|
||||
}
|
||||
+471
@@ -0,0 +1,471 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
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: 0x020019FA RID: 6650
|
||||
[Token(Token = "0x20019FA")]
|
||||
public class X509CrlStoreSelector : IX509Selector, ICloneable
|
||||
{
|
||||
// Token: 0x06009BAA RID: 39850 RVA: 0x001FD9A0 File Offset: 0x001FBBA0
|
||||
[Token(Token = "0x6009BAA")]
|
||||
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
||||
public X509CrlStoreSelector()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009BAB RID: 39851 RVA: 0x001FD9B4 File Offset: 0x001FBBB4
|
||||
[Token(Token = "0x6009BAB")]
|
||||
[Address(RVA = "0x41CDD0", Offset = "0x41BDD0", VA = "0x18041CDD0")]
|
||||
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: 0x06009BAC RID: 39852 RVA: 0x001FDA80 File Offset: 0x001FBC80
|
||||
[Token(Token = "0x6009BAC")]
|
||||
[Address(RVA = "0x41C730", Offset = "0x41B730", VA = "0x18041C730", 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: 0x170018DC RID: 6364
|
||||
// (get) Token: 0x06009BAD RID: 39853 RVA: 0x001FDB4C File Offset: 0x001FBD4C
|
||||
// (set) Token: 0x06009BAE RID: 39854 RVA: 0x001FDB60 File Offset: 0x001FBD60
|
||||
[Token(Token = "0x170018DC")]
|
||||
public X509Certificate CertificateChecking
|
||||
{
|
||||
[Token(Token = "0x6009BAD")]
|
||||
[Address(RVA = "0x411530", Offset = "0x410530", VA = "0x180411530")]
|
||||
get
|
||||
{
|
||||
return this.certificateChecking;
|
||||
}
|
||||
[Token(Token = "0x6009BAE")]
|
||||
[Address(RVA = "0x415800", Offset = "0x414800", VA = "0x180415800")]
|
||||
set
|
||||
{
|
||||
this.certificateChecking = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018DD RID: 6365
|
||||
// (get) Token: 0x06009BAF RID: 39855 RVA: 0x001FDB74 File Offset: 0x001FBD74
|
||||
// (set) Token: 0x06009BB0 RID: 39856 RVA: 0x001FDB88 File Offset: 0x001FBD88
|
||||
[Token(Token = "0x170018DD")]
|
||||
public DateTimeObject DateAndTime
|
||||
{
|
||||
[Token(Token = "0x6009BAF")]
|
||||
[Address(RVA = "0x4157B0", Offset = "0x4147B0", VA = "0x1804157B0")]
|
||||
get
|
||||
{
|
||||
return this.dateAndTime;
|
||||
}
|
||||
[Token(Token = "0x6009BB0")]
|
||||
[Address(RVA = "0x4157F0", Offset = "0x4147F0", VA = "0x1804157F0")]
|
||||
set
|
||||
{
|
||||
this.dateAndTime = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018DE RID: 6366
|
||||
// (get) Token: 0x06009BB1 RID: 39857 RVA: 0x001FDB9C File Offset: 0x001FBD9C
|
||||
// (set) Token: 0x06009BB2 RID: 39858 RVA: 0x001FDBB4 File Offset: 0x001FBDB4
|
||||
[Token(Token = "0x170018DE")]
|
||||
public ICollection Issuers
|
||||
{
|
||||
[Token(Token = "0x6009BB1")]
|
||||
[Address(RVA = "0x41CF20", Offset = "0x41BF20", VA = "0x18041CF20")]
|
||||
get
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009BB1)
|
||||
|
||||
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 = "0x6009BB2")]
|
||||
[Address(RVA = "0x41D020", Offset = "0x41C020", VA = "0x18041D020")]
|
||||
set
|
||||
{
|
||||
IList list = Platform.CreateArrayList(value);
|
||||
this.issuers = list;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018DF RID: 6367
|
||||
// (get) Token: 0x06009BB3 RID: 39859 RVA: 0x001FDBD0 File Offset: 0x001FBDD0
|
||||
// (set) Token: 0x06009BB4 RID: 39860 RVA: 0x001FDBE4 File Offset: 0x001FBDE4
|
||||
[Token(Token = "0x170018DF")]
|
||||
public BigInteger MaxCrlNumber
|
||||
{
|
||||
[Token(Token = "0x6009BB3")]
|
||||
[Address(RVA = "0x4157D0", Offset = "0x4147D0", VA = "0x1804157D0")]
|
||||
get
|
||||
{
|
||||
return this.maxCrlNumber;
|
||||
}
|
||||
[Token(Token = "0x6009BB4")]
|
||||
[Address(RVA = "0x415820", Offset = "0x414820", VA = "0x180415820")]
|
||||
set
|
||||
{
|
||||
this.maxCrlNumber = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018E0 RID: 6368
|
||||
// (get) Token: 0x06009BB5 RID: 39861 RVA: 0x001FDBF8 File Offset: 0x001FBDF8
|
||||
// (set) Token: 0x06009BB6 RID: 39862 RVA: 0x001FDC0C File Offset: 0x001FBE0C
|
||||
[Token(Token = "0x170018E0")]
|
||||
public BigInteger MinCrlNumber
|
||||
{
|
||||
[Token(Token = "0x6009BB5")]
|
||||
[Address(RVA = "0x4157E0", Offset = "0x4147E0", VA = "0x1804157E0")]
|
||||
get
|
||||
{
|
||||
return this.minCrlNumber;
|
||||
}
|
||||
[Token(Token = "0x6009BB6")]
|
||||
[Address(RVA = "0x415830", Offset = "0x414830", VA = "0x180415830")]
|
||||
set
|
||||
{
|
||||
this.minCrlNumber = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018E1 RID: 6369
|
||||
// (get) Token: 0x06009BB7 RID: 39863 RVA: 0x001FDC20 File Offset: 0x001FBE20
|
||||
// (set) Token: 0x06009BB8 RID: 39864 RVA: 0x001FDC34 File Offset: 0x001FBE34
|
||||
[Token(Token = "0x170018E1")]
|
||||
public IX509AttributeCertificate AttrCertChecking
|
||||
{
|
||||
[Token(Token = "0x6009BB7")]
|
||||
[Address(RVA = "0x41CEF0", Offset = "0x41BEF0", VA = "0x18041CEF0")]
|
||||
get
|
||||
{
|
||||
return this.attrCertChecking;
|
||||
}
|
||||
[Token(Token = "0x6009BB8")]
|
||||
[Address(RVA = "0x41CFF0", Offset = "0x41BFF0", VA = "0x18041CFF0")]
|
||||
set
|
||||
{
|
||||
this.attrCertChecking = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018E2 RID: 6370
|
||||
// (get) Token: 0x06009BB9 RID: 39865 RVA: 0x001FDC48 File Offset: 0x001FBE48
|
||||
// (set) Token: 0x06009BBA RID: 39866 RVA: 0x001FDC5C File Offset: 0x001FBE5C
|
||||
[Token(Token = "0x170018E2")]
|
||||
public bool CompleteCrlEnabled
|
||||
{
|
||||
[Token(Token = "0x6009BB9")]
|
||||
[Address(RVA = "0x41CF00", Offset = "0x41BF00", VA = "0x18041CF00")]
|
||||
get
|
||||
{
|
||||
return this.completeCrlEnabled;
|
||||
}
|
||||
[Token(Token = "0x6009BBA")]
|
||||
[Address(RVA = "0x41D000", Offset = "0x41C000", VA = "0x18041D000")]
|
||||
set
|
||||
{
|
||||
this.completeCrlEnabled = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018E3 RID: 6371
|
||||
// (get) Token: 0x06009BBB RID: 39867 RVA: 0x001FDC70 File Offset: 0x001FBE70
|
||||
// (set) Token: 0x06009BBC RID: 39868 RVA: 0x001FDC84 File Offset: 0x001FBE84
|
||||
[Token(Token = "0x170018E3")]
|
||||
public bool DeltaCrlIndicatorEnabled
|
||||
{
|
||||
[Token(Token = "0x6009BBB")]
|
||||
[Address(RVA = "0x41CF10", Offset = "0x41BF10", VA = "0x18041CF10")]
|
||||
get
|
||||
{
|
||||
return this.deltaCrlIndicatorEnabled;
|
||||
}
|
||||
[Token(Token = "0x6009BBC")]
|
||||
[Address(RVA = "0x41D010", Offset = "0x41C010", VA = "0x18041D010")]
|
||||
set
|
||||
{
|
||||
this.deltaCrlIndicatorEnabled = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018E4 RID: 6372
|
||||
// (get) Token: 0x06009BBD RID: 39869 RVA: 0x001FDC98 File Offset: 0x001FBE98
|
||||
// (set) Token: 0x06009BBE RID: 39870 RVA: 0x001FDCB0 File Offset: 0x001FBEB0
|
||||
[Token(Token = "0x170018E4")]
|
||||
public byte[] IssuingDistributionPoint
|
||||
{
|
||||
[Token(Token = "0x6009BBD")]
|
||||
[Address(RVA = "0x41CF90", Offset = "0x41BF90", VA = "0x18041CF90")]
|
||||
get
|
||||
{
|
||||
return Arrays.Clone(this.issuingDistributionPoint);
|
||||
}
|
||||
[Token(Token = "0x6009BBE")]
|
||||
[Address(RVA = "0x41D0A0", Offset = "0x41C0A0", VA = "0x18041D0A0")]
|
||||
set
|
||||
{
|
||||
byte[] array = Arrays.Clone(value);
|
||||
this.issuingDistributionPoint = array;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018E5 RID: 6373
|
||||
// (get) Token: 0x06009BBF RID: 39871 RVA: 0x001FDCCC File Offset: 0x001FBECC
|
||||
// (set) Token: 0x06009BC0 RID: 39872 RVA: 0x001FDCE0 File Offset: 0x001FBEE0
|
||||
[Token(Token = "0x170018E5")]
|
||||
public bool IssuingDistributionPointEnabled
|
||||
{
|
||||
[Token(Token = "0x6009BBF")]
|
||||
[Address(RVA = "0x41CF80", Offset = "0x41BF80", VA = "0x18041CF80")]
|
||||
get
|
||||
{
|
||||
return this.issuingDistributionPointEnabled;
|
||||
}
|
||||
[Token(Token = "0x6009BC0")]
|
||||
[Address(RVA = "0x41D090", Offset = "0x41C090", VA = "0x18041D090")]
|
||||
set
|
||||
{
|
||||
this.issuingDistributionPointEnabled = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018E6 RID: 6374
|
||||
// (get) Token: 0x06009BC1 RID: 39873 RVA: 0x001FDCF4 File Offset: 0x001FBEF4
|
||||
// (set) Token: 0x06009BC2 RID: 39874 RVA: 0x001FDD08 File Offset: 0x001FBF08
|
||||
[Token(Token = "0x170018E6")]
|
||||
public BigInteger MaxBaseCrlNumber
|
||||
{
|
||||
[Token(Token = "0x6009BC1")]
|
||||
[Address(RVA = "0x417710", Offset = "0x416710", VA = "0x180417710")]
|
||||
get
|
||||
{
|
||||
return this.maxBaseCrlNumber;
|
||||
}
|
||||
[Token(Token = "0x6009BC2")]
|
||||
[Address(RVA = "0x417A10", Offset = "0x416A10", VA = "0x180417A10")]
|
||||
set
|
||||
{
|
||||
this.maxBaseCrlNumber = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009BC3 RID: 39875 RVA: 0x001FDD1C File Offset: 0x001FBF1C
|
||||
[Token(Token = "0x6009BC3")]
|
||||
[Address(RVA = "0x41C880", Offset = "0x41B880", VA = "0x18041C880", Slot = "7")]
|
||||
public virtual bool Match(object obj)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
if (obj == 0 || obj == 0)
|
||||
{
|
||||
goto IL_3A;
|
||||
}
|
||||
if (this.dateAndTime != 0)
|
||||
{
|
||||
}
|
||||
if (this.issuers == num)
|
||||
{
|
||||
goto IL_3D;
|
||||
}
|
||||
ICollection collection = this.issuers;
|
||||
bool flag;
|
||||
while (!flag)
|
||||
{
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
if ((ulong)1L == 0UL)
|
||||
{
|
||||
}
|
||||
IL_3A:
|
||||
IL_3D:
|
||||
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_E7;
|
||||
}
|
||||
BigInteger positiveValue2 = instance.PositiveValue;
|
||||
BigInteger bigInteger3 = this.maxBaseCrlNumber;
|
||||
if (positiveValue2.CompareTo(bigInteger3) <= 0)
|
||||
{
|
||||
goto IL_E7;
|
||||
}
|
||||
}
|
||||
while (this.deltaCrlIndicatorEnabled)
|
||||
{
|
||||
}
|
||||
IL_E7:
|
||||
if (this.issuingDistributionPointEnabled)
|
||||
{
|
||||
bool flag2;
|
||||
if (this.issuingDistributionPoint != (ulong)0L)
|
||||
{
|
||||
DerObjectIdentifier subjectDirectoryAttributes3 = X509Extensions.SubjectDirectoryAttributes;
|
||||
if (flag2)
|
||||
{
|
||||
goto IL_10C;
|
||||
}
|
||||
}
|
||||
while (flag2)
|
||||
{
|
||||
}
|
||||
}
|
||||
IL_10C:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x04006892 RID: 26770
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006892")]
|
||||
private X509Certificate certificateChecking;
|
||||
|
||||
// Token: 0x04006893 RID: 26771
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006893")]
|
||||
private DateTimeObject dateAndTime;
|
||||
|
||||
// Token: 0x04006894 RID: 26772
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4006894")]
|
||||
private ICollection issuers;
|
||||
|
||||
// Token: 0x04006895 RID: 26773
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4006895")]
|
||||
private BigInteger maxCrlNumber;
|
||||
|
||||
// Token: 0x04006896 RID: 26774
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4006896")]
|
||||
private BigInteger minCrlNumber;
|
||||
|
||||
// Token: 0x04006897 RID: 26775
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4006897")]
|
||||
private IX509AttributeCertificate attrCertChecking;
|
||||
|
||||
// Token: 0x04006898 RID: 26776
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4006898")]
|
||||
private bool completeCrlEnabled;
|
||||
|
||||
// Token: 0x04006899 RID: 26777
|
||||
[FieldOffset(Offset = "0x41")]
|
||||
[Token(Token = "0x4006899")]
|
||||
private bool deltaCrlIndicatorEnabled;
|
||||
|
||||
// Token: 0x0400689A RID: 26778
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x400689A")]
|
||||
private byte[] issuingDistributionPoint;
|
||||
|
||||
// Token: 0x0400689B RID: 26779
|
||||
[FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x400689B")]
|
||||
private bool issuingDistributionPointEnabled;
|
||||
|
||||
// Token: 0x0400689C RID: 26780
|
||||
[FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x400689C")]
|
||||
private BigInteger maxBaseCrlNumber;
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x020019FB RID: 6651
|
||||
[Token(Token = "0x20019FB")]
|
||||
[Serializable]
|
||||
public class X509StoreException : Exception
|
||||
{
|
||||
// Token: 0x06009BC4 RID: 39876 RVA: 0x001FDE48 File Offset: 0x001FC048
|
||||
[Token(Token = "0x6009BC4")]
|
||||
[Address(RVA = "0x412430", Offset = "0x411430", VA = "0x180412430")]
|
||||
public X509StoreException()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009BC5 RID: 39877 RVA: 0x001FDE5C File Offset: 0x001FC05C
|
||||
[Token(Token = "0x6009BC5")]
|
||||
[Address(RVA = "0x412490", Offset = "0x411490", VA = "0x180412490")]
|
||||
public X509StoreException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009BC6 RID: 39878 RVA: 0x001FDE70 File Offset: 0x001FC070
|
||||
[Token(Token = "0x6009BC6")]
|
||||
[Address(RVA = "0x4123B0", Offset = "0x4113B0", VA = "0x1804123B0")]
|
||||
public X509StoreException(string message, Exception e)
|
||||
: base(message, e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x020019FC RID: 6652
|
||||
[Token(Token = "0x20019FC")]
|
||||
public sealed class X509StoreFactory
|
||||
{
|
||||
// Token: 0x06009BC7 RID: 39879 RVA: 0x001FDE88 File Offset: 0x001FC088
|
||||
[Token(Token = "0x6009BC7")]
|
||||
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
||||
private X509StoreFactory()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009BC8 RID: 39880 RVA: 0x001FDE9C File Offset: 0x001FC09C
|
||||
[Token(Token = "0x6009BC8")]
|
||||
[Address(RVA = "0x4200F0", Offset = "0x41F0F0", VA = "0x1804200F0")]
|
||||
public static IX509Store Create(string type, IX509StoreParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009BC8)
|
||||
|
||||
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: 0x06009BC9 RID: 39881 RVA: 0x001FDF7C File Offset: 0x001FC17C
|
||||
[Token(Token = "0x6009BC9")]
|
||||
[Address(RVA = "0x4204B0", Offset = "0x41F4B0", VA = "0x1804204B0")]
|
||||
private static void checkCorrectType(ICollection coll, Type t)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
bool flag;
|
||||
if (!flag)
|
||||
{
|
||||
goto IL_0F;
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
return;
|
||||
IL_0F:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
}
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
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: 0x020019DE RID: 6622
|
||||
[Token(Token = "0x20019DE")]
|
||||
public sealed class SubjectPublicKeyInfoFactory
|
||||
{
|
||||
// Token: 0x06009A62 RID: 39522 RVA: 0x001F89E8 File Offset: 0x001F6BE8
|
||||
[Token(Token = "0x6009A62")]
|
||||
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
||||
private SubjectPublicKeyInfoFactory()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009A63 RID: 39523 RVA: 0x001F89FC File Offset: 0x001F6BFC
|
||||
[Token(Token = "0x6009A63")]
|
||||
[Address(RVA = "0x412FF0", Offset = "0x411FF0", VA = "0x180412FF0")]
|
||||
public static SubjectPublicKeyInfo CreateSubjectPublicKeyInfo(AsymmetricKeyParameter publicKey)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009A63)
|
||||
|
||||
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: 0x06009A64 RID: 39524 RVA: 0x001F8C40 File Offset: 0x001F6E40
|
||||
[Token(Token = "0x6009A64")]
|
||||
[Address(RVA = "0x413D10", Offset = "0x412D10", VA = "0x180413D10")]
|
||||
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,210 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
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: 0x020019DF RID: 6623
|
||||
[Token(Token = "0x20019DF")]
|
||||
public class X509AttrCertParser
|
||||
{
|
||||
// Token: 0x06009A65 RID: 39525 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6009A65")]
|
||||
[Address(RVA = "0x414550", Offset = "0x413550", VA = "0x180414550")]
|
||||
private IX509AttributeCertificate ReadDerCertificate(Asn1InputStream dIn)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06009A66 RID: 39526 RVA: 0x001F8C84 File Offset: 0x001F6E84
|
||||
[Token(Token = "0x6009A66")]
|
||||
[Address(RVA = "0x413DE0", Offset = "0x412DE0", VA = "0x180413DE0")]
|
||||
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: 0x06009A67 RID: 39527 RVA: 0x001F8CF4 File Offset: 0x001F6EF4
|
||||
[Token(Token = "0x6009A67")]
|
||||
[Address(RVA = "0x414780", Offset = "0x413780", VA = "0x180414780")]
|
||||
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: 0x06009A68 RID: 39528 RVA: 0x001F8D24 File Offset: 0x001F6F24
|
||||
[Token(Token = "0x6009A68")]
|
||||
[Address(RVA = "0x414230", Offset = "0x413230", VA = "0x180414230")]
|
||||
public IX509AttributeCertificate ReadAttrCert(byte[] input)
|
||||
{
|
||||
int num;
|
||||
MemoryStream memoryStream = new MemoryStream(input, num != 0);
|
||||
num = 0;
|
||||
return this.ReadAttrCert(memoryStream);
|
||||
}
|
||||
|
||||
// Token: 0x06009A69 RID: 39529 RVA: 0x001F8D44 File Offset: 0x001F6F44
|
||||
[Token(Token = "0x6009A69")]
|
||||
[Address(RVA = "0x4142A0", Offset = "0x4132A0", VA = "0x1804142A0")]
|
||||
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: 0x06009A6A RID: 39530 RVA: 0x001F8D9C File Offset: 0x001F6F9C
|
||||
[Token(Token = "0x6009A6A")]
|
||||
[Address(RVA = "0x413F70", Offset = "0x412F70", VA = "0x180413F70")]
|
||||
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: 0x06009A6B RID: 39531 RVA: 0x001F8E8C File Offset: 0x001F708C
|
||||
[Token(Token = "0x6009A6B")]
|
||||
[Address(RVA = "0x414410", Offset = "0x413410", VA = "0x180414410")]
|
||||
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: 0x06009A6C RID: 39532 RVA: 0x001F8ECC File Offset: 0x001F70CC
|
||||
[Token(Token = "0x6009A6C")]
|
||||
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
||||
public X509AttrCertParser()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04006835 RID: 26677
|
||||
[Token(Token = "0x4006835")]
|
||||
private static readonly PemParser PemAttrCertParser = new PemParser("ATTRIBUTE CERTIFICATE");
|
||||
|
||||
// Token: 0x04006836 RID: 26678
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006836")]
|
||||
private Asn1Set sData;
|
||||
|
||||
// Token: 0x04006837 RID: 26679
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006837")]
|
||||
private int sDataObjectCount;
|
||||
|
||||
// Token: 0x04006838 RID: 26680
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4006838")]
|
||||
private Stream currentStream;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x020019E0 RID: 6624
|
||||
[Token(Token = "0x20019E0")]
|
||||
public class X509Attribute : Asn1Encodable
|
||||
{
|
||||
// Token: 0x06009A6E RID: 39534 RVA: 0x001F8EFC File Offset: 0x001F70FC
|
||||
[Token(Token = "0x6009A6E")]
|
||||
[Address(RVA = "0x415B10", Offset = "0x414B10", VA = "0x180415B10")]
|
||||
internal X509Attribute(Asn1Encodable at)
|
||||
{
|
||||
AttributeX509 instance = AttributeX509.GetInstance(at);
|
||||
this.attr = instance;
|
||||
}
|
||||
|
||||
// Token: 0x06009A6F RID: 39535 RVA: 0x001F8F20 File Offset: 0x001F7120
|
||||
[Token(Token = "0x6009A6F")]
|
||||
[Address(RVA = "0x415A50", Offset = "0x414A50", VA = "0x180415A50")]
|
||||
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: 0x06009A70 RID: 39536 RVA: 0x001F8F50 File Offset: 0x001F7150
|
||||
[Token(Token = "0x6009A70")]
|
||||
[Address(RVA = "0x415990", Offset = "0x414990", VA = "0x180415990")]
|
||||
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: 0x1700189D RID: 6301
|
||||
// (get) Token: 0x06009A71 RID: 39537 RVA: 0x001F8F80 File Offset: 0x001F7180
|
||||
[Token(Token = "0x1700189D")]
|
||||
public string Oid
|
||||
{
|
||||
[Token(Token = "0x6009A71")]
|
||||
[Address(RVA = "0x415B40", Offset = "0x414B40", VA = "0x180415B40")]
|
||||
get
|
||||
{
|
||||
return this.attr.attrType.identifier;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009A72 RID: 39538 RVA: 0x001F8FA4 File Offset: 0x001F71A4
|
||||
[Token(Token = "0x6009A72")]
|
||||
[Address(RVA = "0x415840", Offset = "0x414840", VA = "0x180415840")]
|
||||
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: 0x06009A73 RID: 39539 RVA: 0x001F8FEC File Offset: 0x001F71EC
|
||||
[Token(Token = "0x6009A73")]
|
||||
[Address(RVA = "0x415960", Offset = "0x414960", VA = "0x180415960", Slot = "5")]
|
||||
public override Asn1Object ToAsn1Object()
|
||||
{
|
||||
return this.attr.ToAsn1Object();
|
||||
}
|
||||
|
||||
// Token: 0x04006839 RID: 26681
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006839")]
|
||||
private readonly AttributeX509 attr;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
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: 0x020019E1 RID: 6625
|
||||
[Token(Token = "0x20019E1")]
|
||||
public class X509CertPairParser
|
||||
{
|
||||
// Token: 0x06009A74 RID: 39540 RVA: 0x001F900C File Offset: 0x001F720C
|
||||
[Token(Token = "0x6009A74")]
|
||||
[Address(RVA = "0x416180", Offset = "0x415180", VA = "0x180416180")]
|
||||
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: 0x06009A75 RID: 39541 RVA: 0x001F907C File Offset: 0x001F727C
|
||||
[Token(Token = "0x6009A75")]
|
||||
[Address(RVA = "0x415E60", Offset = "0x414E60", VA = "0x180415E60")]
|
||||
public X509CertificatePair ReadCertPair(byte[] input)
|
||||
{
|
||||
int num;
|
||||
MemoryStream memoryStream = new MemoryStream(input, num != 0);
|
||||
num = 0;
|
||||
return this.ReadCertPair(memoryStream);
|
||||
}
|
||||
|
||||
// Token: 0x06009A76 RID: 39542 RVA: 0x001F909C File Offset: 0x001F729C
|
||||
[Token(Token = "0x6009A76")]
|
||||
[Address(RVA = "0x416010", Offset = "0x415010", VA = "0x180416010")]
|
||||
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: 0x06009A77 RID: 39543 RVA: 0x001F90F4 File Offset: 0x001F72F4
|
||||
[Token(Token = "0x6009A77")]
|
||||
[Address(RVA = "0x415B70", Offset = "0x414B70", VA = "0x180415B70")]
|
||||
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: 0x06009A78 RID: 39544 RVA: 0x001F91C8 File Offset: 0x001F73C8
|
||||
[Token(Token = "0x6009A78")]
|
||||
[Address(RVA = "0x415ED0", Offset = "0x414ED0", VA = "0x180415ED0")]
|
||||
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: 0x06009A79 RID: 39545 RVA: 0x001F9208 File Offset: 0x001F7408
|
||||
[Token(Token = "0x6009A79")]
|
||||
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
||||
public X509CertPairParser()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0400683A RID: 26682
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400683A")]
|
||||
private Stream currentStream;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,719 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
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: 0x020019E2 RID: 6626
|
||||
[Token(Token = "0x20019E2")]
|
||||
public class X509Certificate : X509ExtensionBase
|
||||
{
|
||||
// Token: 0x06009A7A RID: 39546 RVA: 0x001F921C File Offset: 0x001F741C
|
||||
[Token(Token = "0x6009A7A")]
|
||||
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
||||
protected X509Certificate()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009A7B RID: 39547 RVA: 0x001F9230 File Offset: 0x001F7430
|
||||
[Token(Token = "0x6009A7B")]
|
||||
[Address(RVA = "0x41A730", Offset = "0x419730", VA = "0x18041A730")]
|
||||
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: 0x1700189E RID: 6302
|
||||
// (get) Token: 0x06009A7C RID: 39548 RVA: 0x001F9320 File Offset: 0x001F7520
|
||||
[Token(Token = "0x1700189E")]
|
||||
public virtual X509CertificateStructure CertificateStructure
|
||||
{
|
||||
[Token(Token = "0x6009A7C")]
|
||||
[Address(RVA = "0x411530", Offset = "0x410530", VA = "0x180411530", Slot = "13")]
|
||||
get
|
||||
{
|
||||
return this.c;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700189F RID: 6303
|
||||
// (get) Token: 0x06009A7D RID: 39549 RVA: 0x001F9334 File Offset: 0x001F7534
|
||||
[Token(Token = "0x1700189F")]
|
||||
public virtual bool IsValidNow
|
||||
{
|
||||
[Token(Token = "0x6009A7D")]
|
||||
[Address(RVA = "0x41AA10", Offset = "0x419A10", VA = "0x18041AA10", Slot = "14")]
|
||||
get
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009A7D)
|
||||
|
||||
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: 0x06009A7E RID: 39550 RVA: 0x001F9350 File Offset: 0x001F7550
|
||||
[Token(Token = "0x6009A7E")]
|
||||
[Address(RVA = "0x4199E0", Offset = "0x4189E0", VA = "0x1804199E0", Slot = "15")]
|
||||
public virtual bool IsValid(DateTime time)
|
||||
{
|
||||
X509Name subjectDN = this.SubjectDN;
|
||||
DateTime notBefore = this.NotBefore;
|
||||
int num;
|
||||
return num <= 0;
|
||||
}
|
||||
|
||||
// Token: 0x06009A7F RID: 39551 RVA: 0x001F9378 File Offset: 0x001F7578
|
||||
[Token(Token = "0x6009A7F")]
|
||||
[Address(RVA = "0x418CC0", Offset = "0x417CC0", VA = "0x180418CC0", Slot = "16")]
|
||||
public virtual void CheckValidity()
|
||||
{
|
||||
DateTime utcNow = DateTime.UtcNow;
|
||||
ISet criticalExtensionOids = ((IX509Extension)this).GetCriticalExtensionOids();
|
||||
}
|
||||
|
||||
// Token: 0x06009A80 RID: 39552 RVA: 0x001F9394 File Offset: 0x001F7594
|
||||
[Token(Token = "0x6009A80")]
|
||||
[Address(RVA = "0x418D30", Offset = "0x417D30", VA = "0x180418D30", Slot = "17")]
|
||||
public virtual void CheckValidity(DateTime time)
|
||||
{
|
||||
DateTime notBefore = this.NotBefore;
|
||||
X509Name subjectDN = this.SubjectDN;
|
||||
}
|
||||
|
||||
// Token: 0x170018A0 RID: 6304
|
||||
// (get) Token: 0x06009A81 RID: 39553 RVA: 0x001F93D0 File Offset: 0x001F75D0
|
||||
[Token(Token = "0x170018A0")]
|
||||
public virtual int Version
|
||||
{
|
||||
[Token(Token = "0x6009A81")]
|
||||
[Address(RVA = "0x41AC70", Offset = "0x419C70", VA = "0x18041AC70", Slot = "18")]
|
||||
get
|
||||
{
|
||||
return this.c.Version;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018A1 RID: 6305
|
||||
// (get) Token: 0x06009A82 RID: 39554 RVA: 0x001F93F0 File Offset: 0x001F75F0
|
||||
[Token(Token = "0x170018A1")]
|
||||
public virtual BigInteger SerialNumber
|
||||
{
|
||||
[Token(Token = "0x6009A82")]
|
||||
[Address(RVA = "0x41AB30", Offset = "0x419B30", VA = "0x18041AB30", Slot = "19")]
|
||||
get
|
||||
{
|
||||
return this.c.SerialNumber.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018A2 RID: 6306
|
||||
// (get) Token: 0x06009A83 RID: 39555 RVA: 0x001F9414 File Offset: 0x001F7614
|
||||
[Token(Token = "0x170018A2")]
|
||||
public virtual X509Name IssuerDN
|
||||
{
|
||||
[Token(Token = "0x6009A83")]
|
||||
[Address(RVA = "0x41AA80", Offset = "0x419A80", VA = "0x18041AA80", Slot = "20")]
|
||||
get
|
||||
{
|
||||
return this.c.Issuer;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018A3 RID: 6307
|
||||
// (get) Token: 0x06009A84 RID: 39556 RVA: 0x001F9434 File Offset: 0x001F7634
|
||||
[Token(Token = "0x170018A3")]
|
||||
public virtual X509Name SubjectDN
|
||||
{
|
||||
[Token(Token = "0x6009A84")]
|
||||
[Address(RVA = "0x41AC20", Offset = "0x419C20", VA = "0x18041AC20", Slot = "21")]
|
||||
get
|
||||
{
|
||||
return this.c.Subject;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018A4 RID: 6308
|
||||
// (get) Token: 0x06009A85 RID: 39557 RVA: 0x001F9454 File Offset: 0x001F7654
|
||||
[Token(Token = "0x170018A4")]
|
||||
public virtual DateTime NotBefore
|
||||
{
|
||||
[Token(Token = "0x6009A85")]
|
||||
[Address(RVA = "0x41AB00", Offset = "0x419B00", VA = "0x18041AB00", Slot = "22")]
|
||||
get
|
||||
{
|
||||
return this.c.StartDate.ToDateTime();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018A5 RID: 6309
|
||||
// (get) Token: 0x06009A86 RID: 39558 RVA: 0x001F9478 File Offset: 0x001F7678
|
||||
[Token(Token = "0x170018A5")]
|
||||
public virtual DateTime NotAfter
|
||||
{
|
||||
[Token(Token = "0x6009A86")]
|
||||
[Address(RVA = "0x41AAD0", Offset = "0x419AD0", VA = "0x18041AAD0", Slot = "23")]
|
||||
get
|
||||
{
|
||||
return this.c.EndDate.ToDateTime();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009A87 RID: 39559 RVA: 0x001F949C File Offset: 0x001F769C
|
||||
[Token(Token = "0x6009A87")]
|
||||
[Address(RVA = "0x419800", Offset = "0x418800", VA = "0x180419800", Slot = "24")]
|
||||
public virtual byte[] GetTbsCertificate()
|
||||
{
|
||||
return this.c.tbsCert.GetDerEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x06009A88 RID: 39560 RVA: 0x001F94C0 File Offset: 0x001F76C0
|
||||
[Token(Token = "0x6009A88")]
|
||||
[Address(RVA = "0x419790", Offset = "0x418790", VA = "0x180419790", Slot = "25")]
|
||||
public virtual byte[] GetSignature()
|
||||
{
|
||||
return this.c.GetSignatureOctets();
|
||||
}
|
||||
|
||||
// Token: 0x170018A6 RID: 6310
|
||||
// (get) Token: 0x06009A89 RID: 39561 RVA: 0x001F94E0 File Offset: 0x001F76E0
|
||||
[Token(Token = "0x170018A6")]
|
||||
public virtual string SigAlgName
|
||||
{
|
||||
[Token(Token = "0x6009A89")]
|
||||
[Address(RVA = "0x41AB60", Offset = "0x419B60", VA = "0x18041AB60", Slot = "26")]
|
||||
get
|
||||
{
|
||||
Asn1Object asn1Object = this.c.sigAlgID.ToAsn1Object();
|
||||
string text;
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018A7 RID: 6311
|
||||
// (get) Token: 0x06009A8A RID: 39562 RVA: 0x001F9508 File Offset: 0x001F7708
|
||||
[Token(Token = "0x170018A7")]
|
||||
public virtual string SigAlgOid
|
||||
{
|
||||
[Token(Token = "0x6009A8A")]
|
||||
[Address(RVA = "0x41ABE0", Offset = "0x419BE0", VA = "0x18041ABE0", Slot = "27")]
|
||||
get
|
||||
{
|
||||
Asn1Object asn1Object = this.c.sigAlgID.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009A8B RID: 39563 RVA: 0x001F952C File Offset: 0x001F772C
|
||||
[Token(Token = "0x6009A8B")]
|
||||
[Address(RVA = "0x419710", Offset = "0x418710", VA = "0x180419710", Slot = "28")]
|
||||
public virtual byte[] GetSigAlgParams()
|
||||
{
|
||||
if (this.c.sigAlgID.ObjectID == 0)
|
||||
{
|
||||
}
|
||||
return this.c.sigAlgID.ObjectID.GetDerEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x170018A8 RID: 6312
|
||||
// (get) Token: 0x06009A8C RID: 39564 RVA: 0x001F9568 File Offset: 0x001F7768
|
||||
[Token(Token = "0x170018A8")]
|
||||
public virtual DerBitString IssuerUniqueID
|
||||
{
|
||||
[Token(Token = "0x6009A8C")]
|
||||
[Address(RVA = "0x41AAA0", Offset = "0x419AA0", VA = "0x18041AAA0", Slot = "29")]
|
||||
get
|
||||
{
|
||||
return this.c.tbsCert.issuerUniqueID;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018A9 RID: 6313
|
||||
// (get) Token: 0x06009A8D RID: 39565 RVA: 0x001F958C File Offset: 0x001F778C
|
||||
[Token(Token = "0x170018A9")]
|
||||
public virtual DerBitString SubjectUniqueID
|
||||
{
|
||||
[Token(Token = "0x6009A8D")]
|
||||
[Address(RVA = "0x41AC40", Offset = "0x419C40", VA = "0x18041AC40", Slot = "30")]
|
||||
get
|
||||
{
|
||||
return this.c.tbsCert.subjectUniqueID;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009A8E RID: 39566 RVA: 0x001F95B0 File Offset: 0x001F77B0
|
||||
[Token(Token = "0x6009A8E")]
|
||||
[Address(RVA = "0x419660", Offset = "0x418660", VA = "0x180419660", Slot = "31")]
|
||||
public virtual bool[] GetKeyUsage()
|
||||
{
|
||||
while (this.keyUsage != 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009A8F RID: 39567 RVA: 0x001F95C8 File Offset: 0x001F77C8
|
||||
[Token(Token = "0x6009A8F")]
|
||||
[Address(RVA = "0x419210", Offset = "0x418210", VA = "0x180419210", 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 == 0)
|
||||
{
|
||||
return list;
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009A90 RID: 39568 RVA: 0x001F9658 File Offset: 0x001F7858
|
||||
[Token(Token = "0x6009A90")]
|
||||
[Address(RVA = "0x419170", Offset = "0x418170", VA = "0x180419170", 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: 0x06009A91 RID: 39569 RVA: 0x001F96A8 File Offset: 0x001F78A8
|
||||
[Token(Token = "0x6009A91")]
|
||||
[Address(RVA = "0x4197B0", Offset = "0x4187B0", VA = "0x1804197B0", Slot = "34")]
|
||||
public virtual ICollection GetSubjectAlternativeNames()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009A91)
|
||||
|
||||
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: 0x06009A92 RID: 39570 RVA: 0x001F96BC File Offset: 0x001F78BC
|
||||
[Token(Token = "0x6009A92")]
|
||||
[Address(RVA = "0x419610", Offset = "0x418610", VA = "0x180419610", Slot = "35")]
|
||||
public virtual ICollection GetIssuerAlternativeNames()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009A92)
|
||||
|
||||
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: 0x06009A93 RID: 39571 RVA: 0x001F96D0 File Offset: 0x001F78D0
|
||||
[Token(Token = "0x6009A93")]
|
||||
[Address(RVA = "0x418F60", Offset = "0x417F60", VA = "0x180418F60", 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: 0x06009A94 RID: 39572 RVA: 0x001F9750 File Offset: 0x001F7950
|
||||
[Token(Token = "0x6009A94")]
|
||||
[Address(RVA = "0x419830", Offset = "0x418830", VA = "0x180419830", Slot = "8")]
|
||||
protected override X509Extensions GetX509Extensions()
|
||||
{
|
||||
int version = this.c.Version;
|
||||
return this.c.tbsCert.extensions;
|
||||
}
|
||||
|
||||
// Token: 0x06009A95 RID: 39573 RVA: 0x001F9784 File Offset: 0x001F7984
|
||||
[Token(Token = "0x6009A95")]
|
||||
[Address(RVA = "0x4196E0", Offset = "0x4186E0", VA = "0x1804196E0", Slot = "37")]
|
||||
public virtual AsymmetricKeyParameter GetPublicKey()
|
||||
{
|
||||
return PublicKeyFactory.CreateKey(this.c.SubjectPublicKeyInfo);
|
||||
}
|
||||
|
||||
// Token: 0x06009A96 RID: 39574 RVA: 0x001F97A8 File Offset: 0x001F79A8
|
||||
[Token(Token = "0x6009A96")]
|
||||
[Address(RVA = "0x4191F0", Offset = "0x4181F0", VA = "0x1804191F0", Slot = "38")]
|
||||
public virtual byte[] GetEncoded()
|
||||
{
|
||||
return this.c.GetDerEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x06009A97 RID: 39575 RVA: 0x001F97C8 File Offset: 0x001F79C8
|
||||
[Token(Token = "0x6009A97")]
|
||||
[Address(RVA = "0x418EA0", Offset = "0x417EA0", VA = "0x180418EA0", Slot = "0")]
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj != this)
|
||||
{
|
||||
if (obj != 0 && obj != 0)
|
||||
{
|
||||
Asn1Object asn1Object = this.c.ToAsn1Object();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x06009A98 RID: 39576 RVA: 0x001F97F8 File Offset: 0x001F79F8
|
||||
[Token(Token = "0x6009A98")]
|
||||
[Address(RVA = "0x419560", Offset = "0x418560", VA = "0x180419560", 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 == 0)
|
||||
{
|
||||
return this.hashValue;
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009A99 RID: 39577 RVA: 0x001F9838 File Offset: 0x001F7A38
|
||||
[Token(Token = "0x6009A99")]
|
||||
[Address(RVA = "0x419A50", Offset = "0x418A50", VA = "0x180419A50", 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: 0x06009A9A RID: 39578 RVA: 0x001F9B64 File Offset: 0x001F7D64
|
||||
[Token(Token = "0x6009A9A")]
|
||||
[Address(RVA = "0x41A690", Offset = "0x419690", VA = "0x18041A690", Slot = "39")]
|
||||
public virtual void Verify(AsymmetricKeyParameter key)
|
||||
{
|
||||
Asn1VerifierFactory asn1VerifierFactory = new Asn1VerifierFactory(this.c.sigAlgID, key);
|
||||
ISet criticalExtensionOids = ((IX509Extension)this).GetCriticalExtensionOids();
|
||||
}
|
||||
|
||||
// Token: 0x06009A9B RID: 39579 RVA: 0x001F9B90 File Offset: 0x001F7D90
|
||||
[Token(Token = "0x6009A9B")]
|
||||
[Address(RVA = "0x41A610", Offset = "0x419610", VA = "0x18041A610", Slot = "40")]
|
||||
public virtual void Verify(IVerifierFactoryProvider verifierProvider)
|
||||
{
|
||||
X509CertificateStructure x509CertificateStructure = this.c;
|
||||
ISet criticalExtensionOids = ((IX509Extension)this).GetCriticalExtensionOids();
|
||||
}
|
||||
|
||||
// Token: 0x06009A9C RID: 39580 RVA: 0x001F9BB4 File Offset: 0x001F7DB4
|
||||
[Token(Token = "0x6009A9C")]
|
||||
[Address(RVA = "0x418940", Offset = "0x417940", VA = "0x180418940", Slot = "41")]
|
||||
protected virtual void CheckSignature(IVerifierFactory verifier)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009A9C)
|
||||
|
||||
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: 0x06009A9D RID: 39581 RVA: 0x001F9C78 File Offset: 0x001F7E78
|
||||
[Token(Token = "0x6009A9D")]
|
||||
[Address(RVA = "0x419880", Offset = "0x418880", VA = "0x180419880")]
|
||||
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: 0x0400683B RID: 26683
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400683B")]
|
||||
private readonly X509CertificateStructure c;
|
||||
|
||||
// Token: 0x0400683C RID: 26684
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400683C")]
|
||||
private readonly BasicConstraints basicConstraints;
|
||||
|
||||
// Token: 0x0400683D RID: 26685
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400683D")]
|
||||
private readonly bool[] keyUsage;
|
||||
|
||||
// Token: 0x0400683E RID: 26686
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x400683E")]
|
||||
private bool hashValueSet;
|
||||
|
||||
// Token: 0x0400683F RID: 26687
|
||||
[FieldOffset(Offset = "0x2C")]
|
||||
[Token(Token = "0x400683F")]
|
||||
private int hashValue;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
using System;
|
||||
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: 0x020019E3 RID: 6627
|
||||
[Token(Token = "0x20019E3")]
|
||||
public class X509CertificatePair
|
||||
{
|
||||
// Token: 0x06009A9E RID: 39582 RVA: 0x001F9CD0 File Offset: 0x001F7ED0
|
||||
[Token(Token = "0x6009A9E")]
|
||||
[Address(RVA = "0x417DD0", Offset = "0x416DD0", VA = "0x180417DD0")]
|
||||
public X509CertificatePair(X509Certificate forward, X509Certificate reverse)
|
||||
{
|
||||
this.forward = forward;
|
||||
this.reverse = reverse;
|
||||
}
|
||||
|
||||
// Token: 0x06009A9F RID: 39583 RVA: 0x001F9CF4 File Offset: 0x001F7EF4
|
||||
[Token(Token = "0x6009A9F")]
|
||||
[Address(RVA = "0x417E10", Offset = "0x416E10", VA = "0x180417E10")]
|
||||
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: 0x06009AA0 RID: 39584 RVA: 0x001F9D40 File Offset: 0x001F7F40
|
||||
[Token(Token = "0x6009AA0")]
|
||||
[Address(RVA = "0x417BA0", Offset = "0x416BA0", VA = "0x180417BA0")]
|
||||
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: 0x170018AA RID: 6314
|
||||
// (get) Token: 0x06009AA1 RID: 39585 RVA: 0x001F9DC0 File Offset: 0x001F7FC0
|
||||
[Token(Token = "0x170018AA")]
|
||||
public X509Certificate Forward
|
||||
{
|
||||
[Token(Token = "0x6009AA1")]
|
||||
[Address(RVA = "0x411530", Offset = "0x410530", VA = "0x180411530")]
|
||||
get
|
||||
{
|
||||
return this.forward;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018AB RID: 6315
|
||||
// (get) Token: 0x06009AA2 RID: 39586 RVA: 0x001F9DD4 File Offset: 0x001F7FD4
|
||||
[Token(Token = "0x170018AB")]
|
||||
public X509Certificate Reverse
|
||||
{
|
||||
[Token(Token = "0x6009AA2")]
|
||||
[Address(RVA = "0x4157B0", Offset = "0x4147B0", VA = "0x1804157B0")]
|
||||
get
|
||||
{
|
||||
return this.reverse;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009AA3 RID: 39587 RVA: 0x001F9DE8 File Offset: 0x001F7FE8
|
||||
[Token(Token = "0x6009AA3")]
|
||||
[Address(RVA = "0x417AD0", Offset = "0x416AD0", VA = "0x180417AD0", 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: 0x06009AA4 RID: 39588 RVA: 0x001F9E1C File Offset: 0x001F801C
|
||||
[Token(Token = "0x6009AA4")]
|
||||
[Address(RVA = "0x417D60", Offset = "0x416D60", VA = "0x180417D60", Slot = "2")]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009AA4)
|
||||
|
||||
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: 0x04006840 RID: 26688
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006840")]
|
||||
private readonly X509Certificate forward;
|
||||
|
||||
// Token: 0x04006841 RID: 26689
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006841")]
|
||||
private readonly X509Certificate reverse;
|
||||
}
|
||||
}
|
||||
+205
@@ -0,0 +1,205 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
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: 0x020019E4 RID: 6628
|
||||
[Token(Token = "0x20019E4")]
|
||||
public class X509CertificateParser
|
||||
{
|
||||
// Token: 0x06009AA5 RID: 39589 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6009AA5")]
|
||||
[Address(RVA = "0x418610", Offset = "0x417610", VA = "0x180418610")]
|
||||
private X509Certificate ReadDerCertificate(Asn1InputStream dIn)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06009AA6 RID: 39590 RVA: 0x001F9E54 File Offset: 0x001F8054
|
||||
[Token(Token = "0x6009AA6")]
|
||||
[Address(RVA = "0x417F30", Offset = "0x416F30", VA = "0x180417F30")]
|
||||
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: 0x06009AA7 RID: 39591 RVA: 0x001F9EB4 File Offset: 0x001F80B4
|
||||
[Token(Token = "0x6009AA7")]
|
||||
[Address(RVA = "0x418830", Offset = "0x417830", VA = "0x180418830")]
|
||||
private X509Certificate ReadPemCertificate(Stream inStream)
|
||||
{
|
||||
Asn1Sequence asn1Sequence = X509CertificateParser.PemCertParser.ReadPemObject(inStream);
|
||||
if (asn1Sequence == 0)
|
||||
{
|
||||
}
|
||||
X509CertificateStructure instance = X509CertificateStructure.GetInstance(asn1Sequence);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009AA8 RID: 39592 RVA: 0x001F9EE0 File Offset: 0x001F80E0
|
||||
[Token(Token = "0x6009AA8")]
|
||||
[Address(RVA = "0x417ED0", Offset = "0x416ED0", VA = "0x180417ED0", Slot = "4")]
|
||||
protected virtual X509Certificate CreateX509Certificate(X509CertificateStructure c)
|
||||
{
|
||||
return new X509Certificate(c);
|
||||
}
|
||||
|
||||
// Token: 0x06009AA9 RID: 39593 RVA: 0x001F9EF4 File Offset: 0x001F80F4
|
||||
[Token(Token = "0x6009AA9")]
|
||||
[Address(RVA = "0x418050", Offset = "0x417050", VA = "0x180418050")]
|
||||
public X509Certificate ReadCertificate(byte[] input)
|
||||
{
|
||||
int num;
|
||||
MemoryStream memoryStream = new MemoryStream(input, num != 0);
|
||||
num = 0;
|
||||
return this.ReadCertificate(memoryStream);
|
||||
}
|
||||
|
||||
// Token: 0x06009AAA RID: 39594 RVA: 0x001F9F14 File Offset: 0x001F8114
|
||||
[Token(Token = "0x6009AAA")]
|
||||
[Address(RVA = "0x418360", Offset = "0x417360", VA = "0x180418360")]
|
||||
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: 0x06009AAB RID: 39595 RVA: 0x001F9F6C File Offset: 0x001F816C
|
||||
[Token(Token = "0x6009AAB")]
|
||||
[Address(RVA = "0x4180C0", Offset = "0x4170C0", VA = "0x1804180C0")]
|
||||
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: 0x06009AAC RID: 39596 RVA: 0x001FA058 File Offset: 0x001F8258
|
||||
[Token(Token = "0x6009AAC")]
|
||||
[Address(RVA = "0x4184D0", Offset = "0x4174D0", VA = "0x1804184D0")]
|
||||
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: 0x06009AAD RID: 39597 RVA: 0x001FA098 File Offset: 0x001F8298
|
||||
[Token(Token = "0x6009AAD")]
|
||||
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
||||
public X509CertificateParser()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04006842 RID: 26690
|
||||
[Token(Token = "0x4006842")]
|
||||
private static readonly PemParser PemCertParser = new PemParser("CERTIFICATE");
|
||||
|
||||
// Token: 0x04006843 RID: 26691
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006843")]
|
||||
private Asn1Set sData;
|
||||
|
||||
// Token: 0x04006844 RID: 26692
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006844")]
|
||||
private int sDataObjectCount;
|
||||
|
||||
// Token: 0x04006845 RID: 26693
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4006845")]
|
||||
private Stream currentStream;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,505 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
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: 0x020019E5 RID: 6629
|
||||
[Token(Token = "0x20019E5")]
|
||||
public class X509Crl : X509ExtensionBase
|
||||
{
|
||||
// Token: 0x06009AAF RID: 39599 RVA: 0x001FA0C8 File Offset: 0x001F82C8
|
||||
[Token(Token = "0x6009AAF")]
|
||||
[Address(RVA = "0x41EB70", Offset = "0x41DB70", VA = "0x18041EB70")]
|
||||
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: 0x06009AB0 RID: 39600 RVA: 0x001FA14C File Offset: 0x001F834C
|
||||
[Token(Token = "0x6009AB0")]
|
||||
[Address(RVA = "0x41D920", Offset = "0x41C920", VA = "0x18041D920", Slot = "8")]
|
||||
protected override X509Extensions GetX509Extensions()
|
||||
{
|
||||
int version = this.c.Version;
|
||||
return this.c.tbsCertList.crlExtensions;
|
||||
}
|
||||
|
||||
// Token: 0x06009AB1 RID: 39601 RVA: 0x001FA180 File Offset: 0x001F8380
|
||||
[Token(Token = "0x6009AB1")]
|
||||
[Address(RVA = "0x41D440", Offset = "0x41C440", VA = "0x18041D440", Slot = "13")]
|
||||
public virtual byte[] GetEncoded()
|
||||
{
|
||||
return this.c.GetDerEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x06009AB2 RID: 39602 RVA: 0x001FA1A4 File Offset: 0x001F83A4
|
||||
[Token(Token = "0x6009AB2")]
|
||||
[Address(RVA = "0x41EA70", Offset = "0x41DA70", VA = "0x18041EA70", Slot = "14")]
|
||||
public virtual void Verify(AsymmetricKeyParameter publicKey)
|
||||
{
|
||||
Asn1VerifierFactoryProvider asn1VerifierFactoryProvider = new Asn1VerifierFactoryProvider(publicKey);
|
||||
ISet criticalExtensionOids = ((IX509Extension)this).GetCriticalExtensionOids();
|
||||
}
|
||||
|
||||
// Token: 0x06009AB3 RID: 39603 RVA: 0x001FA1C0 File Offset: 0x001F83C0
|
||||
[Token(Token = "0x6009AB3")]
|
||||
[Address(RVA = "0x41EAF0", Offset = "0x41DAF0", VA = "0x18041EAF0", Slot = "15")]
|
||||
public virtual void Verify(IVerifierFactoryProvider verifierProvider)
|
||||
{
|
||||
CertificateList certificateList = this.c;
|
||||
ISet criticalExtensionOids = ((IX509Extension)this).GetCriticalExtensionOids();
|
||||
}
|
||||
|
||||
// Token: 0x06009AB4 RID: 39604 RVA: 0x001FA1E4 File Offset: 0x001F83E4
|
||||
[Token(Token = "0x6009AB4")]
|
||||
[Address(RVA = "0x41D110", Offset = "0x41C110", VA = "0x18041D110", Slot = "16")]
|
||||
protected virtual void CheckSignature(IVerifierFactory verifier)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009AB4)
|
||||
|
||||
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: 0x170018AC RID: 6316
|
||||
// (get) Token: 0x06009AB5 RID: 39605 RVA: 0x001FA254 File Offset: 0x001F8454
|
||||
[Token(Token = "0x170018AC")]
|
||||
public virtual int Version
|
||||
{
|
||||
[Token(Token = "0x6009AB5")]
|
||||
[Address(RVA = "0x41EEF0", Offset = "0x41DEF0", VA = "0x18041EEF0", Slot = "17")]
|
||||
get
|
||||
{
|
||||
return this.c.Version;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018AD RID: 6317
|
||||
// (get) Token: 0x06009AB6 RID: 39606 RVA: 0x001FA274 File Offset: 0x001F8474
|
||||
[Token(Token = "0x170018AD")]
|
||||
public virtual X509Name IssuerDN
|
||||
{
|
||||
[Token(Token = "0x6009AB6")]
|
||||
[Address(RVA = "0x41EE00", Offset = "0x41DE00", VA = "0x18041EE00", Slot = "18")]
|
||||
get
|
||||
{
|
||||
return this.c.Issuer;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018AE RID: 6318
|
||||
// (get) Token: 0x06009AB7 RID: 39607 RVA: 0x001FA294 File Offset: 0x001F8494
|
||||
[Token(Token = "0x170018AE")]
|
||||
public virtual DateTime ThisUpdate
|
||||
{
|
||||
[Token(Token = "0x6009AB7")]
|
||||
[Address(RVA = "0x41EEC0", Offset = "0x41DEC0", VA = "0x18041EEC0", Slot = "19")]
|
||||
get
|
||||
{
|
||||
return this.c.ThisUpdate.ToDateTime();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018AF RID: 6319
|
||||
// (get) Token: 0x06009AB8 RID: 39608 RVA: 0x001FA2B8 File Offset: 0x001F84B8
|
||||
[Token(Token = "0x170018AF")]
|
||||
public virtual DateTimeObject NextUpdate
|
||||
{
|
||||
[Token(Token = "0x6009AB8")]
|
||||
[Address(RVA = "0x41EE20", Offset = "0x41DE20", VA = "0x18041EE20", Slot = "20")]
|
||||
get
|
||||
{
|
||||
if (this.c.NextUpdate == 0)
|
||||
{
|
||||
}
|
||||
return new DateTimeObject(this.c.NextUpdate.ToDateTime());
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009AB9 RID: 39609 RVA: 0x001FA2F0 File Offset: 0x001F84F0
|
||||
[Token(Token = "0x6009AB9")]
|
||||
[Address(RVA = "0x41DA50", Offset = "0x41CA50", VA = "0x18041DA50")]
|
||||
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_99;
|
||||
}
|
||||
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)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
throw new NullReferenceException();
|
||||
IL_99:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009ABA RID: 39610 RVA: 0x001FA39C File Offset: 0x001F859C
|
||||
[Token(Token = "0x6009ABA")]
|
||||
[Address(RVA = "0x41D4F0", Offset = "0x41C4F0", VA = "0x18041D4F0", Slot = "21")]
|
||||
public virtual X509CrlEntry GetRevokedCertificate(BigInteger serialNumber)
|
||||
{
|
||||
int num;
|
||||
X509CrlEntry x509CrlEntry;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
IEnumerable enumerable;
|
||||
if (enumerable != 0)
|
||||
{
|
||||
if (enumerable == 0)
|
||||
{
|
||||
}
|
||||
if (enumerable == 0)
|
||||
{
|
||||
goto IL_57;
|
||||
}
|
||||
x509CrlEntry.c = enumerable;
|
||||
x509CrlEntry.isIndirect = num != 0;
|
||||
x509CrlEntry.previousCertificateIssuer = enumerable;
|
||||
X509Name x509Name = x509CrlEntry.loadCertificateIssuer();
|
||||
x509CrlEntry.certificateIssuer = x509Name;
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
if (num != -1)
|
||||
{
|
||||
return x509CrlEntry;
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
IL_57:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009ABB RID: 39611 RVA: 0x001FA408 File Offset: 0x001F8608
|
||||
[Token(Token = "0x6009ABB")]
|
||||
[Address(RVA = "0x41D790", Offset = "0x41C790", VA = "0x18041D790", Slot = "22")]
|
||||
public virtual ISet GetRevokedCertificates()
|
||||
{
|
||||
ISet set = this.LoadCrlEntries();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009ABC RID: 39612 RVA: 0x001FA424 File Offset: 0x001F8624
|
||||
[Token(Token = "0x6009ABC")]
|
||||
[Address(RVA = "0x41D860", Offset = "0x41C860", VA = "0x18041D860", Slot = "23")]
|
||||
public virtual byte[] GetTbsCertList()
|
||||
{
|
||||
return this.c.tbsCertList.GetDerEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x06009ABD RID: 39613 RVA: 0x001FA454 File Offset: 0x001F8654
|
||||
[Token(Token = "0x6009ABD")]
|
||||
[Address(RVA = "0x419790", Offset = "0x418790", VA = "0x180419790", Slot = "24")]
|
||||
public virtual byte[] GetSignature()
|
||||
{
|
||||
return this.c.GetSignatureOctets();
|
||||
}
|
||||
|
||||
// Token: 0x170018B0 RID: 6320
|
||||
// (get) Token: 0x06009ABE RID: 39614 RVA: 0x001FA474 File Offset: 0x001F8674
|
||||
[Token(Token = "0x170018B0")]
|
||||
public virtual string SigAlgName
|
||||
{
|
||||
[Token(Token = "0x6009ABE")]
|
||||
[Address(RVA = "0x4157B0", Offset = "0x4147B0", VA = "0x1804157B0", Slot = "25")]
|
||||
get
|
||||
{
|
||||
return this.sigAlgName;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018B1 RID: 6321
|
||||
// (get) Token: 0x06009ABF RID: 39615 RVA: 0x001FA488 File Offset: 0x001F8688
|
||||
[Token(Token = "0x170018B1")]
|
||||
public virtual string SigAlgOid
|
||||
{
|
||||
[Token(Token = "0x6009ABF")]
|
||||
[Address(RVA = "0x41ABE0", Offset = "0x419BE0", VA = "0x18041ABE0", Slot = "26")]
|
||||
get
|
||||
{
|
||||
Asn1Object asn1Object = this.c.sigAlgID.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009AC0 RID: 39616 RVA: 0x001FA4AC File Offset: 0x001F86AC
|
||||
[Token(Token = "0x6009AC0")]
|
||||
[Address(RVA = "0x41D800", Offset = "0x41C800", VA = "0x18041D800", Slot = "27")]
|
||||
public virtual byte[] GetSigAlgParams()
|
||||
{
|
||||
return Arrays.Clone(this.sigAlgParams);
|
||||
}
|
||||
|
||||
// Token: 0x06009AC1 RID: 39617 RVA: 0x001FA4C4 File Offset: 0x001F86C4
|
||||
[Token(Token = "0x6009AC1")]
|
||||
[Address(RVA = "0x41D380", Offset = "0x41C380", VA = "0x18041D380", Slot = "0")]
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj != this)
|
||||
{
|
||||
if (obj != 0 && obj != 0)
|
||||
{
|
||||
Asn1Object asn1Object = this.c.ToAsn1Object();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x06009AC2 RID: 39618 RVA: 0x001FA4F4 File Offset: 0x001F86F4
|
||||
[Token(Token = "0x6009AC2")]
|
||||
[Address(RVA = "0x40F2B0", Offset = "0x40E2B0", VA = "0x18040F2B0", Slot = "2")]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
Asn1Object asn1Object = this.c.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009AC3 RID: 39619 RVA: 0x001FA514 File Offset: 0x001F8714
|
||||
[Token(Token = "0x6009AC3")]
|
||||
[Address(RVA = "0x41DD50", Offset = "0x41CD50", VA = "0x18041DD50", Slot = "3")]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder;
|
||||
string newLine;
|
||||
do
|
||||
{
|
||||
int num = 0;
|
||||
stringBuilder = new StringBuilder();
|
||||
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;
|
||||
int num8;
|
||||
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;
|
||||
}
|
||||
while (stringBuilder.Append(newLine) == 0 || 0 != 0);
|
||||
int hashCode = stringBuilder.GetHashCode();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009AC4 RID: 39620 RVA: 0x001FA838 File Offset: 0x001F8A38
|
||||
[Token(Token = "0x6009AC4")]
|
||||
[Address(RVA = "0x41D970", Offset = "0x41C970", VA = "0x18041D970", 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: 0x170018B2 RID: 6322
|
||||
// (get) Token: 0x06009AC5 RID: 39621 RVA: 0x001FA88C File Offset: 0x001F8A8C
|
||||
[Token(Token = "0x170018B2")]
|
||||
protected virtual bool IsIndirectCrl
|
||||
{
|
||||
[Token(Token = "0x6009AC5")]
|
||||
[Address(RVA = "0x41ECE0", Offset = "0x41DCE0", VA = "0x18041ECE0", 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: 0x04006846 RID: 26694
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006846")]
|
||||
private readonly CertificateList c;
|
||||
|
||||
// Token: 0x04006847 RID: 26695
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006847")]
|
||||
private readonly string sigAlgName;
|
||||
|
||||
// Token: 0x04006848 RID: 26696
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4006848")]
|
||||
private readonly byte[] sigAlgParams;
|
||||
|
||||
// Token: 0x04006849 RID: 26697
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4006849")]
|
||||
private readonly bool isIndirect;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,231 @@
|
||||
using System;
|
||||
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: 0x020019E6 RID: 6630
|
||||
[Token(Token = "0x20019E6")]
|
||||
public class X509CrlEntry : X509ExtensionBase
|
||||
{
|
||||
// Token: 0x06009AC6 RID: 39622 RVA: 0x001FA8CC File Offset: 0x001F8ACC
|
||||
[Token(Token = "0x6009AC6")]
|
||||
[Address(RVA = "0x41B9E0", Offset = "0x41A9E0", VA = "0x18041B9E0")]
|
||||
public X509CrlEntry(CrlEntry c)
|
||||
{
|
||||
this.c = c;
|
||||
X509Name x509Name = this.loadCertificateIssuer();
|
||||
this.certificateIssuer = x509Name;
|
||||
}
|
||||
|
||||
// Token: 0x06009AC7 RID: 39623 RVA: 0x001FA8F4 File Offset: 0x001F8AF4
|
||||
[Token(Token = "0x6009AC7")]
|
||||
[Address(RVA = "0x41BA20", Offset = "0x41AA20", VA = "0x18041BA20")]
|
||||
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: 0x06009AC8 RID: 39624 RVA: 0x001FA92C File Offset: 0x001F8B2C
|
||||
[Token(Token = "0x6009AC8")]
|
||||
[Address(RVA = "0x41BB10", Offset = "0x41AB10", VA = "0x18041BB10")]
|
||||
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: 0x06009AC9 RID: 39625 RVA: 0x001FA9B8 File Offset: 0x001F8BB8
|
||||
[Token(Token = "0x6009AC9")]
|
||||
[Address(RVA = "0x4157D0", Offset = "0x4147D0", VA = "0x1804157D0")]
|
||||
public X509Name GetCertificateIssuer()
|
||||
{
|
||||
return this.certificateIssuer;
|
||||
}
|
||||
|
||||
// Token: 0x06009ACA RID: 39626 RVA: 0x001FA9CC File Offset: 0x001F8BCC
|
||||
[Token(Token = "0x6009ACA")]
|
||||
[Address(RVA = "0x41B200", Offset = "0x41A200", VA = "0x18041B200", Slot = "8")]
|
||||
protected override X509Extensions GetX509Extensions()
|
||||
{
|
||||
return this.c.Extensions;
|
||||
}
|
||||
|
||||
// Token: 0x06009ACB RID: 39627 RVA: 0x001FA9EC File Offset: 0x001F8BEC
|
||||
[Token(Token = "0x6009ACB")]
|
||||
[Address(RVA = "0x41B150", Offset = "0x41A150", VA = "0x18041B150")]
|
||||
public byte[] GetEncoded()
|
||||
{
|
||||
return this.c.GetDerEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x170018B3 RID: 6323
|
||||
// (get) Token: 0x06009ACC RID: 39628 RVA: 0x001FAA10 File Offset: 0x001F8C10
|
||||
[Token(Token = "0x170018B3")]
|
||||
public BigInteger SerialNumber
|
||||
{
|
||||
[Token(Token = "0x6009ACC")]
|
||||
[Address(RVA = "0x41BAE0", Offset = "0x41AAE0", VA = "0x18041BAE0")]
|
||||
get
|
||||
{
|
||||
return this.c.userCertificate.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018B4 RID: 6324
|
||||
// (get) Token: 0x06009ACD RID: 39629 RVA: 0x001FAA34 File Offset: 0x001F8C34
|
||||
[Token(Token = "0x170018B4")]
|
||||
public DateTime RevocationDate
|
||||
{
|
||||
[Token(Token = "0x6009ACD")]
|
||||
[Address(RVA = "0x41BAB0", Offset = "0x41AAB0", VA = "0x18041BAB0")]
|
||||
get
|
||||
{
|
||||
return this.c.revocationDate.ToDateTime();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018B5 RID: 6325
|
||||
// (get) Token: 0x06009ACE RID: 39630 RVA: 0x001FAA58 File Offset: 0x001F8C58
|
||||
[Token(Token = "0x170018B5")]
|
||||
public bool HasExtensions
|
||||
{
|
||||
[Token(Token = "0x6009ACE")]
|
||||
[Address(RVA = "0x41BA80", Offset = "0x41AA80", VA = "0x18041BA80")]
|
||||
get
|
||||
{
|
||||
return this.c.Extensions != 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009ACF RID: 39631 RVA: 0x001FAA7C File Offset: 0x001F8C7C
|
||||
[Token(Token = "0x6009ACF")]
|
||||
[Address(RVA = "0x41B220", Offset = "0x41A220", VA = "0x18041B220", 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: 0x0400684A RID: 26698
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400684A")]
|
||||
private CrlEntry c;
|
||||
|
||||
// Token: 0x0400684B RID: 26699
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400684B")]
|
||||
private bool isIndirect;
|
||||
|
||||
// Token: 0x0400684C RID: 26700
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400684C")]
|
||||
private X509Name previousCertificateIssuer;
|
||||
|
||||
// Token: 0x0400684D RID: 26701
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x400684D")]
|
||||
private X509Name certificateIssuer;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,213 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
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: 0x020019E7 RID: 6631
|
||||
[Token(Token = "0x20019E7")]
|
||||
public class X509CrlParser
|
||||
{
|
||||
// Token: 0x06009AD0 RID: 39632 RVA: 0x001FAC8C File Offset: 0x001F8E8C
|
||||
[Token(Token = "0x6009AD0")]
|
||||
[Address(RVA = "0x41C6E0", Offset = "0x41B6E0", VA = "0x18041C6E0")]
|
||||
public X509CrlParser()
|
||||
{
|
||||
this.lazyAsn1 = false;
|
||||
}
|
||||
|
||||
// Token: 0x06009AD1 RID: 39633 RVA: 0x001FACA8 File Offset: 0x001F8EA8
|
||||
[Token(Token = "0x6009AD1")]
|
||||
[Address(RVA = "0x41C700", Offset = "0x41B700", VA = "0x18041C700")]
|
||||
public X509CrlParser(bool lazyAsn1)
|
||||
{
|
||||
this.lazyAsn1 = lazyAsn1;
|
||||
}
|
||||
|
||||
// Token: 0x06009AD2 RID: 39634 RVA: 0x001FACC4 File Offset: 0x001F8EC4
|
||||
[Token(Token = "0x6009AD2")]
|
||||
[Address(RVA = "0x41C5D0", Offset = "0x41B5D0", VA = "0x18041C5D0")]
|
||||
private X509Crl ReadPemCrl(Stream inStream)
|
||||
{
|
||||
Asn1Sequence asn1Sequence = X509CrlParser.PemCrlParser.ReadPemObject(inStream);
|
||||
if (asn1Sequence == 0)
|
||||
{
|
||||
}
|
||||
CertificateList instance = CertificateList.GetInstance(asn1Sequence);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009AD3 RID: 39635 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6009AD3")]
|
||||
[Address(RVA = "0x41C3B0", Offset = "0x41B3B0", VA = "0x18041C3B0")]
|
||||
private X509Crl ReadDerCrl(Asn1InputStream dIn)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06009AD4 RID: 39636 RVA: 0x001FACF0 File Offset: 0x001F8EF0
|
||||
[Token(Token = "0x6009AD4")]
|
||||
[Address(RVA = "0x41BD10", Offset = "0x41AD10", VA = "0x18041BD10")]
|
||||
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: 0x06009AD5 RID: 39637 RVA: 0x001FAD38 File Offset: 0x001F8F38
|
||||
[Token(Token = "0x6009AD5")]
|
||||
[Address(RVA = "0x41BCB0", Offset = "0x41ACB0", VA = "0x18041BCB0", Slot = "4")]
|
||||
protected virtual X509Crl CreateX509Crl(CertificateList c)
|
||||
{
|
||||
return new X509Crl(c);
|
||||
}
|
||||
|
||||
// Token: 0x06009AD6 RID: 39638 RVA: 0x001FAD4C File Offset: 0x001F8F4C
|
||||
[Token(Token = "0x6009AD6")]
|
||||
[Address(RVA = "0x41C090", Offset = "0x41B090", VA = "0x18041C090")]
|
||||
public X509Crl ReadCrl(byte[] input)
|
||||
{
|
||||
int num;
|
||||
MemoryStream memoryStream = new MemoryStream(input, num != 0);
|
||||
num = 0;
|
||||
return this.ReadCrl(memoryStream);
|
||||
}
|
||||
|
||||
// Token: 0x06009AD7 RID: 39639 RVA: 0x001FAD6C File Offset: 0x001F8F6C
|
||||
[Token(Token = "0x6009AD7")]
|
||||
[Address(RVA = "0x41C240", Offset = "0x41B240", VA = "0x18041C240")]
|
||||
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: 0x06009AD8 RID: 39640 RVA: 0x001FADC4 File Offset: 0x001F8FC4
|
||||
[Token(Token = "0x6009AD8")]
|
||||
[Address(RVA = "0x41BDA0", Offset = "0x41ADA0", VA = "0x18041BDA0")]
|
||||
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: 0x06009AD9 RID: 39641 RVA: 0x001FAE9C File Offset: 0x001F909C
|
||||
[Token(Token = "0x6009AD9")]
|
||||
[Address(RVA = "0x41C100", Offset = "0x41B100", VA = "0x18041C100")]
|
||||
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: 0x0400684E RID: 26702
|
||||
[Token(Token = "0x400684E")]
|
||||
private static readonly PemParser PemCrlParser = new PemParser("CRL");
|
||||
|
||||
// Token: 0x0400684F RID: 26703
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400684F")]
|
||||
private readonly bool lazyAsn1;
|
||||
|
||||
// Token: 0x04006850 RID: 26704
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006850")]
|
||||
private Asn1Set sCrlData;
|
||||
|
||||
// Token: 0x04006851 RID: 26705
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4006851")]
|
||||
private int sCrlDataObjectCount;
|
||||
|
||||
// Token: 0x04006852 RID: 26706
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4006852")]
|
||||
private Stream currentCrlStream;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
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: 0x020019E8 RID: 6632
|
||||
[Token(Token = "0x20019E8")]
|
||||
public abstract class X509ExtensionBase : IX509Extension
|
||||
{
|
||||
// Token: 0x06009ADB RID: 39643
|
||||
[Token(Token = "0x6009ADB")]
|
||||
[Address(Slot = "8")]
|
||||
protected abstract X509Extensions GetX509Extensions();
|
||||
|
||||
// Token: 0x06009ADC RID: 39644 RVA: 0x001FAEF8 File Offset: 0x001F90F8
|
||||
[Token(Token = "0x6009ADC")]
|
||||
[Address(RVA = "0x41EF30", Offset = "0x41DF30", VA = "0x18041EF30", 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_56;
|
||||
}
|
||||
X509Extension x509Extension;
|
||||
while (x509Extension.critical != critical)
|
||||
{
|
||||
}
|
||||
if (hashSet.GetEnumerator() != 0)
|
||||
{
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
IL_56:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009ADD RID: 39645 RVA: 0x001FAF60 File Offset: 0x001F9160
|
||||
[Token(Token = "0x6009ADD")]
|
||||
[Address(RVA = "0x41F280", Offset = "0x41E280", VA = "0x18041F280", Slot = "10")]
|
||||
public virtual ISet GetNonCriticalExtensionOids()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009ADD)
|
||||
|
||||
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: 0x06009ADE RID: 39646 RVA: 0x001FAF74 File Offset: 0x001F9174
|
||||
[Token(Token = "0x6009ADE")]
|
||||
[Address(RVA = "0x41EF10", Offset = "0x41DF10", VA = "0x18041EF10", Slot = "11")]
|
||||
public virtual ISet GetCriticalExtensionOids()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009ADE)
|
||||
|
||||
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: 0x06009ADF RID: 39647 RVA: 0x001FAF88 File Offset: 0x001F9188
|
||||
[Token(Token = "0x6009ADF")]
|
||||
[Address(RVA = "0x41F200", Offset = "0x41E200", VA = "0x18041F200", Slot = "6")]
|
||||
[Obsolete]
|
||||
public Asn1OctetString GetExtensionValue(string oid)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009ADF)
|
||||
|
||||
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: 0x06009AE0 RID: 39648 RVA: 0x001FAFA4 File Offset: 0x001F91A4
|
||||
[Token(Token = "0x6009AE0")]
|
||||
[Address(RVA = "0x41F1B0", Offset = "0x41E1B0", VA = "0x18041F1B0", Slot = "12")]
|
||||
public virtual Asn1OctetString GetExtensionValue(DerObjectIdentifier oid)
|
||||
{
|
||||
Asn1OctetString asn1OctetString;
|
||||
X509Extension x509Extension;
|
||||
if (asn1OctetString != 0 && x509Extension != 0)
|
||||
{
|
||||
return x509Extension.value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009AE1 RID: 39649 RVA: 0x001FAFC4 File Offset: 0x001F91C4
|
||||
[Token(Token = "0x6009AE1")]
|
||||
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
||||
protected X509ExtensionBase()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x020019E9 RID: 6633
|
||||
[Token(Token = "0x20019E9")]
|
||||
public class X509KeyUsage : Asn1Encodable
|
||||
{
|
||||
// Token: 0x06009AE2 RID: 39650 RVA: 0x001FAFD8 File Offset: 0x001F91D8
|
||||
[Token(Token = "0x6009AE2")]
|
||||
[Address(RVA = "0x41F8E0", Offset = "0x41E8E0", VA = "0x18041F8E0")]
|
||||
public X509KeyUsage(int usage)
|
||||
{
|
||||
this.usage = usage;
|
||||
}
|
||||
|
||||
// Token: 0x06009AE3 RID: 39651 RVA: 0x001FAFF4 File Offset: 0x001F91F4
|
||||
[Token(Token = "0x6009AE3")]
|
||||
[Address(RVA = "0x41F880", Offset = "0x41E880", VA = "0x18041F880", Slot = "5")]
|
||||
public override Asn1Object ToAsn1Object()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009AE3)
|
||||
|
||||
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: 0x04006853 RID: 26707
|
||||
[Token(Token = "0x4006853")]
|
||||
public const int DigitalSignature = 128;
|
||||
|
||||
// Token: 0x04006854 RID: 26708
|
||||
[Token(Token = "0x4006854")]
|
||||
public const int NonRepudiation = 64;
|
||||
|
||||
// Token: 0x04006855 RID: 26709
|
||||
[Token(Token = "0x4006855")]
|
||||
public const int KeyEncipherment = 32;
|
||||
|
||||
// Token: 0x04006856 RID: 26710
|
||||
[Token(Token = "0x4006856")]
|
||||
public const int DataEncipherment = 16;
|
||||
|
||||
// Token: 0x04006857 RID: 26711
|
||||
[Token(Token = "0x4006857")]
|
||||
public const int KeyAgreement = 8;
|
||||
|
||||
// Token: 0x04006858 RID: 26712
|
||||
[Token(Token = "0x4006858")]
|
||||
public const int KeyCertSign = 4;
|
||||
|
||||
// Token: 0x04006859 RID: 26713
|
||||
[Token(Token = "0x4006859")]
|
||||
public const int CrlSign = 2;
|
||||
|
||||
// Token: 0x0400685A RID: 26714
|
||||
[Token(Token = "0x400685A")]
|
||||
public const int EncipherOnly = 1;
|
||||
|
||||
// Token: 0x0400685B RID: 26715
|
||||
[Token(Token = "0x400685B")]
|
||||
public const int DecipherOnly = 32768;
|
||||
|
||||
// Token: 0x0400685C RID: 26716
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400685C")]
|
||||
private readonly int usage;
|
||||
}
|
||||
}
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
using System;
|
||||
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: 0x020019EA RID: 6634
|
||||
[Token(Token = "0x20019EA")]
|
||||
internal class X509SignatureUtilities
|
||||
{
|
||||
// Token: 0x06009AE4 RID: 39652 RVA: 0x001FB00C File Offset: 0x001F920C
|
||||
[Token(Token = "0x6009AE4")]
|
||||
[Address(RVA = "0x41FFF0", Offset = "0x41EFF0", VA = "0x18041FFF0")]
|
||||
internal static void SetSignatureParameters(ISigner signature, Asn1Encodable parameters)
|
||||
{
|
||||
if (parameters != 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009AE5 RID: 39653 RVA: 0x001FB024 File Offset: 0x001F9224
|
||||
[Token(Token = "0x6009AE5")]
|
||||
[Address(RVA = "0x41FD30", Offset = "0x41ED30", VA = "0x18041FD30")]
|
||||
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: 0x06009AE6 RID: 39654 RVA: 0x001FB084 File Offset: 0x001F9284
|
||||
[Token(Token = "0x6009AE6")]
|
||||
[Address(RVA = "0x41F910", Offset = "0x41E910", VA = "0x18041F910")]
|
||||
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: 0x06009AE7 RID: 39655 RVA: 0x001FB11C File Offset: 0x001F931C
|
||||
[Token(Token = "0x6009AE7")]
|
||||
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
||||
public X509SignatureUtilities()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009AE8 RID: 39656 RVA: 0x001FB130 File Offset: 0x001F9330
|
||||
// Note: this type is marked as 'beforefieldinit'.
|
||||
[Token(Token = "0x6009AE8")]
|
||||
[Address(RVA = "0x420080", Offset = "0x41F080", VA = "0x180420080")]
|
||||
static X509SignatureUtilities()
|
||||
{
|
||||
DerNull instance = DerNull.Instance;
|
||||
}
|
||||
|
||||
// Token: 0x0400685D RID: 26717
|
||||
[Token(Token = "0x400685D")]
|
||||
private static readonly Asn1Null derNull;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,255 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.CryptoPro;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Nist;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.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: 0x020019EB RID: 6635
|
||||
[Token(Token = "0x20019EB")]
|
||||
internal class X509Utilities
|
||||
{
|
||||
// Token: 0x06009AE9 RID: 39657 RVA: 0x001FB144 File Offset: 0x001F9344
|
||||
[Token(Token = "0x6009AE9")]
|
||||
[Address(RVA = "0x420D70", Offset = "0x41FD70", VA = "0x180420D70")]
|
||||
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: 0x06009AEA RID: 39658 RVA: 0x001FB4F4 File Offset: 0x001F96F4
|
||||
[Token(Token = "0x6009AEA")]
|
||||
[Address(RVA = "0x420640", Offset = "0x41F640", VA = "0x180420640")]
|
||||
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: 0x06009AEB RID: 39659 RVA: 0x001FB524 File Offset: 0x001F9724
|
||||
[Token(Token = "0x6009AEB")]
|
||||
[Address(RVA = "0x420810", Offset = "0x41F810", VA = "0x180420810")]
|
||||
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: 0x06009AEC RID: 39660 RVA: 0x001FB560 File Offset: 0x001F9760
|
||||
[Token(Token = "0x6009AEC")]
|
||||
[Address(RVA = "0x420990", Offset = "0x41F990", VA = "0x180420990")]
|
||||
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: 0x06009AED RID: 39661 RVA: 0x001FB5B8 File Offset: 0x001F97B8
|
||||
[Token(Token = "0x6009AED")]
|
||||
[Address(RVA = "0x420760", Offset = "0x41F760", VA = "0x180420760")]
|
||||
internal static IEnumerable GetAlgNames()
|
||||
{
|
||||
IDictionary dictionary = X509Utilities.algorithms;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009AEE RID: 39662 RVA: 0x001FB5D0 File Offset: 0x001F97D0
|
||||
[Token(Token = "0x6009AEE")]
|
||||
[Address(RVA = "0x420C00", Offset = "0x41FC00", VA = "0x180420C00")]
|
||||
internal static byte[] GetSignatureForObject(DerObjectIdentifier sigOid, string sigName, AsymmetricKeyParameter privateKey, SecureRandom random, Asn1Encodable ae)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009AEE)
|
||||
|
||||
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_1E:
|
||||
stloc:ArgumentNullException(var_5_28, 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: 0x06009AEF RID: 39663 RVA: 0x001FB608 File Offset: 0x001F9808
|
||||
[Token(Token = "0x6009AEF")]
|
||||
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
||||
public X509Utilities()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0400685E RID: 26718
|
||||
[Token(Token = "0x400685E")]
|
||||
private static readonly IDictionary algorithms;
|
||||
|
||||
// Token: 0x0400685F RID: 26719
|
||||
[Token(Token = "0x400685F")]
|
||||
private static readonly IDictionary exParams;
|
||||
|
||||
// Token: 0x04006860 RID: 26720
|
||||
[Token(Token = "0x4006860")]
|
||||
private static readonly ISet noParams;
|
||||
}
|
||||
}
|
||||
+222
@@ -0,0 +1,222 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
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 BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x020019EC RID: 6636
|
||||
[Token(Token = "0x20019EC")]
|
||||
public class X509V1CertificateGenerator
|
||||
{
|
||||
// Token: 0x06009AF0 RID: 39664 RVA: 0x001FB61C File Offset: 0x001F981C
|
||||
[Token(Token = "0x6009AF0")]
|
||||
[Address(RVA = "0x422B30", Offset = "0x421B30", VA = "0x180422B30")]
|
||||
public X509V1CertificateGenerator()
|
||||
{
|
||||
V1TbsCertificateGenerator v1TbsCertificateGenerator = new V1TbsCertificateGenerator();
|
||||
this.tbsGen = v1TbsCertificateGenerator;
|
||||
}
|
||||
|
||||
// Token: 0x06009AF1 RID: 39665 RVA: 0x001FB63C File Offset: 0x001F983C
|
||||
[Token(Token = "0x6009AF1")]
|
||||
[Address(RVA = "0x4225C0", Offset = "0x4215C0", VA = "0x1804225C0")]
|
||||
public void Reset()
|
||||
{
|
||||
V1TbsCertificateGenerator v1TbsCertificateGenerator = new V1TbsCertificateGenerator();
|
||||
this.tbsGen = v1TbsCertificateGenerator;
|
||||
}
|
||||
|
||||
// Token: 0x06009AF2 RID: 39666 RVA: 0x001FB658 File Offset: 0x001F9858
|
||||
[Token(Token = "0x6009AF2")]
|
||||
[Address(RVA = "0x4227E0", Offset = "0x4217E0", VA = "0x1804227E0")]
|
||||
public void SetSerialNumber(BigInteger serialNumber)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009AF2)
|
||||
|
||||
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: 0x06009AF3 RID: 39667 RVA: 0x001FB69C File Offset: 0x001F989C
|
||||
[Token(Token = "0x6009AF3")]
|
||||
[Address(RVA = "0x422610", Offset = "0x421610", VA = "0x180422610")]
|
||||
public void SetIssuerDN(X509Name issuer)
|
||||
{
|
||||
this.tbsGen.issuer = issuer;
|
||||
}
|
||||
|
||||
// Token: 0x06009AF4 RID: 39668 RVA: 0x001FB6BC File Offset: 0x001F98BC
|
||||
[Token(Token = "0x6009AF4")]
|
||||
[Address(RVA = "0x4226A0", Offset = "0x4216A0", VA = "0x1804226A0")]
|
||||
public void SetNotBefore(DateTime date)
|
||||
{
|
||||
V1TbsCertificateGenerator v1TbsCertificateGenerator = this.tbsGen;
|
||||
Time time = new Time(date);
|
||||
v1TbsCertificateGenerator.startDate = time;
|
||||
}
|
||||
|
||||
// Token: 0x06009AF5 RID: 39669 RVA: 0x001FB6E4 File Offset: 0x001F98E4
|
||||
[Token(Token = "0x6009AF5")]
|
||||
[Address(RVA = "0x422630", Offset = "0x421630", VA = "0x180422630")]
|
||||
public void SetNotAfter(DateTime date)
|
||||
{
|
||||
V1TbsCertificateGenerator v1TbsCertificateGenerator = this.tbsGen;
|
||||
Time time = new Time(date);
|
||||
v1TbsCertificateGenerator.endDate = time;
|
||||
}
|
||||
|
||||
// Token: 0x06009AF6 RID: 39670 RVA: 0x001FB70C File Offset: 0x001F990C
|
||||
[Token(Token = "0x6009AF6")]
|
||||
[Address(RVA = "0x422B10", Offset = "0x421B10", VA = "0x180422B10")]
|
||||
public void SetSubjectDN(X509Name subject)
|
||||
{
|
||||
this.tbsGen.subject = subject;
|
||||
}
|
||||
|
||||
// Token: 0x06009AF7 RID: 39671 RVA: 0x001FB72C File Offset: 0x001F992C
|
||||
[Token(Token = "0x6009AF7")]
|
||||
[Address(RVA = "0x422710", Offset = "0x421710", VA = "0x180422710")]
|
||||
public void SetPublicKey(AsymmetricKeyParameter publicKey)
|
||||
{
|
||||
V1TbsCertificateGenerator v1TbsCertificateGenerator = this.tbsGen;
|
||||
SubjectPublicKeyInfo subjectPublicKeyInfo = SubjectPublicKeyInfoFactory.CreateSubjectPublicKeyInfo(publicKey);
|
||||
v1TbsCertificateGenerator.subjectPublicKeyInfo = subjectPublicKeyInfo;
|
||||
}
|
||||
|
||||
// Token: 0x06009AF8 RID: 39672 RVA: 0x001FB764 File Offset: 0x001F9964
|
||||
[Token(Token = "0x6009AF8")]
|
||||
[Address(RVA = "0x4228A0", Offset = "0x4218A0", VA = "0x1804228A0")]
|
||||
[Obsolete]
|
||||
public void SetSignatureAlgorithm(string signatureAlgorithm)
|
||||
{
|
||||
this.signatureAlgorithm = signatureAlgorithm;
|
||||
string text = Platform.ToUpperInvariant(signatureAlgorithm);
|
||||
IDictionary algorithms = X509Utilities.algorithms;
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(text);
|
||||
IDictionary algorithms2 = X509Utilities.algorithms;
|
||||
IDictionary algorithms3 = X509Utilities.algorithms;
|
||||
AlgorithmIdentifier algorithmIdentifier;
|
||||
this.sigAlgId = algorithmIdentifier;
|
||||
this.tbsGen.signature = algorithmIdentifier;
|
||||
}
|
||||
|
||||
// Token: 0x06009AF9 RID: 39673 RVA: 0x001FB7D4 File Offset: 0x001F99D4
|
||||
[Token(Token = "0x6009AF9")]
|
||||
[Address(RVA = "0x422220", Offset = "0x421220", VA = "0x180422220")]
|
||||
[Obsolete]
|
||||
public X509Certificate Generate(AsymmetricKeyParameter privateKey)
|
||||
{
|
||||
int num;
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, num);
|
||||
num = 0;
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x06009AFA RID: 39674 RVA: 0x001FB7F8 File Offset: 0x001F99F8
|
||||
[Token(Token = "0x6009AFA")]
|
||||
[Address(RVA = "0x422180", Offset = "0x421180", VA = "0x180422180")]
|
||||
[Obsolete]
|
||||
public X509Certificate Generate(AsymmetricKeyParameter privateKey, SecureRandom random)
|
||||
{
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, random);
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x06009AFB RID: 39675 RVA: 0x001FB81C File Offset: 0x001F9A1C
|
||||
[Token(Token = "0x6009AFB")]
|
||||
[Address(RVA = "0x4222B0", Offset = "0x4212B0", VA = "0x1804222B0")]
|
||||
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: 0x06009AFC RID: 39676 RVA: 0x001FB878 File Offset: 0x001F9A78
|
||||
[Token(Token = "0x6009AFC")]
|
||||
[Address(RVA = "0x4220C0", Offset = "0x4210C0", VA = "0x1804220C0")]
|
||||
private X509Certificate GenerateJcaObject(TbsCertificateStructure tbsCert, AlgorithmIdentifier sigAlg, byte[] signature)
|
||||
{
|
||||
DerBitString derBitString = new DerBitString(signature);
|
||||
return new X509Certificate(new X509CertificateStructure(tbsCert, sigAlg, derBitString));
|
||||
}
|
||||
|
||||
// Token: 0x170018B6 RID: 6326
|
||||
// (get) Token: 0x06009AFD RID: 39677 RVA: 0x001FB89C File Offset: 0x001F9A9C
|
||||
[Token(Token = "0x170018B6")]
|
||||
public IEnumerable SignatureAlgNames
|
||||
{
|
||||
[Token(Token = "0x6009AFD")]
|
||||
[Address(RVA = "0x422B90", Offset = "0x421B90", VA = "0x180422B90")]
|
||||
get
|
||||
{
|
||||
IDictionary algorithms = X509Utilities.algorithms;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04006861 RID: 26721
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006861")]
|
||||
private V1TbsCertificateGenerator tbsGen;
|
||||
|
||||
// Token: 0x04006862 RID: 26722
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006862")]
|
||||
private DerObjectIdentifier sigOID;
|
||||
|
||||
// Token: 0x04006863 RID: 26723
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4006863")]
|
||||
private AlgorithmIdentifier sigAlgId;
|
||||
|
||||
// Token: 0x04006864 RID: 26724
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4006864")]
|
||||
private string signatureAlgorithm;
|
||||
}
|
||||
}
|
||||
+436
@@ -0,0 +1,436 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
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: 0x020019ED RID: 6637
|
||||
[Token(Token = "0x20019ED")]
|
||||
public class X509V2AttributeCertificate : X509ExtensionBase, IX509AttributeCertificate, IX509Extension
|
||||
{
|
||||
// Token: 0x06009AFE RID: 39678 RVA: 0x001FB8B4 File Offset: 0x001F9AB4
|
||||
[Token(Token = "0x6009AFE")]
|
||||
[Address(RVA = "0x423880", Offset = "0x422880", VA = "0x180423880")]
|
||||
private static AttributeCertificate GetObject(Stream input)
|
||||
{
|
||||
return AttributeCertificate.GetInstance(Asn1Object.FromStream(input));
|
||||
}
|
||||
|
||||
// Token: 0x06009AFF RID: 39679 RVA: 0x001FB8CC File Offset: 0x001F9ACC
|
||||
[Token(Token = "0x6009AFF")]
|
||||
[Address(RVA = "0x423B70", Offset = "0x422B70", VA = "0x180423B70")]
|
||||
public X509V2AttributeCertificate(Stream encIn)
|
||||
{
|
||||
AttributeCertificate @object = X509V2AttributeCertificate.GetObject(encIn);
|
||||
}
|
||||
|
||||
// Token: 0x06009B00 RID: 39680 RVA: 0x001FB8E0 File Offset: 0x001F9AE0
|
||||
[Token(Token = "0x6009B00")]
|
||||
[Address(RVA = "0x423AF0", Offset = "0x422AF0", VA = "0x180423AF0")]
|
||||
public X509V2AttributeCertificate(byte[] encoded)
|
||||
{
|
||||
int num;
|
||||
MemoryStream memoryStream = new MemoryStream(encoded, num != 0);
|
||||
num = 0;
|
||||
AttributeCertificate @object = X509V2AttributeCertificate.GetObject(memoryStream);
|
||||
}
|
||||
|
||||
// Token: 0x06009B01 RID: 39681 RVA: 0x001FB900 File Offset: 0x001F9B00
|
||||
[Token(Token = "0x6009B01")]
|
||||
[Address(RVA = "0x423BA0", Offset = "0x422BA0", VA = "0x180423BA0")]
|
||||
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: 0x170018B7 RID: 6327
|
||||
// (get) Token: 0x06009B02 RID: 39682 RVA: 0x001FB980 File Offset: 0x001F9B80
|
||||
[Token(Token = "0x170018B7")]
|
||||
public virtual int Version
|
||||
{
|
||||
[Token(Token = "0x6009B02")]
|
||||
[Address(RVA = "0x423EF0", Offset = "0x422EF0", VA = "0x180423EF0", Slot = "29")]
|
||||
get
|
||||
{
|
||||
int intValue = this.cert.acinfo.version.Value.IntValue;
|
||||
return intValue + 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018B8 RID: 6328
|
||||
// (get) Token: 0x06009B03 RID: 39683 RVA: 0x001FB9B4 File Offset: 0x001F9BB4
|
||||
[Token(Token = "0x170018B8")]
|
||||
public virtual BigInteger SerialNumber
|
||||
{
|
||||
[Token(Token = "0x6009B03")]
|
||||
[Address(RVA = "0x423EA0", Offset = "0x422EA0", VA = "0x180423EA0", Slot = "30")]
|
||||
get
|
||||
{
|
||||
return this.cert.acinfo.serialNumber.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018B9 RID: 6329
|
||||
// (get) Token: 0x06009B04 RID: 39684 RVA: 0x001FB9DC File Offset: 0x001F9BDC
|
||||
[Token(Token = "0x170018B9")]
|
||||
public virtual AttributeCertificateHolder Holder
|
||||
{
|
||||
[Token(Token = "0x6009B04")]
|
||||
[Address(RVA = "0x423CB0", Offset = "0x422CB0", VA = "0x180423CB0", Slot = "31")]
|
||||
get
|
||||
{
|
||||
Asn1Object asn1Object;
|
||||
do
|
||||
{
|
||||
asn1Object = this.cert.acinfo.holder.ToAsn1Object();
|
||||
if (asn1Object == 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (asn1Object == 0);
|
||||
Holder instance = BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.Holder.GetInstance(asn1Object);
|
||||
AttributeCertificateHolder attributeCertificateHolder;
|
||||
attributeCertificateHolder.holder = instance;
|
||||
return attributeCertificateHolder;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018BA RID: 6330
|
||||
// (get) Token: 0x06009B05 RID: 39685 RVA: 0x001FBA20 File Offset: 0x001F9C20
|
||||
[Token(Token = "0x170018BA")]
|
||||
public virtual AttributeCertificateIssuer Issuer
|
||||
{
|
||||
[Token(Token = "0x6009B05")]
|
||||
[Address(RVA = "0x423E20", Offset = "0x422E20", VA = "0x180423E20", Slot = "32")]
|
||||
get
|
||||
{
|
||||
Asn1Encodable obj = this.cert.acinfo.issuer.obj;
|
||||
AttributeCertificateIssuer attributeCertificateIssuer;
|
||||
attributeCertificateIssuer.form = obj;
|
||||
return attributeCertificateIssuer;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018BB RID: 6331
|
||||
// (get) Token: 0x06009B06 RID: 39686 RVA: 0x001FBA54 File Offset: 0x001F9C54
|
||||
[Token(Token = "0x170018BB")]
|
||||
public virtual DateTime NotBefore
|
||||
{
|
||||
[Token(Token = "0x6009B06")]
|
||||
[Address(RVA = "0x4157B0", Offset = "0x4147B0", VA = "0x1804157B0", Slot = "33")]
|
||||
get
|
||||
{
|
||||
return this.notBefore;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018BC RID: 6332
|
||||
// (get) Token: 0x06009B07 RID: 39687 RVA: 0x001FBA68 File Offset: 0x001F9C68
|
||||
[Token(Token = "0x170018BC")]
|
||||
public virtual DateTime NotAfter
|
||||
{
|
||||
[Token(Token = "0x6009B07")]
|
||||
[Address(RVA = "0x4157C0", Offset = "0x4147C0", VA = "0x1804157C0", Slot = "34")]
|
||||
get
|
||||
{
|
||||
return this.notAfter;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009B08 RID: 39688 RVA: 0x001FBA7C File Offset: 0x001F9C7C
|
||||
[Token(Token = "0x6009B08")]
|
||||
[Address(RVA = "0x423740", Offset = "0x422740", VA = "0x180423740", 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: 0x170018BD RID: 6333
|
||||
// (get) Token: 0x06009B09 RID: 39689 RVA: 0x001FBAF4 File Offset: 0x001F9CF4
|
||||
[Token(Token = "0x170018BD")]
|
||||
public virtual bool IsValidNow
|
||||
{
|
||||
[Token(Token = "0x6009B09")]
|
||||
[Address(RVA = "0x423DB0", Offset = "0x422DB0", VA = "0x180423DB0", Slot = "36")]
|
||||
get
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009B09)
|
||||
|
||||
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: 0x06009B0A RID: 39690 RVA: 0x001FBB10 File Offset: 0x001F9D10
|
||||
[Token(Token = "0x6009B0A")]
|
||||
[Address(RVA = "0x423960", Offset = "0x422960", VA = "0x180423960", Slot = "37")]
|
||||
public virtual bool IsValid(DateTime date)
|
||||
{
|
||||
AttributeCertificateIssuer issuer = this.Issuer;
|
||||
DateTime dateTime = this.NotBefore;
|
||||
int num;
|
||||
return num <= 0;
|
||||
}
|
||||
|
||||
// Token: 0x06009B0B RID: 39691 RVA: 0x001FBB38 File Offset: 0x001F9D38
|
||||
[Token(Token = "0x6009B0B")]
|
||||
[Address(RVA = "0x422F60", Offset = "0x421F60", VA = "0x180422F60", Slot = "38")]
|
||||
public virtual void CheckValidity()
|
||||
{
|
||||
DateTime utcNow = DateTime.UtcNow;
|
||||
int version = ((IX509AttributeCertificate)this).Version;
|
||||
}
|
||||
|
||||
// Token: 0x06009B0C RID: 39692 RVA: 0x001FBB54 File Offset: 0x001F9D54
|
||||
[Token(Token = "0x6009B0C")]
|
||||
[Address(RVA = "0x422FD0", Offset = "0x421FD0", VA = "0x180422FD0", Slot = "39")]
|
||||
public virtual void CheckValidity(DateTime date)
|
||||
{
|
||||
DateTime dateTime = this.NotBefore;
|
||||
AttributeCertificateIssuer issuer = this.Issuer;
|
||||
}
|
||||
|
||||
// Token: 0x170018BE RID: 6334
|
||||
// (get) Token: 0x06009B0D RID: 39693 RVA: 0x001FBB84 File Offset: 0x001F9D84
|
||||
[Token(Token = "0x170018BE")]
|
||||
public virtual AlgorithmIdentifier SignatureAlgorithm
|
||||
{
|
||||
[Token(Token = "0x6009B0D")]
|
||||
[Address(RVA = "0x423ED0", Offset = "0x422ED0", VA = "0x180423ED0", Slot = "40")]
|
||||
get
|
||||
{
|
||||
return this.cert.signatureAlgorithm;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009B0E RID: 39694 RVA: 0x001FBBA4 File Offset: 0x001F9DA4
|
||||
[Token(Token = "0x6009B0E")]
|
||||
[Address(RVA = "0x419790", Offset = "0x418790", VA = "0x180419790", Slot = "41")]
|
||||
public virtual byte[] GetSignature()
|
||||
{
|
||||
return this.cert.GetSignatureOctets();
|
||||
}
|
||||
|
||||
// Token: 0x06009B0F RID: 39695 RVA: 0x001FBBC4 File Offset: 0x001F9DC4
|
||||
[Token(Token = "0x6009B0F")]
|
||||
[Address(RVA = "0x423A50", Offset = "0x422A50", VA = "0x180423A50", Slot = "42")]
|
||||
public virtual void Verify(AsymmetricKeyParameter key)
|
||||
{
|
||||
Asn1VerifierFactory asn1VerifierFactory = new Asn1VerifierFactory(this.cert.signatureAlgorithm, key);
|
||||
int version = ((IX509AttributeCertificate)this).Version;
|
||||
}
|
||||
|
||||
// Token: 0x06009B10 RID: 39696 RVA: 0x001FBBF0 File Offset: 0x001F9DF0
|
||||
[Token(Token = "0x6009B10")]
|
||||
[Address(RVA = "0x4239D0", Offset = "0x4229D0", VA = "0x1804239D0", Slot = "43")]
|
||||
public virtual void Verify(IVerifierFactoryProvider verifierProvider)
|
||||
{
|
||||
AttributeCertificate attributeCertificate = this.cert;
|
||||
int version = ((IX509AttributeCertificate)this).Version;
|
||||
}
|
||||
|
||||
// Token: 0x06009B11 RID: 39697 RVA: 0x001FBC14 File Offset: 0x001F9E14
|
||||
[Token(Token = "0x6009B11")]
|
||||
[Address(RVA = "0x422C80", Offset = "0x421C80", VA = "0x180422C80", Slot = "44")]
|
||||
protected virtual void CheckSignature(IVerifierFactory verifier)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009B11)
|
||||
|
||||
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: 0x06009B12 RID: 39698 RVA: 0x001FBC6C File Offset: 0x001F9E6C
|
||||
[Token(Token = "0x6009B12")]
|
||||
[Address(RVA = "0x423720", Offset = "0x422720", VA = "0x180423720", Slot = "45")]
|
||||
public virtual byte[] GetEncoded()
|
||||
{
|
||||
return this.cert.GetEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x06009B13 RID: 39699 RVA: 0x001FBC8C File Offset: 0x001F9E8C
|
||||
[Token(Token = "0x6009B13")]
|
||||
[Address(RVA = "0x423930", Offset = "0x422930", VA = "0x180423930", Slot = "8")]
|
||||
protected override X509Extensions GetX509Extensions()
|
||||
{
|
||||
return this.cert.acinfo.extensions;
|
||||
}
|
||||
|
||||
// Token: 0x06009B14 RID: 39700 RVA: 0x001FBCB0 File Offset: 0x001F9EB0
|
||||
[Token(Token = "0x6009B14")]
|
||||
[Address(RVA = "0x4231F0", Offset = "0x4221F0", VA = "0x1804231F0", 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: 0x06009B15 RID: 39701 RVA: 0x001FBD04 File Offset: 0x001F9F04
|
||||
[Token(Token = "0x6009B15")]
|
||||
[Address(RVA = "0x423350", Offset = "0x422350", VA = "0x180423350", 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: 0x06009B16 RID: 39702 RVA: 0x001FBDBC File Offset: 0x001F9FBC
|
||||
[Token(Token = "0x6009B16")]
|
||||
[Address(RVA = "0x423130", Offset = "0x422130", VA = "0x180423130", Slot = "0")]
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj != this)
|
||||
{
|
||||
if (obj != 0 && obj != 0)
|
||||
{
|
||||
Asn1Object asn1Object = this.cert.ToAsn1Object();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x06009B17 RID: 39703 RVA: 0x001FBDEC File Offset: 0x001F9FEC
|
||||
[Token(Token = "0x6009B17")]
|
||||
[Address(RVA = "0x40F2B0", Offset = "0x40E2B0", VA = "0x18040F2B0", Slot = "2")]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
Asn1Object asn1Object = this.cert.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x04006865 RID: 26725
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006865")]
|
||||
private readonly AttributeCertificate cert;
|
||||
|
||||
// Token: 0x04006866 RID: 26726
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006866")]
|
||||
private readonly DateTime notBefore;
|
||||
|
||||
// Token: 0x04006867 RID: 26727
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4006867")]
|
||||
private readonly DateTime notAfter;
|
||||
}
|
||||
}
|
||||
+252
@@ -0,0 +1,252 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
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: 0x020019EE RID: 6638
|
||||
[Token(Token = "0x20019EE")]
|
||||
public class X509V2AttributeCertificateGenerator
|
||||
{
|
||||
// Token: 0x06009B18 RID: 39704 RVA: 0x001FBE0C File Offset: 0x001FA00C
|
||||
[Token(Token = "0x6009B18")]
|
||||
[Address(RVA = "0x63C250", Offset = "0x63B250", VA = "0x18063C250")]
|
||||
public X509V2AttributeCertificateGenerator()
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = new X509ExtensionsGenerator();
|
||||
this.extGenerator = x509ExtensionsGenerator;
|
||||
base..ctor();
|
||||
V2AttributeCertificateInfoGenerator v2AttributeCertificateInfoGenerator = new V2AttributeCertificateInfoGenerator();
|
||||
this.acInfoGen = v2AttributeCertificateInfoGenerator;
|
||||
}
|
||||
|
||||
// Token: 0x06009B19 RID: 39705 RVA: 0x001FBE3C File Offset: 0x001FA03C
|
||||
[Token(Token = "0x6009B19")]
|
||||
[Address(RVA = "0x63BEB0", Offset = "0x63AEB0", VA = "0x18063BEB0")]
|
||||
public void Reset()
|
||||
{
|
||||
V2AttributeCertificateInfoGenerator v2AttributeCertificateInfoGenerator = new V2AttributeCertificateInfoGenerator();
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
this.acInfoGen = v2AttributeCertificateInfoGenerator;
|
||||
x509ExtensionsGenerator.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x06009B1A RID: 39706 RVA: 0x001FBE6C File Offset: 0x001FA06C
|
||||
[Token(Token = "0x6009B1A")]
|
||||
[Address(RVA = "0x63BF20", Offset = "0x63AF20", VA = "0x18063BF20")]
|
||||
public void SetHolder(AttributeCertificateHolder holder)
|
||||
{
|
||||
V2AttributeCertificateInfoGenerator v2AttributeCertificateInfoGenerator = this.acInfoGen;
|
||||
Holder holder2 = holder.holder;
|
||||
v2AttributeCertificateInfoGenerator.holder = holder2;
|
||||
}
|
||||
|
||||
// Token: 0x06009B1B RID: 39707 RVA: 0x001FBE94 File Offset: 0x001FA094
|
||||
[Token(Token = "0x6009B1B")]
|
||||
[Address(RVA = "0x63BFB0", Offset = "0x63AFB0", VA = "0x18063BFB0")]
|
||||
public void SetIssuer(AttributeCertificateIssuer issuer)
|
||||
{
|
||||
V2AttributeCertificateInfoGenerator v2AttributeCertificateInfoGenerator = this.acInfoGen;
|
||||
AttCertIssuer instance = AttCertIssuer.GetInstance(issuer.form);
|
||||
v2AttributeCertificateInfoGenerator.issuer = instance;
|
||||
}
|
||||
|
||||
// Token: 0x06009B1C RID: 39708 RVA: 0x001FBEC4 File Offset: 0x001FA0C4
|
||||
[Token(Token = "0x6009B1C")]
|
||||
[Address(RVA = "0x63C0D0", Offset = "0x63B0D0", VA = "0x18063C0D0")]
|
||||
public void SetSerialNumber(BigInteger serialNumber)
|
||||
{
|
||||
V2AttributeCertificateInfoGenerator v2AttributeCertificateInfoGenerator = this.acInfoGen;
|
||||
DerInteger derInteger = new DerInteger(serialNumber);
|
||||
v2AttributeCertificateInfoGenerator.serialNumber = derInteger;
|
||||
}
|
||||
|
||||
// Token: 0x06009B1D RID: 39709 RVA: 0x001FBEEC File Offset: 0x001FA0EC
|
||||
[Token(Token = "0x6009B1D")]
|
||||
[Address(RVA = "0x63C060", Offset = "0x63B060", VA = "0x18063C060")]
|
||||
public void SetNotBefore(DateTime date)
|
||||
{
|
||||
V2AttributeCertificateInfoGenerator v2AttributeCertificateInfoGenerator = this.acInfoGen;
|
||||
DerGeneralizedTime derGeneralizedTime = new DerGeneralizedTime(date);
|
||||
v2AttributeCertificateInfoGenerator.startDate = derGeneralizedTime;
|
||||
}
|
||||
|
||||
// Token: 0x06009B1E RID: 39710 RVA: 0x001FBF14 File Offset: 0x001FA114
|
||||
[Token(Token = "0x6009B1E")]
|
||||
[Address(RVA = "0x63BFF0", Offset = "0x63AFF0", VA = "0x18063BFF0")]
|
||||
public void SetNotAfter(DateTime date)
|
||||
{
|
||||
V2AttributeCertificateInfoGenerator v2AttributeCertificateInfoGenerator = this.acInfoGen;
|
||||
DerGeneralizedTime derGeneralizedTime = new DerGeneralizedTime(date);
|
||||
v2AttributeCertificateInfoGenerator.endDate = derGeneralizedTime;
|
||||
}
|
||||
|
||||
// Token: 0x06009B1F RID: 39711 RVA: 0x001FBF3C File Offset: 0x001FA13C
|
||||
[Token(Token = "0x6009B1F")]
|
||||
[Address(RVA = "0x63C140", Offset = "0x63B140", VA = "0x18063C140")]
|
||||
[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: 0x06009B20 RID: 39712 RVA: 0x001FBF84 File Offset: 0x001FA184
|
||||
[Token(Token = "0x6009B20")]
|
||||
[Address(RVA = "0x63B880", Offset = "0x63A880", VA = "0x18063B880")]
|
||||
public void AddAttribute(X509Attribute attribute)
|
||||
{
|
||||
V2AttributeCertificateInfoGenerator v2AttributeCertificateInfoGenerator = this.acInfoGen;
|
||||
AttributeX509 instance = AttributeX509.GetInstance(attribute.ToAsn1Object());
|
||||
v2AttributeCertificateInfoGenerator.AddAttribute(instance);
|
||||
}
|
||||
|
||||
// Token: 0x06009B21 RID: 39713 RVA: 0x001FBFB4 File Offset: 0x001FA1B4
|
||||
[Token(Token = "0x6009B21")]
|
||||
[Address(RVA = "0x63BF50", Offset = "0x63AF50", VA = "0x18063BF50")]
|
||||
public void SetIssuerUniqueId(bool[] iui)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009B21)
|
||||
|
||||
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: 0x06009B22 RID: 39714 RVA: 0x001FBFCC File Offset: 0x001FA1CC
|
||||
[Token(Token = "0x6009B22")]
|
||||
[Address(RVA = "0x63B8D0", Offset = "0x63A8D0", VA = "0x18063B8D0")]
|
||||
public void AddExtension(string oid, bool critical, Asn1Encodable extensionValue)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
||||
x509ExtensionsGenerator.AddExtension(derObjectIdentifier, critical, extensionValue);
|
||||
}
|
||||
|
||||
// Token: 0x06009B23 RID: 39715 RVA: 0x001FBFF8 File Offset: 0x001FA1F8
|
||||
[Token(Token = "0x6009B23")]
|
||||
[Address(RVA = "0x63B980", Offset = "0x63A980", VA = "0x18063B980")]
|
||||
public void AddExtension(string oid, bool critical, byte[] extensionValue)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
||||
x509ExtensionsGenerator.AddExtension(derObjectIdentifier, critical, extensionValue);
|
||||
}
|
||||
|
||||
// Token: 0x06009B24 RID: 39716 RVA: 0x001FC024 File Offset: 0x001FA224
|
||||
[Token(Token = "0x6009B24")]
|
||||
[Address(RVA = "0x63BE20", Offset = "0x63AE20", VA = "0x18063BE20")]
|
||||
[Obsolete]
|
||||
public IX509AttributeCertificate Generate(AsymmetricKeyParameter privateKey)
|
||||
{
|
||||
int num;
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, num);
|
||||
num = 0;
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x06009B25 RID: 39717 RVA: 0x001FC048 File Offset: 0x001FA248
|
||||
[Token(Token = "0x6009B25")]
|
||||
[Address(RVA = "0x63BA30", Offset = "0x63AA30", VA = "0x18063BA30")]
|
||||
[Obsolete]
|
||||
public IX509AttributeCertificate Generate(AsymmetricKeyParameter privateKey, SecureRandom random)
|
||||
{
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, random);
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x06009B26 RID: 39718 RVA: 0x001FC06C File Offset: 0x001FA26C
|
||||
[Token(Token = "0x6009B26")]
|
||||
[Address(RVA = "0x63BAD0", Offset = "0x63AAD0", VA = "0x18063BAD0")]
|
||||
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: 0x170018BF RID: 6335
|
||||
// (get) Token: 0x06009B27 RID: 39719 RVA: 0x001FC10C File Offset: 0x001FA30C
|
||||
[Token(Token = "0x170018BF")]
|
||||
public IEnumerable SignatureAlgNames
|
||||
{
|
||||
[Token(Token = "0x6009B27")]
|
||||
[Address(RVA = "0x63C2D0", Offset = "0x63B2D0", VA = "0x18063C2D0")]
|
||||
get
|
||||
{
|
||||
return X509Utilities.GetAlgNames();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04006868 RID: 26728
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006868")]
|
||||
private readonly X509ExtensionsGenerator extGenerator;
|
||||
|
||||
// Token: 0x04006869 RID: 26729
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006869")]
|
||||
private V2AttributeCertificateInfoGenerator acInfoGen;
|
||||
|
||||
// Token: 0x0400686A RID: 26730
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400686A")]
|
||||
private DerObjectIdentifier sigOID;
|
||||
|
||||
// Token: 0x0400686B RID: 26731
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x400686B")]
|
||||
private AlgorithmIdentifier sigAlgId;
|
||||
|
||||
// Token: 0x0400686C RID: 26732
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x400686C")]
|
||||
private string signatureAlgorithm;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,310 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
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: 0x020019EF RID: 6639
|
||||
[Token(Token = "0x20019EF")]
|
||||
public class X509V2CrlGenerator
|
||||
{
|
||||
// Token: 0x06009B28 RID: 39720 RVA: 0x001FC120 File Offset: 0x001FA320
|
||||
[Token(Token = "0x6009B28")]
|
||||
[Address(RVA = "0x63D280", Offset = "0x63C280", VA = "0x18063D280")]
|
||||
public X509V2CrlGenerator()
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = new X509ExtensionsGenerator();
|
||||
this.extGenerator = x509ExtensionsGenerator;
|
||||
base..ctor();
|
||||
V2TbsCertListGenerator v2TbsCertListGenerator = new V2TbsCertListGenerator();
|
||||
this.tbsGen = v2TbsCertListGenerator;
|
||||
}
|
||||
|
||||
// Token: 0x06009B29 RID: 39721 RVA: 0x001FC150 File Offset: 0x001FA350
|
||||
[Token(Token = "0x6009B29")]
|
||||
[Address(RVA = "0x63D000", Offset = "0x63C000", VA = "0x18063D000")]
|
||||
public void Reset()
|
||||
{
|
||||
V2TbsCertListGenerator v2TbsCertListGenerator = new V2TbsCertListGenerator();
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
this.tbsGen = v2TbsCertListGenerator;
|
||||
x509ExtensionsGenerator.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x06009B2A RID: 39722 RVA: 0x001FC180 File Offset: 0x001FA380
|
||||
[Token(Token = "0x6009B2A")]
|
||||
[Address(RVA = "0x63D070", Offset = "0x63C070", VA = "0x18063D070")]
|
||||
public void SetIssuerDN(X509Name issuer)
|
||||
{
|
||||
this.tbsGen.issuer = issuer;
|
||||
}
|
||||
|
||||
// Token: 0x06009B2B RID: 39723 RVA: 0x001FC1A0 File Offset: 0x001FA3A0
|
||||
[Token(Token = "0x6009B2B")]
|
||||
[Address(RVA = "0x63D210", Offset = "0x63C210", VA = "0x18063D210")]
|
||||
public void SetThisUpdate(DateTime date)
|
||||
{
|
||||
V2TbsCertListGenerator v2TbsCertListGenerator = this.tbsGen;
|
||||
Time time = new Time(date);
|
||||
v2TbsCertListGenerator.thisUpdate = time;
|
||||
}
|
||||
|
||||
// Token: 0x06009B2C RID: 39724 RVA: 0x001FC1C8 File Offset: 0x001FA3C8
|
||||
[Token(Token = "0x6009B2C")]
|
||||
[Address(RVA = "0x63D090", Offset = "0x63C090", VA = "0x18063D090")]
|
||||
public void SetNextUpdate(DateTime date)
|
||||
{
|
||||
V2TbsCertListGenerator v2TbsCertListGenerator = this.tbsGen;
|
||||
Time time = new Time(date);
|
||||
v2TbsCertListGenerator.nextUpdate = time;
|
||||
}
|
||||
|
||||
// Token: 0x06009B2D RID: 39725 RVA: 0x001FC1F0 File Offset: 0x001FA3F0
|
||||
[Token(Token = "0x6009B2D")]
|
||||
[Address(RVA = "0x63C3E0", Offset = "0x63B3E0", VA = "0x18063C3E0")]
|
||||
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: 0x06009B2E RID: 39726 RVA: 0x001FC224 File Offset: 0x001FA424
|
||||
[Token(Token = "0x6009B2E")]
|
||||
[Address(RVA = "0x63C4A0", Offset = "0x63B4A0", VA = "0x18063C4A0")]
|
||||
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: 0x06009B2F RID: 39727 RVA: 0x001FC24C File Offset: 0x001FA44C
|
||||
[Token(Token = "0x6009B2F")]
|
||||
[Address(RVA = "0x63C320", Offset = "0x63B320", VA = "0x18063C320")]
|
||||
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: 0x06009B30 RID: 39728 RVA: 0x001FC280 File Offset: 0x001FA480
|
||||
[Token(Token = "0x6009B30")]
|
||||
[Address(RVA = "0x63C590", Offset = "0x63B590", VA = "0x18063C590")]
|
||||
public void AddCrl(X509Crl other)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009B30)
|
||||
|
||||
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_48:
|
||||
stloc:ArgumentNullException(var_5_52, 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: 0x06009B31 RID: 39729 RVA: 0x001FC2E0 File Offset: 0x001FA4E0
|
||||
[Token(Token = "0x6009B31")]
|
||||
[Address(RVA = "0x63D100", Offset = "0x63C100", VA = "0x18063D100")]
|
||||
[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: 0x06009B32 RID: 39730 RVA: 0x001FC32C File Offset: 0x001FA52C
|
||||
[Token(Token = "0x6009B32")]
|
||||
[Address(RVA = "0x63C920", Offset = "0x63B920", VA = "0x18063C920")]
|
||||
public void AddExtension(string oid, bool critical, Asn1Encodable extensionValue)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
||||
x509ExtensionsGenerator.AddExtension(derObjectIdentifier, critical, extensionValue);
|
||||
}
|
||||
|
||||
// Token: 0x06009B33 RID: 39731 RVA: 0x001FC358 File Offset: 0x001FA558
|
||||
[Token(Token = "0x6009B33")]
|
||||
[Address(RVA = "0x63C780", Offset = "0x63B780", VA = "0x18063C780")]
|
||||
public void AddExtension(DerObjectIdentifier oid, bool critical, Asn1Encodable extensionValue)
|
||||
{
|
||||
this.extGenerator.AddExtension(oid, critical, extensionValue);
|
||||
}
|
||||
|
||||
// Token: 0x06009B34 RID: 39732 RVA: 0x001FC37C File Offset: 0x001FA57C
|
||||
[Token(Token = "0x6009B34")]
|
||||
[Address(RVA = "0x63C860", Offset = "0x63B860", VA = "0x18063C860")]
|
||||
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: 0x06009B35 RID: 39733 RVA: 0x001FC3B0 File Offset: 0x001FA5B0
|
||||
[Token(Token = "0x6009B35")]
|
||||
[Address(RVA = "0x63C7B0", Offset = "0x63B7B0", VA = "0x18063C7B0")]
|
||||
public void AddExtension(DerObjectIdentifier oid, bool critical, byte[] extensionValue)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
DerOctetString derOctetString = new DerOctetString(extensionValue);
|
||||
x509ExtensionsGenerator.AddExtension(oid, critical, derOctetString);
|
||||
}
|
||||
|
||||
// Token: 0x06009B36 RID: 39734 RVA: 0x001FC3DC File Offset: 0x001FA5DC
|
||||
[Token(Token = "0x6009B36")]
|
||||
[Address(RVA = "0x63CF70", Offset = "0x63BF70", VA = "0x18063CF70")]
|
||||
[Obsolete]
|
||||
public X509Crl Generate(AsymmetricKeyParameter privateKey)
|
||||
{
|
||||
int num;
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, num);
|
||||
num = 0;
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x06009B37 RID: 39735 RVA: 0x001FC400 File Offset: 0x001FA600
|
||||
[Token(Token = "0x6009B37")]
|
||||
[Address(RVA = "0x63CBF0", Offset = "0x63BBF0", VA = "0x18063CBF0")]
|
||||
[Obsolete]
|
||||
public X509Crl Generate(AsymmetricKeyParameter privateKey, SecureRandom random)
|
||||
{
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, random);
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x06009B38 RID: 39736 RVA: 0x001FC424 File Offset: 0x001FA624
|
||||
[Token(Token = "0x6009B38")]
|
||||
[Address(RVA = "0x63CC90", Offset = "0x63BC90", VA = "0x18063CC90")]
|
||||
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: 0x06009B39 RID: 39737 RVA: 0x001FC4A8 File Offset: 0x001FA6A8
|
||||
[Token(Token = "0x6009B39")]
|
||||
[Address(RVA = "0x63C9D0", Offset = "0x63B9D0", VA = "0x18063C9D0")]
|
||||
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: 0x06009B3A RID: 39738 RVA: 0x001FC4F0 File Offset: 0x001FA6F0
|
||||
[Token(Token = "0x6009B3A")]
|
||||
[Address(RVA = "0x63CA30", Offset = "0x63BA30", VA = "0x18063CA30")]
|
||||
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: 0x170018C0 RID: 6336
|
||||
// (get) Token: 0x06009B3B RID: 39739 RVA: 0x001FC548 File Offset: 0x001FA748
|
||||
[Token(Token = "0x170018C0")]
|
||||
public IEnumerable SignatureAlgNames
|
||||
{
|
||||
[Token(Token = "0x6009B3B")]
|
||||
[Address(RVA = "0x63D300", Offset = "0x63C300", VA = "0x18063D300")]
|
||||
get
|
||||
{
|
||||
return X509Utilities.GetAlgNames();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400686D RID: 26733
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400686D")]
|
||||
private readonly X509ExtensionsGenerator extGenerator;
|
||||
|
||||
// Token: 0x0400686E RID: 26734
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400686E")]
|
||||
private V2TbsCertListGenerator tbsGen;
|
||||
|
||||
// Token: 0x0400686F RID: 26735
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400686F")]
|
||||
private DerObjectIdentifier sigOID;
|
||||
|
||||
// Token: 0x04006870 RID: 26736
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4006870")]
|
||||
private AlgorithmIdentifier sigAlgId;
|
||||
|
||||
// Token: 0x04006871 RID: 26737
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4006871")]
|
||||
private string signatureAlgorithm;
|
||||
}
|
||||
}
|
||||
+363
@@ -0,0 +1,363 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
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: 0x020019F0 RID: 6640
|
||||
[Token(Token = "0x20019F0")]
|
||||
public class X509V3CertificateGenerator
|
||||
{
|
||||
// Token: 0x06009B3C RID: 39740 RVA: 0x001FC55C File Offset: 0x001FA75C
|
||||
[Token(Token = "0x6009B3C")]
|
||||
[Address(RVA = "0x63E0C0", Offset = "0x63D0C0", VA = "0x18063E0C0")]
|
||||
public X509V3CertificateGenerator()
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = new X509ExtensionsGenerator();
|
||||
this.extGenerator = x509ExtensionsGenerator;
|
||||
base..ctor();
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = new V3TbsCertificateGenerator();
|
||||
this.tbsGen = v3TbsCertificateGenerator;
|
||||
}
|
||||
|
||||
// Token: 0x06009B3D RID: 39741 RVA: 0x001FC58C File Offset: 0x001FA78C
|
||||
[Token(Token = "0x6009B3D")]
|
||||
[Address(RVA = "0x63DCC0", Offset = "0x63CCC0", VA = "0x18063DCC0")]
|
||||
public void Reset()
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = new V3TbsCertificateGenerator();
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
this.tbsGen = v3TbsCertificateGenerator;
|
||||
x509ExtensionsGenerator.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x06009B3E RID: 39742 RVA: 0x001FC5BC File Offset: 0x001FA7BC
|
||||
[Token(Token = "0x6009B3E")]
|
||||
[Address(RVA = "0x63DE90", Offset = "0x63CE90", VA = "0x18063DE90")]
|
||||
public void SetSerialNumber(BigInteger serialNumber)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009B3E)
|
||||
|
||||
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: 0x06009B3F RID: 39743 RVA: 0x001FC600 File Offset: 0x001FA800
|
||||
[Token(Token = "0x6009B3F")]
|
||||
[Address(RVA = "0x63DD30", Offset = "0x63CD30", VA = "0x18063DD30")]
|
||||
public void SetIssuerDN(X509Name issuer)
|
||||
{
|
||||
this.tbsGen.issuer = issuer;
|
||||
}
|
||||
|
||||
// Token: 0x06009B40 RID: 39744 RVA: 0x001FC620 File Offset: 0x001FA820
|
||||
[Token(Token = "0x6009B40")]
|
||||
[Address(RVA = "0x63DDF0", Offset = "0x63CDF0", VA = "0x18063DDF0")]
|
||||
public void SetNotBefore(DateTime date)
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = this.tbsGen;
|
||||
Time time = new Time(date);
|
||||
v3TbsCertificateGenerator.startDate = time;
|
||||
}
|
||||
|
||||
// Token: 0x06009B41 RID: 39745 RVA: 0x001FC648 File Offset: 0x001FA848
|
||||
[Token(Token = "0x6009B41")]
|
||||
[Address(RVA = "0x63DD80", Offset = "0x63CD80", VA = "0x18063DD80")]
|
||||
public void SetNotAfter(DateTime date)
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = this.tbsGen;
|
||||
Time time = new Time(date);
|
||||
v3TbsCertificateGenerator.endDate = time;
|
||||
}
|
||||
|
||||
// Token: 0x06009B42 RID: 39746 RVA: 0x001FC670 File Offset: 0x001FA870
|
||||
[Token(Token = "0x6009B42")]
|
||||
[Address(RVA = "0x63E070", Offset = "0x63D070", VA = "0x18063E070")]
|
||||
public void SetSubjectDN(X509Name subject)
|
||||
{
|
||||
this.tbsGen.subject = subject;
|
||||
}
|
||||
|
||||
// Token: 0x06009B43 RID: 39747 RVA: 0x001FC690 File Offset: 0x001FA890
|
||||
[Token(Token = "0x6009B43")]
|
||||
[Address(RVA = "0x63DE60", Offset = "0x63CE60", VA = "0x18063DE60")]
|
||||
public void SetPublicKey(AsymmetricKeyParameter publicKey)
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = this.tbsGen;
|
||||
SubjectPublicKeyInfo subjectPublicKeyInfo = SubjectPublicKeyInfoFactory.CreateSubjectPublicKeyInfo(publicKey);
|
||||
v3TbsCertificateGenerator.subjectPublicKeyInfo = subjectPublicKeyInfo;
|
||||
}
|
||||
|
||||
// Token: 0x06009B44 RID: 39748 RVA: 0x001FC6B8 File Offset: 0x001FA8B8
|
||||
[Token(Token = "0x6009B44")]
|
||||
[Address(RVA = "0x63DF50", Offset = "0x63CF50", VA = "0x18063DF50")]
|
||||
[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: 0x06009B45 RID: 39749 RVA: 0x001FC708 File Offset: 0x001FA908
|
||||
[Token(Token = "0x6009B45")]
|
||||
[Address(RVA = "0x63E090", Offset = "0x63D090", VA = "0x18063E090")]
|
||||
public void SetSubjectUniqueID(bool[] uniqueID)
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = this.tbsGen;
|
||||
DerBitString derBitString = this.booleanToBitString(uniqueID);
|
||||
v3TbsCertificateGenerator.subjectUniqueID = derBitString;
|
||||
}
|
||||
|
||||
// Token: 0x06009B46 RID: 39750 RVA: 0x001FC734 File Offset: 0x001FA934
|
||||
[Token(Token = "0x6009B46")]
|
||||
[Address(RVA = "0x63DD50", Offset = "0x63CD50", VA = "0x18063DD50")]
|
||||
public void SetIssuerUniqueID(bool[] uniqueID)
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = this.tbsGen;
|
||||
DerBitString derBitString = this.booleanToBitString(uniqueID);
|
||||
v3TbsCertificateGenerator.issuerUniqueID = derBitString;
|
||||
}
|
||||
|
||||
// Token: 0x06009B47 RID: 39751 RVA: 0x001FC760 File Offset: 0x001FA960
|
||||
[Token(Token = "0x6009B47")]
|
||||
[Address(RVA = "0x63E140", Offset = "0x63D140", VA = "0x18063E140")]
|
||||
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: 0x06009B48 RID: 39752 RVA: 0x001FC7CC File Offset: 0x001FA9CC
|
||||
[Token(Token = "0x6009B48")]
|
||||
[Address(RVA = "0x63D4C0", Offset = "0x63C4C0", VA = "0x18063D4C0")]
|
||||
public void AddExtension(string oid, bool critical, Asn1Encodable extensionValue)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
||||
x509ExtensionsGenerator.AddExtension(derObjectIdentifier, critical, extensionValue);
|
||||
}
|
||||
|
||||
// Token: 0x06009B49 RID: 39753 RVA: 0x001FC7F8 File Offset: 0x001FA9F8
|
||||
[Token(Token = "0x6009B49")]
|
||||
[Address(RVA = "0x63C780", Offset = "0x63B780", VA = "0x18063C780")]
|
||||
public void AddExtension(DerObjectIdentifier oid, bool critical, Asn1Encodable extensionValue)
|
||||
{
|
||||
this.extGenerator.AddExtension(oid, critical, extensionValue);
|
||||
}
|
||||
|
||||
// Token: 0x06009B4A RID: 39754 RVA: 0x001FC81C File Offset: 0x001FAA1C
|
||||
[Token(Token = "0x6009B4A")]
|
||||
[Address(RVA = "0x63D350", Offset = "0x63C350", VA = "0x18063D350")]
|
||||
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: 0x06009B4B RID: 39755 RVA: 0x001FC850 File Offset: 0x001FAA50
|
||||
[Token(Token = "0x6009B4B")]
|
||||
[Address(RVA = "0x63D410", Offset = "0x63C410", VA = "0x18063D410")]
|
||||
public void AddExtension(DerObjectIdentifier oid, bool critical, byte[] extensionValue)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
DerOctetString derOctetString = new DerOctetString(extensionValue);
|
||||
x509ExtensionsGenerator.AddExtension(oid, critical, derOctetString);
|
||||
}
|
||||
|
||||
// Token: 0x06009B4C RID: 39756 RVA: 0x001FC87C File Offset: 0x001FAA7C
|
||||
[Token(Token = "0x6009B4C")]
|
||||
[Address(RVA = "0x63D6D0", Offset = "0x63C6D0", VA = "0x18063D6D0")]
|
||||
public void CopyAndAddExtension(string oid, bool critical, X509Certificate cert)
|
||||
{
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
||||
this.CopyAndAddExtension(derObjectIdentifier, critical, cert);
|
||||
}
|
||||
|
||||
// Token: 0x06009B4D RID: 39757 RVA: 0x001FC89C File Offset: 0x001FAA9C
|
||||
[Token(Token = "0x6009B4D")]
|
||||
[Address(RVA = "0x63D570", Offset = "0x63C570", VA = "0x18063D570")]
|
||||
public void CopyAndAddExtension(DerObjectIdentifier oid, bool critical, X509Certificate cert)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009B4D)
|
||||
|
||||
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: 0x06009B4E RID: 39758 RVA: 0x001FC8E4 File Offset: 0x001FAAE4
|
||||
[Token(Token = "0x6009B4E")]
|
||||
[Address(RVA = "0x63DC30", Offset = "0x63CC30", VA = "0x18063DC30")]
|
||||
[Obsolete]
|
||||
public X509Certificate Generate(AsymmetricKeyParameter privateKey)
|
||||
{
|
||||
int num;
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, num);
|
||||
num = 0;
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x06009B4F RID: 39759 RVA: 0x001FC908 File Offset: 0x001FAB08
|
||||
[Token(Token = "0x6009B4F")]
|
||||
[Address(RVA = "0x63D830", Offset = "0x63C830", VA = "0x18063D830")]
|
||||
[Obsolete]
|
||||
public X509Certificate Generate(AsymmetricKeyParameter privateKey, SecureRandom random)
|
||||
{
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, random);
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x06009B50 RID: 39760 RVA: 0x001FC92C File Offset: 0x001FAB2C
|
||||
[Token(Token = "0x6009B50")]
|
||||
[Address(RVA = "0x63D8D0", Offset = "0x63C8D0", VA = "0x18063D8D0")]
|
||||
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: 0x06009B51 RID: 39761 RVA: 0x001FC9BC File Offset: 0x001FABBC
|
||||
[Token(Token = "0x6009B51")]
|
||||
[Address(RVA = "0x63D770", Offset = "0x63C770", VA = "0x18063D770")]
|
||||
private X509Certificate GenerateJcaObject(TbsCertificateStructure tbsCert, AlgorithmIdentifier sigAlg, byte[] signature)
|
||||
{
|
||||
DerBitString derBitString = new DerBitString(signature);
|
||||
return new X509Certificate(new X509CertificateStructure(tbsCert, sigAlg, derBitString));
|
||||
}
|
||||
|
||||
// Token: 0x170018C1 RID: 6337
|
||||
// (get) Token: 0x06009B52 RID: 39762 RVA: 0x001FC9E0 File Offset: 0x001FABE0
|
||||
[Token(Token = "0x170018C1")]
|
||||
public IEnumerable SignatureAlgNames
|
||||
{
|
||||
[Token(Token = "0x6009B52")]
|
||||
[Address(RVA = "0x63E290", Offset = "0x63D290", VA = "0x18063E290")]
|
||||
get
|
||||
{
|
||||
return X509Utilities.GetAlgNames();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04006872 RID: 26738
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006872")]
|
||||
private readonly X509ExtensionsGenerator extGenerator;
|
||||
|
||||
// Token: 0x04006873 RID: 26739
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006873")]
|
||||
private V3TbsCertificateGenerator tbsGen;
|
||||
|
||||
// Token: 0x04006874 RID: 26740
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4006874")]
|
||||
private DerObjectIdentifier sigOid;
|
||||
|
||||
// Token: 0x04006875 RID: 26741
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4006875")]
|
||||
private AlgorithmIdentifier sigAlgId;
|
||||
|
||||
// Token: 0x04006876 RID: 26742
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4006876")]
|
||||
private string signatureAlgorithm;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user