oh dear
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: 0x020018F8 RID: 6392
|
||||
[Token(Token = "0x20018F8")]
|
||||
public class AttributeCertificateHolder : IX509Selector, ICloneable
|
||||
{
|
||||
// Token: 0x0600965A RID: 38490 RVA: 0x001EED74 File Offset: 0x001ECF74
|
||||
[Token(Token = "0x600965A")]
|
||||
[Address(RVA = "0x1622F60", Offset = "0x1621D60", VA = "0x181622F60")]
|
||||
internal AttributeCertificateHolder(Asn1Sequence seq)
|
||||
{
|
||||
Holder instance = Holder.GetInstance(seq);
|
||||
this.holder = instance;
|
||||
}
|
||||
|
||||
// Token: 0x0600965B RID: 38491 RVA: 0x001EED98 File Offset: 0x001ECF98
|
||||
[Token(Token = "0x600965B")]
|
||||
[Address(RVA = "0x1622F90", Offset = "0x1621D90", VA = "0x181622F90")]
|
||||
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: 0x0600965C RID: 38492 RVA: 0x001EEDD0 File Offset: 0x001ECFD0
|
||||
[Token(Token = "0x600965C")]
|
||||
[Address(RVA = "0x1622E00", Offset = "0x1621C00", VA = "0x181622E00")]
|
||||
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: 0x0600965D RID: 38493 RVA: 0x001EEE18 File Offset: 0x001ED018
|
||||
[Token(Token = "0x600965D")]
|
||||
[Address(RVA = "0x1622D80", Offset = "0x1621B80", VA = "0x181622D80")]
|
||||
public AttributeCertificateHolder(X509Name principal)
|
||||
{
|
||||
Holder holder = new Holder(this.GenerateGeneralNames(principal));
|
||||
this.holder = holder;
|
||||
}
|
||||
|
||||
// Token: 0x0600965E RID: 38494 RVA: 0x001EEE40 File Offset: 0x001ED040
|
||||
[Token(Token = "0x600965E")]
|
||||
[Address(RVA = "0x1623060", Offset = "0x1621E60", VA = "0x181623060")]
|
||||
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: 0x170017F5 RID: 6133
|
||||
// (get) Token: 0x0600965F RID: 38495 RVA: 0x001EEE7C File Offset: 0x001ED07C
|
||||
[Token(Token = "0x170017F5")]
|
||||
public int DigestedObjectType
|
||||
{
|
||||
[Token(Token = "0x600965F")]
|
||||
[Address(RVA = "0x16231D0", Offset = "0x1621FD0", VA = "0x1816231D0")]
|
||||
get
|
||||
{
|
||||
ObjectDigestInfo objectDigestInfo = this.holder.objectDigestInfo;
|
||||
if (objectDigestInfo == 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return objectDigestInfo.digestedObjectType.Value.IntValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170017F6 RID: 6134
|
||||
// (get) Token: 0x06009660 RID: 38496 RVA: 0x001EEEB4 File Offset: 0x001ED0B4
|
||||
[Token(Token = "0x170017F6")]
|
||||
public string DigestAlgorithm
|
||||
{
|
||||
[Token(Token = "0x6009660")]
|
||||
[Address(RVA = "0x1623180", Offset = "0x1621F80", VA = "0x181623180")]
|
||||
get
|
||||
{
|
||||
ObjectDigestInfo objectDigestInfo = this.holder.objectDigestInfo;
|
||||
if (objectDigestInfo == 0)
|
||||
{
|
||||
}
|
||||
Asn1Object asn1Object = objectDigestInfo.digestAlgorithm.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009661 RID: 38497 RVA: 0x001EEEE4 File Offset: 0x001ED0E4
|
||||
[Token(Token = "0x6009661")]
|
||||
[Address(RVA = "0x16223A0", Offset = "0x16211A0", VA = "0x1816223A0")]
|
||||
public byte[] GetObjectDigest()
|
||||
{
|
||||
ObjectDigestInfo objectDigestInfo = this.holder.objectDigestInfo;
|
||||
if (objectDigestInfo == 0)
|
||||
{
|
||||
}
|
||||
Asn1Object asn1Object = objectDigestInfo.objectDigest.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x170017F7 RID: 6135
|
||||
// (get) Token: 0x06009662 RID: 38498 RVA: 0x001EEF14 File Offset: 0x001ED114
|
||||
[Token(Token = "0x170017F7")]
|
||||
public string OtherObjectTypeID
|
||||
{
|
||||
[Token(Token = "0x6009662")]
|
||||
[Address(RVA = "0x1623220", Offset = "0x1622020", VA = "0x181623220")]
|
||||
get
|
||||
{
|
||||
ObjectDigestInfo objectDigestInfo = this.holder.objectDigestInfo;
|
||||
if (objectDigestInfo == 0)
|
||||
{
|
||||
}
|
||||
return objectDigestInfo.otherObjectTypeID.identifier;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009663 RID: 38499 RVA: 0x001EEF44 File Offset: 0x001ED144
|
||||
[Token(Token = "0x6009663")]
|
||||
[Address(RVA = "0x1622120", Offset = "0x1620F20", VA = "0x181622120")]
|
||||
private GeneralNames GenerateGeneralNames(X509Name principal)
|
||||
{
|
||||
return new GeneralNames(new GeneralName(principal));
|
||||
}
|
||||
|
||||
// Token: 0x06009664 RID: 38500 RVA: 0x001EEF5C File Offset: 0x001ED15C
|
||||
[Token(Token = "0x6009664")]
|
||||
[Address(RVA = "0x1622C30", Offset = "0x1621A30", VA = "0x181622C30")]
|
||||
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: 0x06009665 RID: 38501 RVA: 0x001EEFB0 File Offset: 0x001ED1B0
|
||||
[Token(Token = "0x6009665")]
|
||||
[Address(RVA = "0x1622210", Offset = "0x1621010", VA = "0x181622210")]
|
||||
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: 0x06009666 RID: 38502 RVA: 0x001EF02C File Offset: 0x001ED22C
|
||||
[Token(Token = "0x6009666")]
|
||||
[Address(RVA = "0x16223E0", Offset = "0x16211E0", VA = "0x1816223E0")]
|
||||
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: 0x06009667 RID: 38503 RVA: 0x001EF150 File Offset: 0x001ED350
|
||||
[Token(Token = "0x6009667")]
|
||||
[Address(RVA = "0x1622190", Offset = "0x1620F90", VA = "0x181622190")]
|
||||
public X509Name[] GetEntityNames()
|
||||
{
|
||||
GeneralNames entityName = this.holder.entityName;
|
||||
if (entityName == 0)
|
||||
{
|
||||
}
|
||||
return this.GetPrincipals(entityName);
|
||||
}
|
||||
|
||||
// Token: 0x06009668 RID: 38504 RVA: 0x001EF17C File Offset: 0x001ED37C
|
||||
[Token(Token = "0x6009668")]
|
||||
[Address(RVA = "0x16221D0", Offset = "0x1620FD0", VA = "0x1816221D0")]
|
||||
public X509Name[] GetIssuer()
|
||||
{
|
||||
IssuerSerial baseCertificateID = this.holder.baseCertificateID;
|
||||
if (baseCertificateID == 0)
|
||||
{
|
||||
}
|
||||
GeneralNames issuer = baseCertificateID.issuer;
|
||||
return this.GetPrincipals(issuer);
|
||||
}
|
||||
|
||||
// Token: 0x170017F8 RID: 6136
|
||||
// (get) Token: 0x06009669 RID: 38505 RVA: 0x001EF1B0 File Offset: 0x001ED3B0
|
||||
[Token(Token = "0x170017F8")]
|
||||
public BigInteger SerialNumber
|
||||
{
|
||||
[Token(Token = "0x6009669")]
|
||||
[Address(RVA = "0x1623260", Offset = "0x1622060", VA = "0x181623260")]
|
||||
get
|
||||
{
|
||||
IssuerSerial baseCertificateID = this.holder.baseCertificateID;
|
||||
if (baseCertificateID == 0)
|
||||
{
|
||||
}
|
||||
return baseCertificateID.serial.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600966A RID: 38506 RVA: 0x001EF1E0 File Offset: 0x001ED3E0
|
||||
[Token(Token = "0x600966A")]
|
||||
[Address(RVA = "0x1621F30", Offset = "0x1620D30", VA = "0x181621F30", 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: 0x0600966B RID: 38507 RVA: 0x001EF218 File Offset: 0x001ED418
|
||||
[Token(Token = "0x600966B")]
|
||||
[Address(RVA = "0x1622740", Offset = "0x1621540", VA = "0x181622740")]
|
||||
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: 0x0600966C RID: 38508 RVA: 0x001EF3E0 File Offset: 0x001ED5E0
|
||||
[Token(Token = "0x600966C")]
|
||||
[Address(RVA = "0x1622010", Offset = "0x1620E10", VA = "0x181622010", 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: 0x0600966D RID: 38509 RVA: 0x001EF418 File Offset: 0x001ED618
|
||||
[Token(Token = "0x600966D")]
|
||||
[Address(RVA = "0x4DA700", Offset = "0x4D9500", VA = "0x1804DA700", Slot = "2")]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
Asn1Object asn1Object = this.holder.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600966E RID: 38510 RVA: 0x001EF438 File Offset: 0x001ED638
|
||||
[Token(Token = "0x600966E")]
|
||||
[Address(RVA = "0x1622B50", Offset = "0x1621950", VA = "0x181622B50", Slot = "4")]
|
||||
public bool Match(object obj)
|
||||
{
|
||||
while (obj != 0 && obj != 0)
|
||||
{
|
||||
if (obj != 0)
|
||||
{
|
||||
bool flag;
|
||||
return flag;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04006676 RID: 26230
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006676")]
|
||||
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: 0x020018F9 RID: 6393
|
||||
[Token(Token = "0x20018F9")]
|
||||
public class AttributeCertificateIssuer : IX509Selector, ICloneable
|
||||
{
|
||||
// Token: 0x0600966F RID: 38511 RVA: 0x001EF458 File Offset: 0x001ED658
|
||||
[Token(Token = "0x600966F")]
|
||||
[Address(RVA = "0x1623DD0", Offset = "0x1622BD0", VA = "0x181623DD0")]
|
||||
public AttributeCertificateIssuer(AttCertIssuer issuer)
|
||||
{
|
||||
Asn1Encodable obj = issuer.obj;
|
||||
this.form = obj;
|
||||
}
|
||||
|
||||
// Token: 0x06009670 RID: 38512 RVA: 0x001EF480 File Offset: 0x001ED680
|
||||
[Token(Token = "0x6009670")]
|
||||
[Address(RVA = "0x1623D20", Offset = "0x1622B20", VA = "0x181623D20")]
|
||||
public AttributeCertificateIssuer(X509Name principal)
|
||||
{
|
||||
V2Form v2Form = new V2Form(new GeneralNames(new GeneralName(principal)));
|
||||
this.form = v2Form;
|
||||
}
|
||||
|
||||
// Token: 0x06009671 RID: 38513 RVA: 0x001EF4AC File Offset: 0x001ED6AC
|
||||
[Token(Token = "0x6009671")]
|
||||
[Address(RVA = "0x1623420", Offset = "0x1622220", VA = "0x181623420")]
|
||||
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: 0x06009672 RID: 38514 RVA: 0x001EF554 File Offset: 0x001ED754
|
||||
[Token(Token = "0x6009672")]
|
||||
[Address(RVA = "0x16236E0", Offset = "0x16224E0", VA = "0x1816236E0")]
|
||||
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: 0x06009673 RID: 38515 RVA: 0x001EF5E8 File Offset: 0x001ED7E8
|
||||
[Token(Token = "0x6009673")]
|
||||
[Address(RVA = "0x1623BD0", Offset = "0x16229D0", VA = "0x181623BD0")]
|
||||
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: 0x06009674 RID: 38516 RVA: 0x001EF63C File Offset: 0x001ED83C
|
||||
[Token(Token = "0x6009674")]
|
||||
[Address(RVA = "0x16232A0", Offset = "0x16220A0", VA = "0x1816232A0", Slot = "5")]
|
||||
public object Clone()
|
||||
{
|
||||
Asn1Encodable obj = AttCertIssuer.GetInstance(this.form).obj;
|
||||
AttributeCertificateIssuer attributeCertificateIssuer;
|
||||
attributeCertificateIssuer.form = obj;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009675 RID: 38517 RVA: 0x001EF668 File Offset: 0x001ED868
|
||||
[Token(Token = "0x6009675")]
|
||||
[Address(RVA = "0x16238D0", Offset = "0x16226D0", VA = "0x1816238D0")]
|
||||
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: 0x06009676 RID: 38518 RVA: 0x001EF6D0 File Offset: 0x001ED8D0
|
||||
[Token(Token = "0x6009676")]
|
||||
[Address(RVA = "0x1623310", Offset = "0x1622110", VA = "0x181623310", 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: 0x06009677 RID: 38519 RVA: 0x001EF708 File Offset: 0x001ED908
|
||||
[Token(Token = "0x6009677")]
|
||||
[Address(RVA = "0x4DA700", Offset = "0x4D9500", VA = "0x1804DA700", Slot = "2")]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
Asn1Object asn1Object = this.form.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009678 RID: 38520 RVA: 0x001EF728 File Offset: 0x001ED928
|
||||
[Token(Token = "0x6009678")]
|
||||
[Address(RVA = "0x1623AF0", Offset = "0x16228F0", VA = "0x181623AF0", Slot = "4")]
|
||||
public bool Match(object obj)
|
||||
{
|
||||
while (obj != 0 && obj != 0)
|
||||
{
|
||||
if (obj != 0)
|
||||
{
|
||||
bool flag;
|
||||
return flag;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04006677 RID: 26231
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006677")]
|
||||
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: 0x0200191D RID: 6429
|
||||
[Token(Token = "0x200191D")]
|
||||
public class AuthorityKeyIdentifierStructure : AuthorityKeyIdentifier
|
||||
{
|
||||
// Token: 0x060097FC RID: 38908 RVA: 0x001F4F18 File Offset: 0x001F3118
|
||||
[Token(Token = "0x60097FC")]
|
||||
[Address(RVA = "0x1624300", Offset = "0x1623100", VA = "0x181624300")]
|
||||
public AuthorityKeyIdentifierStructure(Asn1OctetString encodedValue)
|
||||
{
|
||||
Asn1Object asn1Object;
|
||||
do
|
||||
{
|
||||
Stream octetStream = encodedValue.GetOctetStream();
|
||||
if (asn1Object == 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (asn1Object == 0);
|
||||
}
|
||||
|
||||
// Token: 0x060097FD RID: 38909 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x60097FD")]
|
||||
[Address(RVA = "0x1623E10", Offset = "0x1622C10", VA = "0x181623E10")]
|
||||
private static Asn1Sequence FromCertificate(X509Certificate certificate)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x060097FE RID: 38910 RVA: 0x001F4F3C File Offset: 0x001F313C
|
||||
[Token(Token = "0x60097FE")]
|
||||
[Address(RVA = "0x16241D0", Offset = "0x1622FD0", VA = "0x1816241D0")]
|
||||
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: 0x060097FF RID: 38911 RVA: 0x001F4F70 File Offset: 0x001F3170
|
||||
[Token(Token = "0x60097FF")]
|
||||
[Address(RVA = "0x16243F0", Offset = "0x16231F0", VA = "0x1816243F0")]
|
||||
public AuthorityKeyIdentifierStructure(X509Certificate certificate)
|
||||
{
|
||||
Asn1Sequence asn1Sequence = AuthorityKeyIdentifierStructure.FromCertificate(certificate);
|
||||
base..ctor(asn1Sequence);
|
||||
}
|
||||
|
||||
// Token: 0x06009800 RID: 38912 RVA: 0x001F4F8C File Offset: 0x001F318C
|
||||
[Token(Token = "0x6009800")]
|
||||
[Address(RVA = "0x16243C0", Offset = "0x16231C0", VA = "0x1816243C0")]
|
||||
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: 0x0200191E RID: 6430
|
||||
[Token(Token = "0x200191E")]
|
||||
public class SubjectKeyIdentifierStructure : SubjectKeyIdentifier
|
||||
{
|
||||
// Token: 0x06009801 RID: 38913 RVA: 0x001F4FA8 File Offset: 0x001F31A8
|
||||
[Token(Token = "0x6009801")]
|
||||
[Address(RVA = "0x1625DC0", Offset = "0x1624BC0", VA = "0x181625DC0")]
|
||||
public SubjectKeyIdentifierStructure(Asn1OctetString encodedValue)
|
||||
{
|
||||
Asn1Object asn1Object;
|
||||
do
|
||||
{
|
||||
Stream octetStream = encodedValue.GetOctetStream();
|
||||
if (asn1Object == 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (asn1Object == 0);
|
||||
}
|
||||
|
||||
// Token: 0x06009802 RID: 38914 RVA: 0x001F4FCC File Offset: 0x001F31CC
|
||||
[Token(Token = "0x6009802")]
|
||||
[Address(RVA = "0x1625C70", Offset = "0x1624A70", VA = "0x181625C70")]
|
||||
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: 0x06009803 RID: 38915 RVA: 0x001F5008 File Offset: 0x001F3208
|
||||
[Token(Token = "0x6009803")]
|
||||
[Address(RVA = "0x1625E80", Offset = "0x1624C80", VA = "0x181625E80")]
|
||||
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: 0x0200191F RID: 6431
|
||||
[Token(Token = "0x200191F")]
|
||||
public class X509ExtensionUtilities
|
||||
{
|
||||
// Token: 0x06009804 RID: 38916 RVA: 0x001F5024 File Offset: 0x001F3224
|
||||
[Token(Token = "0x6009804")]
|
||||
[Address(RVA = "0x1631EC0", Offset = "0x1630CC0", VA = "0x181631EC0")]
|
||||
public static Asn1Object FromExtensionValue(Asn1OctetString extensionValue)
|
||||
{
|
||||
Stream octetStream = extensionValue.GetOctetStream();
|
||||
Asn1Object asn1Object;
|
||||
return asn1Object;
|
||||
}
|
||||
|
||||
// Token: 0x06009805 RID: 38917 RVA: 0x001F5040 File Offset: 0x001F3240
|
||||
[Token(Token = "0x6009805")]
|
||||
[Address(RVA = "0x1632380", Offset = "0x1631180", VA = "0x181632380")]
|
||||
public static ICollection GetIssuerAlternativeNames(X509Certificate cert)
|
||||
{
|
||||
ISet criticalExtensionOids = cert.GetCriticalExtensionOids();
|
||||
ICollection collection;
|
||||
return collection;
|
||||
}
|
||||
|
||||
// Token: 0x06009806 RID: 38918 RVA: 0x001F505C File Offset: 0x001F325C
|
||||
[Token(Token = "0x6009806")]
|
||||
[Address(RVA = "0x1632410", Offset = "0x1631210", VA = "0x181632410")]
|
||||
public static ICollection GetSubjectAlternativeNames(X509Certificate cert)
|
||||
{
|
||||
ISet criticalExtensionOids = cert.GetCriticalExtensionOids();
|
||||
ICollection collection;
|
||||
return collection;
|
||||
}
|
||||
|
||||
// Token: 0x06009807 RID: 38919 RVA: 0x001F5078 File Offset: 0x001F3278
|
||||
[Token(Token = "0x6009807")]
|
||||
[Address(RVA = "0x1631EF0", Offset = "0x1630CF0", VA = "0x181631EF0")]
|
||||
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: 0x06009808 RID: 38920 RVA: 0x001F5158 File Offset: 0x001F3358
|
||||
[Token(Token = "0x6009808")]
|
||||
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
||||
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: 0x020018FA RID: 6394
|
||||
[Token(Token = "0x20018FA")]
|
||||
public interface IX509AttributeCertificate : IX509Extension
|
||||
{
|
||||
// Token: 0x170017F9 RID: 6137
|
||||
// (get) Token: 0x06009679 RID: 38521
|
||||
[Token(Token = "0x170017F9")]
|
||||
int Version
|
||||
{
|
||||
[Token(Token = "0x6009679")]
|
||||
[Address(Slot = "0")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x170017FA RID: 6138
|
||||
// (get) Token: 0x0600967A RID: 38522
|
||||
[Token(Token = "0x170017FA")]
|
||||
BigInteger SerialNumber
|
||||
{
|
||||
[Token(Token = "0x600967A")]
|
||||
[Address(Slot = "1")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x170017FB RID: 6139
|
||||
// (get) Token: 0x0600967B RID: 38523
|
||||
[Token(Token = "0x170017FB")]
|
||||
DateTime NotBefore
|
||||
{
|
||||
[Token(Token = "0x600967B")]
|
||||
[Address(Slot = "2")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x170017FC RID: 6140
|
||||
// (get) Token: 0x0600967C RID: 38524
|
||||
[Token(Token = "0x170017FC")]
|
||||
DateTime NotAfter
|
||||
{
|
||||
[Token(Token = "0x600967C")]
|
||||
[Address(Slot = "3")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x170017FD RID: 6141
|
||||
// (get) Token: 0x0600967D RID: 38525
|
||||
[Token(Token = "0x170017FD")]
|
||||
AttributeCertificateHolder Holder
|
||||
{
|
||||
[Token(Token = "0x600967D")]
|
||||
[Address(Slot = "4")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x170017FE RID: 6142
|
||||
// (get) Token: 0x0600967E RID: 38526
|
||||
[Token(Token = "0x170017FE")]
|
||||
AttributeCertificateIssuer Issuer
|
||||
{
|
||||
[Token(Token = "0x600967E")]
|
||||
[Address(Slot = "5")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x0600967F RID: 38527
|
||||
[Token(Token = "0x600967F")]
|
||||
[Address(Slot = "6")]
|
||||
X509Attribute[] GetAttributes();
|
||||
|
||||
// Token: 0x06009680 RID: 38528
|
||||
[Token(Token = "0x6009680")]
|
||||
[Address(Slot = "7")]
|
||||
X509Attribute[] GetAttributes(string oid);
|
||||
|
||||
// Token: 0x06009681 RID: 38529
|
||||
[Token(Token = "0x6009681")]
|
||||
[Address(Slot = "8")]
|
||||
bool[] GetIssuerUniqueID();
|
||||
|
||||
// Token: 0x170017FF RID: 6143
|
||||
// (get) Token: 0x06009682 RID: 38530
|
||||
[Token(Token = "0x170017FF")]
|
||||
bool IsValidNow
|
||||
{
|
||||
[Token(Token = "0x6009682")]
|
||||
[Address(Slot = "9")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x06009683 RID: 38531
|
||||
[Token(Token = "0x6009683")]
|
||||
[Address(Slot = "10")]
|
||||
bool IsValid(DateTime date);
|
||||
|
||||
// Token: 0x06009684 RID: 38532
|
||||
[Token(Token = "0x6009684")]
|
||||
[Address(Slot = "11")]
|
||||
void CheckValidity();
|
||||
|
||||
// Token: 0x06009685 RID: 38533
|
||||
[Token(Token = "0x6009685")]
|
||||
[Address(Slot = "12")]
|
||||
void CheckValidity(DateTime date);
|
||||
|
||||
// Token: 0x06009686 RID: 38534
|
||||
[Token(Token = "0x6009686")]
|
||||
[Address(Slot = "13")]
|
||||
byte[] GetSignature();
|
||||
|
||||
// Token: 0x06009687 RID: 38535
|
||||
[Token(Token = "0x6009687")]
|
||||
[Address(Slot = "14")]
|
||||
void Verify(AsymmetricKeyParameter publicKey);
|
||||
|
||||
// Token: 0x06009688 RID: 38536
|
||||
[Token(Token = "0x6009688")]
|
||||
[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: 0x020018FB RID: 6395
|
||||
[Token(Token = "0x20018FB")]
|
||||
public interface IX509Extension
|
||||
{
|
||||
// Token: 0x06009689 RID: 38537
|
||||
[Token(Token = "0x6009689")]
|
||||
[Address(Slot = "0")]
|
||||
ISet GetCriticalExtensionOids();
|
||||
|
||||
// Token: 0x0600968A RID: 38538
|
||||
[Token(Token = "0x600968A")]
|
||||
[Address(Slot = "1")]
|
||||
ISet GetNonCriticalExtensionOids();
|
||||
|
||||
// Token: 0x0600968B RID: 38539
|
||||
[Token(Token = "0x600968B")]
|
||||
[Address(Slot = "2")]
|
||||
[Obsolete]
|
||||
Asn1OctetString GetExtensionValue(string oid);
|
||||
|
||||
// Token: 0x0600968C RID: 38540
|
||||
[Token(Token = "0x600968C")]
|
||||
[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: 0x020018FC RID: 6396
|
||||
[Token(Token = "0x20018FC")]
|
||||
internal class PemParser
|
||||
{
|
||||
// Token: 0x0600968D RID: 38541 RVA: 0x001EF748 File Offset: 0x001ED948
|
||||
[Token(Token = "0x600968D")]
|
||||
[Address(RVA = "0x1625710", Offset = "0x1624510", VA = "0x181625710")]
|
||||
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: 0x0600968E RID: 38542 RVA: 0x001EF7BC File Offset: 0x001ED9BC
|
||||
[Token(Token = "0x600968E")]
|
||||
[Address(RVA = "0x16253C0", Offset = "0x16241C0", VA = "0x1816253C0")]
|
||||
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: 0x0600968F RID: 38543 RVA: 0x001EF7F4 File Offset: 0x001ED9F4
|
||||
[Token(Token = "0x600968F")]
|
||||
[Address(RVA = "0x16254B0", Offset = "0x16242B0", VA = "0x1816254B0")]
|
||||
internal Asn1Sequence ReadPemObject(Stream inStream)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600968F)
|
||||
|
||||
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: 0x04006678 RID: 26232
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006678")]
|
||||
private readonly string _header1;
|
||||
|
||||
// Token: 0x04006679 RID: 26233
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006679")]
|
||||
private readonly string _header2;
|
||||
|
||||
// Token: 0x0400667A RID: 26234
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400667A")]
|
||||
private readonly string _footer1;
|
||||
|
||||
// Token: 0x0400667B RID: 26235
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x400667B")]
|
||||
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: 0x020018FD RID: 6397
|
||||
[Token(Token = "0x20018FD")]
|
||||
public class PrincipalUtilities
|
||||
{
|
||||
// Token: 0x06009690 RID: 38544 RVA: 0x001EF8B8 File Offset: 0x001EDAB8
|
||||
[Token(Token = "0x6009690")]
|
||||
[Address(RVA = "0x16257D0", Offset = "0x16245D0", VA = "0x1816257D0")]
|
||||
public static X509Name GetIssuerX509Principal(X509Certificate cert)
|
||||
{
|
||||
DateTime notAfter = cert.NotAfter;
|
||||
Asn1Object asn1Object;
|
||||
return TbsCertificateStructure.GetInstance(asn1Object).issuer;
|
||||
}
|
||||
|
||||
// Token: 0x06009691 RID: 38545 RVA: 0x001EF8E4 File Offset: 0x001EDAE4
|
||||
[Token(Token = "0x6009691")]
|
||||
[Address(RVA = "0x1625950", Offset = "0x1624750", VA = "0x181625950")]
|
||||
public static X509Name GetSubjectX509Principal(X509Certificate cert)
|
||||
{
|
||||
DateTime notAfter = cert.NotAfter;
|
||||
Asn1Object asn1Object;
|
||||
return TbsCertificateStructure.GetInstance(asn1Object).subject;
|
||||
}
|
||||
|
||||
// Token: 0x06009692 RID: 38546 RVA: 0x001EF910 File Offset: 0x001EDB10
|
||||
[Token(Token = "0x6009692")]
|
||||
[Address(RVA = "0x1625890", Offset = "0x1624690", VA = "0x181625890")]
|
||||
public static X509Name GetIssuerX509Principal(X509Crl crl)
|
||||
{
|
||||
ISet revokedCertificates = crl.GetRevokedCertificates();
|
||||
Asn1Object asn1Object;
|
||||
return TbsCertificateList.GetInstance(asn1Object).issuer;
|
||||
}
|
||||
|
||||
// Token: 0x06009693 RID: 38547 RVA: 0x001EF93C File Offset: 0x001EDB3C
|
||||
[Token(Token = "0x6009693")]
|
||||
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
||||
public PrincipalUtilities()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x02001911 RID: 6417
|
||||
[Token(Token = "0x2001911")]
|
||||
public interface IX509Selector : ICloneable
|
||||
{
|
||||
// Token: 0x06009785 RID: 38789
|
||||
[Token(Token = "0x6009785")]
|
||||
[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: 0x02001912 RID: 6418
|
||||
[Token(Token = "0x2001912")]
|
||||
public interface IX509Store
|
||||
{
|
||||
// Token: 0x06009786 RID: 38790
|
||||
[Token(Token = "0x6009786")]
|
||||
[Address(Slot = "0")]
|
||||
ICollection GetMatches(IX509Selector selector);
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x02001913 RID: 6419
|
||||
[Token(Token = "0x2001913")]
|
||||
public interface IX509StoreParameters
|
||||
{
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x02001914 RID: 6420
|
||||
[Token(Token = "0x2001914")]
|
||||
[Serializable]
|
||||
public class NoSuchStoreException : X509StoreException
|
||||
{
|
||||
// Token: 0x06009787 RID: 38791 RVA: 0x001F395C File Offset: 0x001F1B5C
|
||||
[Token(Token = "0x6009787")]
|
||||
[Address(RVA = "0x16252F0", Offset = "0x16240F0", VA = "0x1816252F0")]
|
||||
public NoSuchStoreException()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009788 RID: 38792 RVA: 0x001F3970 File Offset: 0x001F1B70
|
||||
[Token(Token = "0x6009788")]
|
||||
[Address(RVA = "0x1625350", Offset = "0x1624150", VA = "0x181625350")]
|
||||
public NoSuchStoreException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009789 RID: 38793 RVA: 0x001F3984 File Offset: 0x001F1B84
|
||||
[Token(Token = "0x6009789")]
|
||||
[Address(RVA = "0x1625270", Offset = "0x1624070", VA = "0x181625270")]
|
||||
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: 0x02001915 RID: 6421
|
||||
[Token(Token = "0x2001915")]
|
||||
public class X509AttrCertStoreSelector : IX509Selector, ICloneable
|
||||
{
|
||||
// Token: 0x0600978A RID: 38794 RVA: 0x001F399C File Offset: 0x001F1B9C
|
||||
[Token(Token = "0x600978A")]
|
||||
[Address(RVA = "0x16285F0", Offset = "0x16273F0", VA = "0x1816285F0")]
|
||||
public X509AttrCertStoreSelector()
|
||||
{
|
||||
HashSet hashSet = new HashSet();
|
||||
this.targetNames = hashSet;
|
||||
HashSet hashSet2 = new HashSet();
|
||||
this.targetGroups = hashSet2;
|
||||
base..ctor();
|
||||
}
|
||||
|
||||
// Token: 0x0600978B RID: 38795 RVA: 0x001F39CC File Offset: 0x001F1BCC
|
||||
[Token(Token = "0x600978B")]
|
||||
[Address(RVA = "0x16284E0", Offset = "0x16272E0", VA = "0x1816284E0")]
|
||||
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: 0x0600978C RID: 38796 RVA: 0x001F3A78 File Offset: 0x001F1C78
|
||||
[Token(Token = "0x600978C")]
|
||||
[Address(RVA = "0x1627D30", Offset = "0x1626B30", VA = "0x181627D30", Slot = "4")]
|
||||
public bool Match(object obj)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600978C)
|
||||
|
||||
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: 0x0600978D RID: 38797 RVA: 0x001F3B98 File Offset: 0x001F1D98
|
||||
[Token(Token = "0x600978D")]
|
||||
[Address(RVA = "0x1627900", Offset = "0x1626700", VA = "0x181627900", 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: 0x17001825 RID: 6181
|
||||
// (get) Token: 0x0600978E RID: 38798 RVA: 0x001F3C44 File Offset: 0x001F1E44
|
||||
// (set) Token: 0x0600978F RID: 38799 RVA: 0x001F3C58 File Offset: 0x001F1E58
|
||||
[Token(Token = "0x17001825")]
|
||||
public IX509AttributeCertificate AttributeCert
|
||||
{
|
||||
[Token(Token = "0x600978E")]
|
||||
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20")]
|
||||
get
|
||||
{
|
||||
return this.attributeCert;
|
||||
}
|
||||
[Token(Token = "0x600978F")]
|
||||
[Address(RVA = "0x3F7200", Offset = "0x3F6000", VA = "0x1803F7200")]
|
||||
set
|
||||
{
|
||||
this.attributeCert = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001826 RID: 6182
|
||||
// (get) Token: 0x06009790 RID: 38800 RVA: 0x001F3C6C File Offset: 0x001F1E6C
|
||||
// (set) Token: 0x06009791 RID: 38801 RVA: 0x001F3C80 File Offset: 0x001F1E80
|
||||
[Token(Token = "0x17001826")]
|
||||
[Obsolete]
|
||||
public DateTimeObject AttribueCertificateValid
|
||||
{
|
||||
[Token(Token = "0x6009790")]
|
||||
[Address(RVA = "0x3F5F40", Offset = "0x3F4D40", VA = "0x1803F5F40")]
|
||||
get
|
||||
{
|
||||
return this.attributeCertificateValid;
|
||||
}
|
||||
[Token(Token = "0x6009791")]
|
||||
[Address(RVA = "0x3F7210", Offset = "0x3F6010", VA = "0x1803F7210")]
|
||||
set
|
||||
{
|
||||
this.attributeCertificateValid = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001827 RID: 6183
|
||||
// (get) Token: 0x06009792 RID: 38802 RVA: 0x001F3C94 File Offset: 0x001F1E94
|
||||
// (set) Token: 0x06009793 RID: 38803 RVA: 0x001F3CA8 File Offset: 0x001F1EA8
|
||||
[Token(Token = "0x17001827")]
|
||||
public DateTimeObject AttributeCertificateValid
|
||||
{
|
||||
[Token(Token = "0x6009792")]
|
||||
[Address(RVA = "0x3F5F40", Offset = "0x3F4D40", VA = "0x1803F5F40")]
|
||||
get
|
||||
{
|
||||
return this.attributeCertificateValid;
|
||||
}
|
||||
[Token(Token = "0x6009793")]
|
||||
[Address(RVA = "0x3F7210", Offset = "0x3F6010", VA = "0x1803F7210")]
|
||||
set
|
||||
{
|
||||
this.attributeCertificateValid = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001828 RID: 6184
|
||||
// (get) Token: 0x06009794 RID: 38804 RVA: 0x001F3CBC File Offset: 0x001F1EBC
|
||||
// (set) Token: 0x06009795 RID: 38805 RVA: 0x001F3CD0 File Offset: 0x001F1ED0
|
||||
[Token(Token = "0x17001828")]
|
||||
public AttributeCertificateHolder Holder
|
||||
{
|
||||
[Token(Token = "0x6009794")]
|
||||
[Address(RVA = "0x3F6400", Offset = "0x3F5200", VA = "0x1803F6400")]
|
||||
get
|
||||
{
|
||||
return this.holder;
|
||||
}
|
||||
[Token(Token = "0x6009795")]
|
||||
[Address(RVA = "0x460F90", Offset = "0x45FD90", VA = "0x180460F90")]
|
||||
set
|
||||
{
|
||||
this.holder = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001829 RID: 6185
|
||||
// (get) Token: 0x06009796 RID: 38806 RVA: 0x001F3CE4 File Offset: 0x001F1EE4
|
||||
// (set) Token: 0x06009797 RID: 38807 RVA: 0x001F3CF8 File Offset: 0x001F1EF8
|
||||
[Token(Token = "0x17001829")]
|
||||
public AttributeCertificateIssuer Issuer
|
||||
{
|
||||
[Token(Token = "0x6009796")]
|
||||
[Address(RVA = "0x3F63E0", Offset = "0x3F51E0", VA = "0x1803F63E0")]
|
||||
get
|
||||
{
|
||||
return this.issuer;
|
||||
}
|
||||
[Token(Token = "0x6009797")]
|
||||
[Address(RVA = "0x409C60", Offset = "0x408A60", VA = "0x180409C60")]
|
||||
set
|
||||
{
|
||||
this.issuer = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700182A RID: 6186
|
||||
// (get) Token: 0x06009798 RID: 38808 RVA: 0x001F3D0C File Offset: 0x001F1F0C
|
||||
// (set) Token: 0x06009799 RID: 38809 RVA: 0x001F3D20 File Offset: 0x001F1F20
|
||||
[Token(Token = "0x1700182A")]
|
||||
public BigInteger SerialNumber
|
||||
{
|
||||
[Token(Token = "0x6009798")]
|
||||
[Address(RVA = "0x3FA180", Offset = "0x3F8F80", VA = "0x1803FA180")]
|
||||
get
|
||||
{
|
||||
return this.serialNumber;
|
||||
}
|
||||
[Token(Token = "0x6009799")]
|
||||
[Address(RVA = "0x4437E0", Offset = "0x4425E0", VA = "0x1804437E0")]
|
||||
set
|
||||
{
|
||||
this.serialNumber = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600979A RID: 38810 RVA: 0x001F3D34 File Offset: 0x001F1F34
|
||||
[Token(Token = "0x600979A")]
|
||||
[Address(RVA = "0x16278A0", Offset = "0x16266A0", VA = "0x1816278A0")]
|
||||
public void AddTargetName(GeneralName name)
|
||||
{
|
||||
ISet set = this.targetNames;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600979B RID: 38811 RVA: 0x001F3D50 File Offset: 0x001F1F50
|
||||
[Token(Token = "0x600979B")]
|
||||
[Address(RVA = "0x1627830", Offset = "0x1626630", VA = "0x181627830")]
|
||||
public void AddTargetName(byte[] name)
|
||||
{
|
||||
GeneralName instance = GeneralName.GetInstance(Asn1Object.FromByteArray(name));
|
||||
ISet set = this.targetNames;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600979C RID: 38812 RVA: 0x001F3D78 File Offset: 0x001F1F78
|
||||
[Token(Token = "0x600979C")]
|
||||
[Address(RVA = "0x16284C0", Offset = "0x16272C0", VA = "0x1816284C0")]
|
||||
public void SetTargetNames(IEnumerable names)
|
||||
{
|
||||
ISet set = this.ExtractGeneralNames(names);
|
||||
this.targetNames = set;
|
||||
}
|
||||
|
||||
// Token: 0x0600979D RID: 38813 RVA: 0x001F3D94 File Offset: 0x001F1F94
|
||||
[Token(Token = "0x600979D")]
|
||||
[Address(RVA = "0x1627CD0", Offset = "0x1626AD0", VA = "0x181627CD0")]
|
||||
public IEnumerable GetTargetNames()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600979D)
|
||||
|
||||
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: 0x0600979E RID: 38814 RVA: 0x001F3DAC File Offset: 0x001F1FAC
|
||||
[Token(Token = "0x600979E")]
|
||||
[Address(RVA = "0x16277D0", Offset = "0x16265D0", VA = "0x1816277D0")]
|
||||
public void AddTargetGroup(GeneralName group)
|
||||
{
|
||||
ISet set = this.targetGroups;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600979F RID: 38815 RVA: 0x001F3DC8 File Offset: 0x001F1FC8
|
||||
[Token(Token = "0x600979F")]
|
||||
[Address(RVA = "0x1627760", Offset = "0x1626560", VA = "0x181627760")]
|
||||
public void AddTargetGroup(byte[] name)
|
||||
{
|
||||
GeneralName instance = GeneralName.GetInstance(Asn1Object.FromByteArray(name));
|
||||
ISet set = this.targetGroups;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x060097A0 RID: 38816 RVA: 0x001F3DF0 File Offset: 0x001F1FF0
|
||||
[Token(Token = "0x60097A0")]
|
||||
[Address(RVA = "0x16284A0", Offset = "0x16272A0", VA = "0x1816284A0")]
|
||||
public void SetTargetGroups(IEnumerable names)
|
||||
{
|
||||
ISet set = this.ExtractGeneralNames(names);
|
||||
this.targetGroups = set;
|
||||
}
|
||||
|
||||
// Token: 0x060097A1 RID: 38817 RVA: 0x001F3E0C File Offset: 0x001F200C
|
||||
[Token(Token = "0x60097A1")]
|
||||
[Address(RVA = "0x1627C70", Offset = "0x1626A70", VA = "0x181627C70")]
|
||||
public IEnumerable GetTargetGroups()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060097A1)
|
||||
|
||||
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: 0x060097A2 RID: 38818 RVA: 0x001F3E24 File Offset: 0x001F2024
|
||||
[Token(Token = "0x60097A2")]
|
||||
[Address(RVA = "0x1627A40", Offset = "0x1626840", VA = "0x181627A40")]
|
||||
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: 0x040066BE RID: 26302
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40066BE")]
|
||||
private IX509AttributeCertificate attributeCert;
|
||||
|
||||
// Token: 0x040066BF RID: 26303
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40066BF")]
|
||||
private DateTimeObject attributeCertificateValid;
|
||||
|
||||
// Token: 0x040066C0 RID: 26304
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40066C0")]
|
||||
private AttributeCertificateHolder holder;
|
||||
|
||||
// Token: 0x040066C1 RID: 26305
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40066C1")]
|
||||
private AttributeCertificateIssuer issuer;
|
||||
|
||||
// Token: 0x040066C2 RID: 26306
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40066C2")]
|
||||
private BigInteger serialNumber;
|
||||
|
||||
// Token: 0x040066C3 RID: 26307
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40066C3")]
|
||||
private ISet targetNames;
|
||||
|
||||
// Token: 0x040066C4 RID: 26308
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x40066C4")]
|
||||
private ISet targetGroups;
|
||||
}
|
||||
}
|
||||
+177
@@ -0,0 +1,177 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x02001916 RID: 6422
|
||||
[Token(Token = "0x2001916")]
|
||||
public class X509CertPairStoreSelector : IX509Selector, ICloneable
|
||||
{
|
||||
// Token: 0x060097A3 RID: 38819 RVA: 0x001F3E78 File Offset: 0x001F2078
|
||||
[Token(Token = "0x60097A3")]
|
||||
[Address(RVA = "0x16290F0", Offset = "0x1627EF0", VA = "0x1816290F0")]
|
||||
private static X509CertStoreSelector CloneSelector(X509CertStoreSelector s)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060097A3)
|
||||
|
||||
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: 0x060097A4 RID: 38820 RVA: 0x001F3E9C File Offset: 0x001F209C
|
||||
[Token(Token = "0x60097A4")]
|
||||
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
||||
public X509CertPairStoreSelector()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060097A5 RID: 38821 RVA: 0x001F3EB0 File Offset: 0x001F20B0
|
||||
[Token(Token = "0x60097A5")]
|
||||
[Address(RVA = "0x1629340", Offset = "0x1628140", VA = "0x181629340")]
|
||||
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: 0x1700182B RID: 6187
|
||||
// (get) Token: 0x060097A6 RID: 38822 RVA: 0x001F3F00 File Offset: 0x001F2100
|
||||
// (set) Token: 0x060097A7 RID: 38823 RVA: 0x001F3F14 File Offset: 0x001F2114
|
||||
[Token(Token = "0x1700182B")]
|
||||
public X509CertificatePair CertPair
|
||||
{
|
||||
[Token(Token = "0x60097A6")]
|
||||
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20")]
|
||||
get
|
||||
{
|
||||
return this.certPair;
|
||||
}
|
||||
[Token(Token = "0x60097A7")]
|
||||
[Address(RVA = "0x3F7200", Offset = "0x3F6000", VA = "0x1803F7200")]
|
||||
set
|
||||
{
|
||||
this.certPair = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700182C RID: 6188
|
||||
// (get) Token: 0x060097A8 RID: 38824 RVA: 0x001F3F28 File Offset: 0x001F2128
|
||||
// (set) Token: 0x060097A9 RID: 38825 RVA: 0x001F3F40 File Offset: 0x001F2140
|
||||
[Token(Token = "0x1700182C")]
|
||||
public X509CertStoreSelector ForwardSelector
|
||||
{
|
||||
[Token(Token = "0x60097A8")]
|
||||
[Address(RVA = "0x16293A0", Offset = "0x16281A0", VA = "0x1816293A0")]
|
||||
get
|
||||
{
|
||||
return X509CertPairStoreSelector.CloneSelector(this.forwardSelector);
|
||||
}
|
||||
[Token(Token = "0x60097A9")]
|
||||
[Address(RVA = "0x16293C0", Offset = "0x16281C0", VA = "0x1816293C0")]
|
||||
set
|
||||
{
|
||||
X509CertStoreSelector x509CertStoreSelector = X509CertPairStoreSelector.CloneSelector(value);
|
||||
this.forwardSelector = x509CertStoreSelector;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700182D RID: 6189
|
||||
// (get) Token: 0x060097AA RID: 38826 RVA: 0x001F3F5C File Offset: 0x001F215C
|
||||
// (set) Token: 0x060097AB RID: 38827 RVA: 0x001F3F74 File Offset: 0x001F2174
|
||||
[Token(Token = "0x1700182D")]
|
||||
public X509CertStoreSelector ReverseSelector
|
||||
{
|
||||
[Token(Token = "0x60097AA")]
|
||||
[Address(RVA = "0x16293B0", Offset = "0x16281B0", VA = "0x1816293B0")]
|
||||
get
|
||||
{
|
||||
return X509CertPairStoreSelector.CloneSelector(this.reverseSelector);
|
||||
}
|
||||
[Token(Token = "0x60097AB")]
|
||||
[Address(RVA = "0x16293E0", Offset = "0x16281E0", VA = "0x1816293E0")]
|
||||
set
|
||||
{
|
||||
X509CertStoreSelector x509CertStoreSelector = X509CertPairStoreSelector.CloneSelector(value);
|
||||
this.reverseSelector = x509CertStoreSelector;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060097AC RID: 38828 RVA: 0x001F3F90 File Offset: 0x001F2190
|
||||
[Token(Token = "0x60097AC")]
|
||||
[Address(RVA = "0x1629210", Offset = "0x1628010", VA = "0x181629210", Slot = "4")]
|
||||
public bool Match(object obj)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060097AC)
|
||||
|
||||
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: 0x060097AD RID: 38829 RVA: 0x001F3FE8 File Offset: 0x001F21E8
|
||||
[Token(Token = "0x60097AD")]
|
||||
[Address(RVA = "0x1629190", Offset = "0x1627F90", VA = "0x181629190", 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: 0x040066C5 RID: 26309
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40066C5")]
|
||||
private X509CertificatePair certPair;
|
||||
|
||||
// Token: 0x040066C6 RID: 26310
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40066C6")]
|
||||
private X509CertStoreSelector forwardSelector;
|
||||
|
||||
// Token: 0x040066C7 RID: 26311
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40066C7")]
|
||||
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: 0x02001917 RID: 6423
|
||||
[Token(Token = "0x2001917")]
|
||||
public class X509CertStoreSelector : IX509Selector, ICloneable
|
||||
{
|
||||
// Token: 0x060097AE RID: 38830 RVA: 0x001F4034 File Offset: 0x001F2234
|
||||
[Token(Token = "0x60097AE")]
|
||||
[Address(RVA = "0x162A370", Offset = "0x1629170", VA = "0x18162A370")]
|
||||
public X509CertStoreSelector()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060097AF RID: 38831 RVA: 0x001F4058 File Offset: 0x001F2258
|
||||
[Token(Token = "0x60097AF")]
|
||||
[Address(RVA = "0x162A190", Offset = "0x1628F90", VA = "0x18162A190")]
|
||||
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: 0x060097B0 RID: 38832 RVA: 0x001F4198 File Offset: 0x001F2398
|
||||
[Token(Token = "0x60097B0")]
|
||||
[Address(RVA = "0x1629400", Offset = "0x1628200", VA = "0x181629400", 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: 0x1700182E RID: 6190
|
||||
// (get) Token: 0x060097B1 RID: 38833 RVA: 0x001F42D8 File Offset: 0x001F24D8
|
||||
// (set) Token: 0x060097B2 RID: 38834 RVA: 0x001F42F0 File Offset: 0x001F24F0
|
||||
[Token(Token = "0x1700182E")]
|
||||
public byte[] AuthorityKeyIdentifier
|
||||
{
|
||||
[Token(Token = "0x60097B1")]
|
||||
[Address(RVA = "0x162A380", Offset = "0x1629180", VA = "0x18162A380")]
|
||||
get
|
||||
{
|
||||
return Arrays.Clone(this.authorityKeyIdentifier);
|
||||
}
|
||||
[Token(Token = "0x60097B2")]
|
||||
[Address(RVA = "0x162A570", Offset = "0x1629370", VA = "0x18162A570")]
|
||||
set
|
||||
{
|
||||
byte[] array = Arrays.Clone(value);
|
||||
this.authorityKeyIdentifier = array;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700182F RID: 6191
|
||||
// (get) Token: 0x060097B3 RID: 38835 RVA: 0x001F430C File Offset: 0x001F250C
|
||||
// (set) Token: 0x060097B4 RID: 38836 RVA: 0x001F4320 File Offset: 0x001F2520
|
||||
[Token(Token = "0x1700182F")]
|
||||
public int BasicConstraints
|
||||
{
|
||||
[Token(Token = "0x60097B3")]
|
||||
[Address(RVA = "0x40B720", Offset = "0x40A520", VA = "0x18040B720")]
|
||||
get
|
||||
{
|
||||
return this.basicConstraints;
|
||||
}
|
||||
[Token(Token = "0x60097B4")]
|
||||
[Address(RVA = "0x162A5E0", Offset = "0x16293E0", VA = "0x18162A5E0")]
|
||||
set
|
||||
{
|
||||
this.basicConstraints = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001830 RID: 6192
|
||||
// (get) Token: 0x060097B5 RID: 38837 RVA: 0x001F4344 File Offset: 0x001F2544
|
||||
// (set) Token: 0x060097B6 RID: 38838 RVA: 0x001F4358 File Offset: 0x001F2558
|
||||
[Token(Token = "0x17001830")]
|
||||
public X509Certificate Certificate
|
||||
{
|
||||
[Token(Token = "0x60097B5")]
|
||||
[Address(RVA = "0x3F6400", Offset = "0x3F5200", VA = "0x1803F6400")]
|
||||
get
|
||||
{
|
||||
return this.certificate;
|
||||
}
|
||||
[Token(Token = "0x60097B6")]
|
||||
[Address(RVA = "0x460F90", Offset = "0x45FD90", VA = "0x180460F90")]
|
||||
set
|
||||
{
|
||||
this.certificate = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001831 RID: 6193
|
||||
// (get) Token: 0x060097B7 RID: 38839 RVA: 0x001F436C File Offset: 0x001F256C
|
||||
// (set) Token: 0x060097B8 RID: 38840 RVA: 0x001F4380 File Offset: 0x001F2580
|
||||
[Token(Token = "0x17001831")]
|
||||
public DateTimeObject CertificateValid
|
||||
{
|
||||
[Token(Token = "0x60097B7")]
|
||||
[Address(RVA = "0x3F63E0", Offset = "0x3F51E0", VA = "0x1803F63E0")]
|
||||
get
|
||||
{
|
||||
return this.certificateValid;
|
||||
}
|
||||
[Token(Token = "0x60097B8")]
|
||||
[Address(RVA = "0x409C60", Offset = "0x408A60", VA = "0x180409C60")]
|
||||
set
|
||||
{
|
||||
this.certificateValid = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001832 RID: 6194
|
||||
// (get) Token: 0x060097B9 RID: 38841 RVA: 0x001F4394 File Offset: 0x001F2594
|
||||
// (set) Token: 0x060097BA RID: 38842 RVA: 0x001F43B4 File Offset: 0x001F25B4
|
||||
[Token(Token = "0x17001832")]
|
||||
public ISet ExtendedKeyUsage
|
||||
{
|
||||
[Token(Token = "0x60097B9")]
|
||||
[Address(RVA = "0x162A3E0", Offset = "0x16291E0", VA = "0x18162A3E0")]
|
||||
get
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060097B9)
|
||||
|
||||
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 = "0x60097BA")]
|
||||
[Address(RVA = "0x162A660", Offset = "0x1629460", VA = "0x18162A660")]
|
||||
set
|
||||
{
|
||||
if (value == 0)
|
||||
{
|
||||
this.extendedKeyUsage = value;
|
||||
return;
|
||||
}
|
||||
HashSet hashSet = new HashSet(value);
|
||||
this.extendedKeyUsage = hashSet;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001833 RID: 6195
|
||||
// (get) Token: 0x060097BB RID: 38843 RVA: 0x001F43DC File Offset: 0x001F25DC
|
||||
// (set) Token: 0x060097BC RID: 38844 RVA: 0x001F43F0 File Offset: 0x001F25F0
|
||||
[Token(Token = "0x17001833")]
|
||||
public bool IgnoreX509NameOrdering
|
||||
{
|
||||
[Token(Token = "0x60097BB")]
|
||||
[Address(RVA = "0x43A970", Offset = "0x439770", VA = "0x18043A970")]
|
||||
get
|
||||
{
|
||||
return this.ignoreX509NameOrdering;
|
||||
}
|
||||
[Token(Token = "0x60097BC")]
|
||||
[Address(RVA = "0x43ABB0", Offset = "0x4399B0", VA = "0x18043ABB0")]
|
||||
set
|
||||
{
|
||||
this.ignoreX509NameOrdering = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001834 RID: 6196
|
||||
// (get) Token: 0x060097BD RID: 38845 RVA: 0x001F4404 File Offset: 0x001F2604
|
||||
// (set) Token: 0x060097BE RID: 38846 RVA: 0x001F4418 File Offset: 0x001F2618
|
||||
[Token(Token = "0x17001834")]
|
||||
public X509Name Issuer
|
||||
{
|
||||
[Token(Token = "0x60097BD")]
|
||||
[Address(RVA = "0x408890", Offset = "0x407690", VA = "0x180408890")]
|
||||
get
|
||||
{
|
||||
return this.issuer;
|
||||
}
|
||||
[Token(Token = "0x60097BE")]
|
||||
[Address(RVA = "0x403B30", Offset = "0x402930", VA = "0x180403B30")]
|
||||
set
|
||||
{
|
||||
this.issuer = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001835 RID: 6197
|
||||
// (get) Token: 0x060097BF RID: 38847 RVA: 0x001F442C File Offset: 0x001F262C
|
||||
[Token(Token = "0x17001835")]
|
||||
[Obsolete]
|
||||
public string IssuerAsString
|
||||
{
|
||||
[Token(Token = "0x60097BF")]
|
||||
[Address(RVA = "0x162A450", Offset = "0x1629250", VA = "0x18162A450")]
|
||||
get
|
||||
{
|
||||
X509Name x509Name = this.issuer;
|
||||
if (x509Name != 0)
|
||||
{
|
||||
Asn1Object asn1Object = x509Name.ToAsn1Object();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001836 RID: 6198
|
||||
// (get) Token: 0x060097C0 RID: 38848 RVA: 0x001F444C File Offset: 0x001F264C
|
||||
// (set) Token: 0x060097C1 RID: 38849 RVA: 0x001F4464 File Offset: 0x001F2664
|
||||
[Token(Token = "0x17001836")]
|
||||
public bool[] KeyUsage
|
||||
{
|
||||
[Token(Token = "0x60097C0")]
|
||||
[Address(RVA = "0x162A470", Offset = "0x1629270", VA = "0x18162A470")]
|
||||
get
|
||||
{
|
||||
return X509CertStoreSelector.CopyBoolArray(this.keyUsage);
|
||||
}
|
||||
[Token(Token = "0x60097C1")]
|
||||
[Address(RVA = "0x162A6E0", Offset = "0x16294E0", VA = "0x18162A6E0")]
|
||||
set
|
||||
{
|
||||
bool[] array = X509CertStoreSelector.CopyBoolArray(value);
|
||||
this.keyUsage = array;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001837 RID: 6199
|
||||
// (get) Token: 0x060097C2 RID: 38850 RVA: 0x001F4480 File Offset: 0x001F2680
|
||||
// (set) Token: 0x060097C3 RID: 38851 RVA: 0x001F44A0 File Offset: 0x001F26A0
|
||||
[Token(Token = "0x17001837")]
|
||||
public ISet Policy
|
||||
{
|
||||
[Token(Token = "0x60097C2")]
|
||||
[Address(RVA = "0x162A480", Offset = "0x1629280", VA = "0x18162A480")]
|
||||
get
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060097C2)
|
||||
|
||||
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 = "0x60097C3")]
|
||||
[Address(RVA = "0x162A700", Offset = "0x1629500", VA = "0x18162A700")]
|
||||
set
|
||||
{
|
||||
if (value == 0)
|
||||
{
|
||||
this.policy = value;
|
||||
return;
|
||||
}
|
||||
HashSet hashSet = new HashSet(value);
|
||||
this.policy = hashSet;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001838 RID: 6200
|
||||
// (get) Token: 0x060097C4 RID: 38852 RVA: 0x001F44C8 File Offset: 0x001F26C8
|
||||
// (set) Token: 0x060097C5 RID: 38853 RVA: 0x001F44DC File Offset: 0x001F26DC
|
||||
[Token(Token = "0x17001838")]
|
||||
public DateTimeObject PrivateKeyValid
|
||||
{
|
||||
[Token(Token = "0x60097C4")]
|
||||
[Address(RVA = "0x423D40", Offset = "0x422B40", VA = "0x180423D40")]
|
||||
get
|
||||
{
|
||||
return this.privateKeyValid;
|
||||
}
|
||||
[Token(Token = "0x60097C5")]
|
||||
[Address(RVA = "0x466B90", Offset = "0x465990", VA = "0x180466B90")]
|
||||
set
|
||||
{
|
||||
this.privateKeyValid = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001839 RID: 6201
|
||||
// (get) Token: 0x060097C6 RID: 38854 RVA: 0x001F44F0 File Offset: 0x001F26F0
|
||||
// (set) Token: 0x060097C7 RID: 38855 RVA: 0x001F4504 File Offset: 0x001F2704
|
||||
[Token(Token = "0x17001839")]
|
||||
public BigInteger SerialNumber
|
||||
{
|
||||
[Token(Token = "0x60097C6")]
|
||||
[Address(RVA = "0x423DE0", Offset = "0x422BE0", VA = "0x180423DE0")]
|
||||
get
|
||||
{
|
||||
return this.serialNumber;
|
||||
}
|
||||
[Token(Token = "0x60097C7")]
|
||||
[Address(RVA = "0x567490", Offset = "0x566290", VA = "0x180567490")]
|
||||
set
|
||||
{
|
||||
this.serialNumber = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700183A RID: 6202
|
||||
// (get) Token: 0x060097C8 RID: 38856 RVA: 0x001F4518 File Offset: 0x001F2718
|
||||
// (set) Token: 0x060097C9 RID: 38857 RVA: 0x001F452C File Offset: 0x001F272C
|
||||
[Token(Token = "0x1700183A")]
|
||||
public X509Name Subject
|
||||
{
|
||||
[Token(Token = "0x60097C8")]
|
||||
[Address(RVA = "0x423E10", Offset = "0x422C10", VA = "0x180423E10")]
|
||||
get
|
||||
{
|
||||
return this.subject;
|
||||
}
|
||||
[Token(Token = "0x60097C9")]
|
||||
[Address(RVA = "0x687270", Offset = "0x686070", VA = "0x180687270")]
|
||||
set
|
||||
{
|
||||
this.subject = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700183B RID: 6203
|
||||
// (get) Token: 0x060097CA RID: 38858 RVA: 0x001F4540 File Offset: 0x001F2740
|
||||
[Token(Token = "0x1700183B")]
|
||||
[Obsolete]
|
||||
public string SubjectAsString
|
||||
{
|
||||
[Token(Token = "0x60097CA")]
|
||||
[Address(RVA = "0x162A4F0", Offset = "0x16292F0", VA = "0x18162A4F0")]
|
||||
get
|
||||
{
|
||||
X509Name x509Name = this.subject;
|
||||
if (x509Name != 0)
|
||||
{
|
||||
Asn1Object asn1Object = x509Name.ToAsn1Object();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700183C RID: 6204
|
||||
// (get) Token: 0x060097CB RID: 38859 RVA: 0x001F4560 File Offset: 0x001F2760
|
||||
// (set) Token: 0x060097CC RID: 38860 RVA: 0x001F4578 File Offset: 0x001F2778
|
||||
[Token(Token = "0x1700183C")]
|
||||
public byte[] SubjectKeyIdentifier
|
||||
{
|
||||
[Token(Token = "0x60097CB")]
|
||||
[Address(RVA = "0x162A510", Offset = "0x1629310", VA = "0x18162A510")]
|
||||
get
|
||||
{
|
||||
return Arrays.Clone(this.subjectKeyIdentifier);
|
||||
}
|
||||
[Token(Token = "0x60097CC")]
|
||||
[Address(RVA = "0x162A780", Offset = "0x1629580", VA = "0x18162A780")]
|
||||
set
|
||||
{
|
||||
byte[] array = Arrays.Clone(value);
|
||||
this.subjectKeyIdentifier = array;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700183D RID: 6205
|
||||
// (get) Token: 0x060097CD RID: 38861 RVA: 0x001F4594 File Offset: 0x001F2794
|
||||
// (set) Token: 0x060097CE RID: 38862 RVA: 0x001F45A8 File Offset: 0x001F27A8
|
||||
[Token(Token = "0x1700183D")]
|
||||
public SubjectPublicKeyInfo SubjectPublicKey
|
||||
{
|
||||
[Token(Token = "0x60097CD")]
|
||||
[Address(RVA = "0x4391F0", Offset = "0x437FF0", VA = "0x1804391F0")]
|
||||
get
|
||||
{
|
||||
return this.subjectPublicKey;
|
||||
}
|
||||
[Token(Token = "0x60097CE")]
|
||||
[Address(RVA = "0x7D58F0", Offset = "0x7D46F0", VA = "0x1807D58F0")]
|
||||
set
|
||||
{
|
||||
this.subjectPublicKey = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700183E RID: 6206
|
||||
// (get) Token: 0x060097CF RID: 38863 RVA: 0x001F45BC File Offset: 0x001F27BC
|
||||
// (set) Token: 0x060097D0 RID: 38864 RVA: 0x001F45D0 File Offset: 0x001F27D0
|
||||
[Token(Token = "0x1700183E")]
|
||||
public DerObjectIdentifier SubjectPublicKeyAlgID
|
||||
{
|
||||
[Token(Token = "0x60097CF")]
|
||||
[Address(RVA = "0x567CE0", Offset = "0x566AE0", VA = "0x180567CE0")]
|
||||
get
|
||||
{
|
||||
return this.subjectPublicKeyAlgID;
|
||||
}
|
||||
[Token(Token = "0x60097D0")]
|
||||
[Address(RVA = "0x567D20", Offset = "0x566B20", VA = "0x180567D20")]
|
||||
set
|
||||
{
|
||||
this.subjectPublicKeyAlgID = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060097D1 RID: 38865 RVA: 0x001F45E4 File Offset: 0x001F27E4
|
||||
[Token(Token = "0x60097D1")]
|
||||
[Address(RVA = "0x1629830", Offset = "0x1628630", VA = "0x181629830", 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: 0x060097D2 RID: 38866 RVA: 0x001F4764 File Offset: 0x001F2964
|
||||
[Token(Token = "0x60097D2")]
|
||||
[Address(RVA = "0x1629730", Offset = "0x1628530", VA = "0x181629730")]
|
||||
internal static bool IssuersMatch(X509Name a, X509Name b)
|
||||
{
|
||||
if (a == 0)
|
||||
{
|
||||
return b == 0;
|
||||
}
|
||||
return a.Equivalent(b, true);
|
||||
}
|
||||
|
||||
// Token: 0x060097D3 RID: 38867 RVA: 0x001F4784 File Offset: 0x001F2984
|
||||
[Token(Token = "0x60097D3")]
|
||||
[Address(RVA = "0x1629610", Offset = "0x1628410", VA = "0x181629610")]
|
||||
private static bool[] CopyBoolArray(bool[] b)
|
||||
{
|
||||
while (b != 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060097D4 RID: 38868 RVA: 0x001F4798 File Offset: 0x001F2998
|
||||
[Token(Token = "0x60097D4")]
|
||||
[Address(RVA = "0x1629690", Offset = "0x1628490", VA = "0x181629690")]
|
||||
private static ISet CopySet(ISet s)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060097D4)
|
||||
|
||||
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: 0x060097D5 RID: 38869 RVA: 0x001F47B4 File Offset: 0x001F29B4
|
||||
[Token(Token = "0x60097D5")]
|
||||
[Address(RVA = "0x1629700", Offset = "0x1628500", VA = "0x181629700")]
|
||||
private static SubjectPublicKeyInfo GetSubjectPublicKey(X509Certificate c)
|
||||
{
|
||||
SubjectPublicKeyInfo subjectPublicKeyInfo;
|
||||
return subjectPublicKeyInfo;
|
||||
}
|
||||
|
||||
// Token: 0x060097D6 RID: 38870 RVA: 0x001F47C8 File Offset: 0x001F29C8
|
||||
[Token(Token = "0x60097D6")]
|
||||
[Address(RVA = "0x1629750", Offset = "0x1628550", VA = "0x181629750")]
|
||||
private static bool MatchExtension(byte[] b, X509Certificate c, DerObjectIdentifier oid)
|
||||
{
|
||||
bool flag;
|
||||
return b == 0 || c.GetCriticalExtensionOids() == 0 || flag;
|
||||
}
|
||||
|
||||
// Token: 0x040066C8 RID: 26312
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40066C8")]
|
||||
private byte[] authorityKeyIdentifier;
|
||||
|
||||
// Token: 0x040066C9 RID: 26313
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40066C9")]
|
||||
private int basicConstraints = (int)((ulong)4294967295L);
|
||||
|
||||
// Token: 0x040066CA RID: 26314
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40066CA")]
|
||||
private X509Certificate certificate;
|
||||
|
||||
// Token: 0x040066CB RID: 26315
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40066CB")]
|
||||
private DateTimeObject certificateValid;
|
||||
|
||||
// Token: 0x040066CC RID: 26316
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40066CC")]
|
||||
private ISet extendedKeyUsage;
|
||||
|
||||
// Token: 0x040066CD RID: 26317
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40066CD")]
|
||||
private bool ignoreX509NameOrdering;
|
||||
|
||||
// Token: 0x040066CE RID: 26318
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x40066CE")]
|
||||
private X509Name issuer;
|
||||
|
||||
// Token: 0x040066CF RID: 26319
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x40066CF")]
|
||||
private bool[] keyUsage;
|
||||
|
||||
// Token: 0x040066D0 RID: 26320
|
||||
[FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x40066D0")]
|
||||
private ISet policy;
|
||||
|
||||
// Token: 0x040066D1 RID: 26321
|
||||
[FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x40066D1")]
|
||||
private DateTimeObject privateKeyValid;
|
||||
|
||||
// Token: 0x040066D2 RID: 26322
|
||||
[FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x40066D2")]
|
||||
private BigInteger serialNumber;
|
||||
|
||||
// Token: 0x040066D3 RID: 26323
|
||||
[FieldOffset(Offset = "0x68")]
|
||||
[Token(Token = "0x40066D3")]
|
||||
private X509Name subject;
|
||||
|
||||
// Token: 0x040066D4 RID: 26324
|
||||
[FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x40066D4")]
|
||||
private byte[] subjectKeyIdentifier;
|
||||
|
||||
// Token: 0x040066D5 RID: 26325
|
||||
[FieldOffset(Offset = "0x78")]
|
||||
[Token(Token = "0x40066D5")]
|
||||
private SubjectPublicKeyInfo subjectPublicKey;
|
||||
|
||||
// Token: 0x040066D6 RID: 26326
|
||||
[FieldOffset(Offset = "0x80")]
|
||||
[Token(Token = "0x40066D6")]
|
||||
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: 0x02001918 RID: 6424
|
||||
[Token(Token = "0x2001918")]
|
||||
internal class X509CollectionStore : IX509Store
|
||||
{
|
||||
// Token: 0x060097D7 RID: 38871 RVA: 0x001F47EC File Offset: 0x001F29EC
|
||||
[Token(Token = "0x60097D7")]
|
||||
[Address(RVA = "0x162DDC0", Offset = "0x162CBC0", VA = "0x18162DDC0")]
|
||||
internal X509CollectionStore(ICollection collection)
|
||||
{
|
||||
IList list = Platform.CreateArrayList(collection);
|
||||
this._local = list;
|
||||
}
|
||||
|
||||
// Token: 0x060097D8 RID: 38872 RVA: 0x001F4810 File Offset: 0x001F2A10
|
||||
[Token(Token = "0x60097D8")]
|
||||
[Address(RVA = "0x162DB40", Offset = "0x162C940", VA = "0x18162DB40", 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: 0x040066D7 RID: 26327
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40066D7")]
|
||||
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: 0x02001919 RID: 6425
|
||||
[Token(Token = "0x2001919")]
|
||||
public class X509CollectionStoreParameters : IX509StoreParameters
|
||||
{
|
||||
// Token: 0x060097D9 RID: 38873 RVA: 0x001F4884 File Offset: 0x001F2A84
|
||||
[Token(Token = "0x60097D9")]
|
||||
[Address(RVA = "0x162DA90", Offset = "0x162C890", VA = "0x18162DA90")]
|
||||
public X509CollectionStoreParameters(ICollection collection)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060097D9)
|
||||
|
||||
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: 0x060097DA RID: 38874 RVA: 0x001F48B4 File Offset: 0x001F2AB4
|
||||
[Token(Token = "0x60097DA")]
|
||||
[Address(RVA = "0x162D970", Offset = "0x162C770", VA = "0x18162D970")]
|
||||
public ICollection GetCollection()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060097DA)
|
||||
|
||||
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: 0x060097DB RID: 38875 RVA: 0x001F48CC File Offset: 0x001F2ACC
|
||||
[Token(Token = "0x60097DB")]
|
||||
[Address(RVA = "0x162D9D0", Offset = "0x162C7D0", VA = "0x18162D9D0", 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: 0x040066D8 RID: 26328
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40066D8")]
|
||||
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: 0x0200191A RID: 6426
|
||||
[Token(Token = "0x200191A")]
|
||||
public class X509CrlStoreSelector : IX509Selector, ICloneable
|
||||
{
|
||||
// Token: 0x060097DC RID: 38876 RVA: 0x001F4908 File Offset: 0x001F2B08
|
||||
[Token(Token = "0x60097DC")]
|
||||
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
||||
public X509CrlStoreSelector()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060097DD RID: 38877 RVA: 0x001F491C File Offset: 0x001F2B1C
|
||||
[Token(Token = "0x60097DD")]
|
||||
[Address(RVA = "0x162FA90", Offset = "0x162E890", VA = "0x18162FA90")]
|
||||
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: 0x060097DE RID: 38878 RVA: 0x001F49E8 File Offset: 0x001F2BE8
|
||||
[Token(Token = "0x60097DE")]
|
||||
[Address(RVA = "0x162F3F0", Offset = "0x162E1F0", VA = "0x18162F3F0", 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: 0x1700183F RID: 6207
|
||||
// (get) Token: 0x060097DF RID: 38879 RVA: 0x001F4AB4 File Offset: 0x001F2CB4
|
||||
// (set) Token: 0x060097E0 RID: 38880 RVA: 0x001F4AC8 File Offset: 0x001F2CC8
|
||||
[Token(Token = "0x1700183F")]
|
||||
public X509Certificate CertificateChecking
|
||||
{
|
||||
[Token(Token = "0x60097DF")]
|
||||
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20")]
|
||||
get
|
||||
{
|
||||
return this.certificateChecking;
|
||||
}
|
||||
[Token(Token = "0x60097E0")]
|
||||
[Address(RVA = "0x3F7200", Offset = "0x3F6000", VA = "0x1803F7200")]
|
||||
set
|
||||
{
|
||||
this.certificateChecking = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001840 RID: 6208
|
||||
// (get) Token: 0x060097E1 RID: 38881 RVA: 0x001F4ADC File Offset: 0x001F2CDC
|
||||
// (set) Token: 0x060097E2 RID: 38882 RVA: 0x001F4AF0 File Offset: 0x001F2CF0
|
||||
[Token(Token = "0x17001840")]
|
||||
public DateTimeObject DateAndTime
|
||||
{
|
||||
[Token(Token = "0x60097E1")]
|
||||
[Address(RVA = "0x3F5F40", Offset = "0x3F4D40", VA = "0x1803F5F40")]
|
||||
get
|
||||
{
|
||||
return this.dateAndTime;
|
||||
}
|
||||
[Token(Token = "0x60097E2")]
|
||||
[Address(RVA = "0x3F7210", Offset = "0x3F6010", VA = "0x1803F7210")]
|
||||
set
|
||||
{
|
||||
this.dateAndTime = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001841 RID: 6209
|
||||
// (get) Token: 0x060097E3 RID: 38883 RVA: 0x001F4B04 File Offset: 0x001F2D04
|
||||
// (set) Token: 0x060097E4 RID: 38884 RVA: 0x001F4B1C File Offset: 0x001F2D1C
|
||||
[Token(Token = "0x17001841")]
|
||||
public ICollection Issuers
|
||||
{
|
||||
[Token(Token = "0x60097E3")]
|
||||
[Address(RVA = "0x162FBB0", Offset = "0x162E9B0", VA = "0x18162FBB0")]
|
||||
get
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060097E3)
|
||||
|
||||
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 = "0x60097E4")]
|
||||
[Address(RVA = "0x162FC70", Offset = "0x162EA70", VA = "0x18162FC70")]
|
||||
set
|
||||
{
|
||||
IList list = Platform.CreateArrayList(value);
|
||||
this.issuers = list;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001842 RID: 6210
|
||||
// (get) Token: 0x060097E5 RID: 38885 RVA: 0x001F4B38 File Offset: 0x001F2D38
|
||||
// (set) Token: 0x060097E6 RID: 38886 RVA: 0x001F4B4C File Offset: 0x001F2D4C
|
||||
[Token(Token = "0x17001842")]
|
||||
public BigInteger MaxCrlNumber
|
||||
{
|
||||
[Token(Token = "0x60097E5")]
|
||||
[Address(RVA = "0x3F63E0", Offset = "0x3F51E0", VA = "0x1803F63E0")]
|
||||
get
|
||||
{
|
||||
return this.maxCrlNumber;
|
||||
}
|
||||
[Token(Token = "0x60097E6")]
|
||||
[Address(RVA = "0x409C60", Offset = "0x408A60", VA = "0x180409C60")]
|
||||
set
|
||||
{
|
||||
this.maxCrlNumber = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001843 RID: 6211
|
||||
// (get) Token: 0x060097E7 RID: 38887 RVA: 0x001F4B60 File Offset: 0x001F2D60
|
||||
// (set) Token: 0x060097E8 RID: 38888 RVA: 0x001F4B74 File Offset: 0x001F2D74
|
||||
[Token(Token = "0x17001843")]
|
||||
public BigInteger MinCrlNumber
|
||||
{
|
||||
[Token(Token = "0x60097E7")]
|
||||
[Address(RVA = "0x3FA180", Offset = "0x3F8F80", VA = "0x1803FA180")]
|
||||
get
|
||||
{
|
||||
return this.minCrlNumber;
|
||||
}
|
||||
[Token(Token = "0x60097E8")]
|
||||
[Address(RVA = "0x4437E0", Offset = "0x4425E0", VA = "0x1804437E0")]
|
||||
set
|
||||
{
|
||||
this.minCrlNumber = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001844 RID: 6212
|
||||
// (get) Token: 0x060097E9 RID: 38889 RVA: 0x001F4B88 File Offset: 0x001F2D88
|
||||
// (set) Token: 0x060097EA RID: 38890 RVA: 0x001F4B9C File Offset: 0x001F2D9C
|
||||
[Token(Token = "0x17001844")]
|
||||
public IX509AttributeCertificate AttrCertChecking
|
||||
{
|
||||
[Token(Token = "0x60097E9")]
|
||||
[Address(RVA = "0x3F63D0", Offset = "0x3F51D0", VA = "0x1803F63D0")]
|
||||
get
|
||||
{
|
||||
return this.attrCertChecking;
|
||||
}
|
||||
[Token(Token = "0x60097EA")]
|
||||
[Address(RVA = "0x5329E0", Offset = "0x5317E0", VA = "0x1805329E0")]
|
||||
set
|
||||
{
|
||||
this.attrCertChecking = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001845 RID: 6213
|
||||
// (get) Token: 0x060097EB RID: 38891 RVA: 0x001F4BB0 File Offset: 0x001F2DB0
|
||||
// (set) Token: 0x060097EC RID: 38892 RVA: 0x001F4BC4 File Offset: 0x001F2DC4
|
||||
[Token(Token = "0x17001845")]
|
||||
public bool CompleteCrlEnabled
|
||||
{
|
||||
[Token(Token = "0x60097EB")]
|
||||
[Address(RVA = "0x4363F0", Offset = "0x4351F0", VA = "0x1804363F0")]
|
||||
get
|
||||
{
|
||||
return this.completeCrlEnabled;
|
||||
}
|
||||
[Token(Token = "0x60097EC")]
|
||||
[Address(RVA = "0x4366B0", Offset = "0x4354B0", VA = "0x1804366B0")]
|
||||
set
|
||||
{
|
||||
this.completeCrlEnabled = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001846 RID: 6214
|
||||
// (get) Token: 0x060097ED RID: 38893 RVA: 0x001F4BD8 File Offset: 0x001F2DD8
|
||||
// (set) Token: 0x060097EE RID: 38894 RVA: 0x001F4BEC File Offset: 0x001F2DEC
|
||||
[Token(Token = "0x17001846")]
|
||||
public bool DeltaCrlIndicatorEnabled
|
||||
{
|
||||
[Token(Token = "0x60097ED")]
|
||||
[Address(RVA = "0x4364E0", Offset = "0x4352E0", VA = "0x1804364E0")]
|
||||
get
|
||||
{
|
||||
return this.deltaCrlIndicatorEnabled;
|
||||
}
|
||||
[Token(Token = "0x60097EE")]
|
||||
[Address(RVA = "0x436780", Offset = "0x435580", VA = "0x180436780")]
|
||||
set
|
||||
{
|
||||
this.deltaCrlIndicatorEnabled = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001847 RID: 6215
|
||||
// (get) Token: 0x060097EF RID: 38895 RVA: 0x001F4C00 File Offset: 0x001F2E00
|
||||
// (set) Token: 0x060097F0 RID: 38896 RVA: 0x001F4C18 File Offset: 0x001F2E18
|
||||
[Token(Token = "0x17001847")]
|
||||
public byte[] IssuingDistributionPoint
|
||||
{
|
||||
[Token(Token = "0x60097EF")]
|
||||
[Address(RVA = "0x162FC10", Offset = "0x162EA10", VA = "0x18162FC10")]
|
||||
get
|
||||
{
|
||||
return Arrays.Clone(this.issuingDistributionPoint);
|
||||
}
|
||||
[Token(Token = "0x60097F0")]
|
||||
[Address(RVA = "0x162FCE0", Offset = "0x162EAE0", VA = "0x18162FCE0")]
|
||||
set
|
||||
{
|
||||
byte[] array = Arrays.Clone(value);
|
||||
this.issuingDistributionPoint = array;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001848 RID: 6216
|
||||
// (get) Token: 0x060097F1 RID: 38897 RVA: 0x001F4C34 File Offset: 0x001F2E34
|
||||
// (set) Token: 0x060097F2 RID: 38898 RVA: 0x001F4C48 File Offset: 0x001F2E48
|
||||
[Token(Token = "0x17001848")]
|
||||
public bool IssuingDistributionPointEnabled
|
||||
{
|
||||
[Token(Token = "0x60097F1")]
|
||||
[Address(RVA = "0x7722A0", Offset = "0x7710A0", VA = "0x1807722A0")]
|
||||
get
|
||||
{
|
||||
return this.issuingDistributionPointEnabled;
|
||||
}
|
||||
[Token(Token = "0x60097F2")]
|
||||
[Address(RVA = "0x781F80", Offset = "0x780D80", VA = "0x180781F80")]
|
||||
set
|
||||
{
|
||||
this.issuingDistributionPointEnabled = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001849 RID: 6217
|
||||
// (get) Token: 0x060097F3 RID: 38899 RVA: 0x001F4C5C File Offset: 0x001F2E5C
|
||||
// (set) Token: 0x060097F4 RID: 38900 RVA: 0x001F4C70 File Offset: 0x001F2E70
|
||||
[Token(Token = "0x17001849")]
|
||||
public BigInteger MaxBaseCrlNumber
|
||||
{
|
||||
[Token(Token = "0x60097F3")]
|
||||
[Address(RVA = "0x423D40", Offset = "0x422B40", VA = "0x180423D40")]
|
||||
get
|
||||
{
|
||||
return this.maxBaseCrlNumber;
|
||||
}
|
||||
[Token(Token = "0x60097F4")]
|
||||
[Address(RVA = "0x466B90", Offset = "0x465990", VA = "0x180466B90")]
|
||||
set
|
||||
{
|
||||
this.maxBaseCrlNumber = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060097F5 RID: 38901 RVA: 0x001F4C84 File Offset: 0x001F2E84
|
||||
[Token(Token = "0x60097F5")]
|
||||
[Address(RVA = "0x162F540", Offset = "0x162E340", VA = "0x18162F540", 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: 0x040066D9 RID: 26329
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40066D9")]
|
||||
private X509Certificate certificateChecking;
|
||||
|
||||
// Token: 0x040066DA RID: 26330
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40066DA")]
|
||||
private DateTimeObject dateAndTime;
|
||||
|
||||
// Token: 0x040066DB RID: 26331
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40066DB")]
|
||||
private ICollection issuers;
|
||||
|
||||
// Token: 0x040066DC RID: 26332
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40066DC")]
|
||||
private BigInteger maxCrlNumber;
|
||||
|
||||
// Token: 0x040066DD RID: 26333
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40066DD")]
|
||||
private BigInteger minCrlNumber;
|
||||
|
||||
// Token: 0x040066DE RID: 26334
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40066DE")]
|
||||
private IX509AttributeCertificate attrCertChecking;
|
||||
|
||||
// Token: 0x040066DF RID: 26335
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x40066DF")]
|
||||
private bool completeCrlEnabled;
|
||||
|
||||
// Token: 0x040066E0 RID: 26336
|
||||
[FieldOffset(Offset = "0x41")]
|
||||
[Token(Token = "0x40066E0")]
|
||||
private bool deltaCrlIndicatorEnabled;
|
||||
|
||||
// Token: 0x040066E1 RID: 26337
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x40066E1")]
|
||||
private byte[] issuingDistributionPoint;
|
||||
|
||||
// Token: 0x040066E2 RID: 26338
|
||||
[FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x40066E2")]
|
||||
private bool issuingDistributionPointEnabled;
|
||||
|
||||
// Token: 0x040066E3 RID: 26339
|
||||
[FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x40066E3")]
|
||||
private BigInteger maxBaseCrlNumber;
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store
|
||||
{
|
||||
// Token: 0x0200191B RID: 6427
|
||||
[Token(Token = "0x200191B")]
|
||||
[Serializable]
|
||||
public class X509StoreException : Exception
|
||||
{
|
||||
// Token: 0x060097F6 RID: 38902 RVA: 0x001F4DB0 File Offset: 0x001F2FB0
|
||||
[Token(Token = "0x60097F6")]
|
||||
[Address(RVA = "0x16252F0", Offset = "0x16240F0", VA = "0x1816252F0")]
|
||||
public X509StoreException()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060097F7 RID: 38903 RVA: 0x001F4DC4 File Offset: 0x001F2FC4
|
||||
[Token(Token = "0x60097F7")]
|
||||
[Address(RVA = "0x1625350", Offset = "0x1624150", VA = "0x181625350")]
|
||||
public X509StoreException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060097F8 RID: 38904 RVA: 0x001F4DD8 File Offset: 0x001F2FD8
|
||||
[Token(Token = "0x60097F8")]
|
||||
[Address(RVA = "0x1625270", Offset = "0x1624070", VA = "0x181625270")]
|
||||
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: 0x0200191C RID: 6428
|
||||
[Token(Token = "0x200191C")]
|
||||
public sealed class X509StoreFactory
|
||||
{
|
||||
// Token: 0x060097F9 RID: 38905 RVA: 0x001F4DF0 File Offset: 0x001F2FF0
|
||||
[Token(Token = "0x60097F9")]
|
||||
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
||||
private X509StoreFactory()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060097FA RID: 38906 RVA: 0x001F4E04 File Offset: 0x001F3004
|
||||
[Token(Token = "0x60097FA")]
|
||||
[Address(RVA = "0x1632CE0", Offset = "0x1631AE0", VA = "0x181632CE0")]
|
||||
public static IX509Store Create(string type, IX509StoreParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060097FA)
|
||||
|
||||
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: 0x060097FB RID: 38907 RVA: 0x001F4EE4 File Offset: 0x001F30E4
|
||||
[Token(Token = "0x60097FB")]
|
||||
[Address(RVA = "0x16330A0", Offset = "0x1631EA0", VA = "0x1816330A0")]
|
||||
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: 0x020018FE RID: 6398
|
||||
[Token(Token = "0x20018FE")]
|
||||
public sealed class SubjectPublicKeyInfoFactory
|
||||
{
|
||||
// Token: 0x06009694 RID: 38548 RVA: 0x001EF950 File Offset: 0x001EDB50
|
||||
[Token(Token = "0x6009694")]
|
||||
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
||||
private SubjectPublicKeyInfoFactory()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009695 RID: 38549 RVA: 0x001EF964 File Offset: 0x001EDB64
|
||||
[Token(Token = "0x6009695")]
|
||||
[Address(RVA = "0x1625EB0", Offset = "0x1624CB0", VA = "0x181625EB0")]
|
||||
public static SubjectPublicKeyInfo CreateSubjectPublicKeyInfo(AsymmetricKeyParameter publicKey)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009695)
|
||||
|
||||
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: 0x06009696 RID: 38550 RVA: 0x001EFBA8 File Offset: 0x001EDDA8
|
||||
[Token(Token = "0x6009696")]
|
||||
[Address(RVA = "0x1626BD0", Offset = "0x16259D0", VA = "0x181626BD0")]
|
||||
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: 0x020018FF RID: 6399
|
||||
[Token(Token = "0x20018FF")]
|
||||
public class X509AttrCertParser
|
||||
{
|
||||
// Token: 0x06009697 RID: 38551 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6009697")]
|
||||
[Address(RVA = "0x1627410", Offset = "0x1626210", VA = "0x181627410")]
|
||||
private IX509AttributeCertificate ReadDerCertificate(Asn1InputStream dIn)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06009698 RID: 38552 RVA: 0x001EFBEC File Offset: 0x001EDDEC
|
||||
[Token(Token = "0x6009698")]
|
||||
[Address(RVA = "0x1626CA0", Offset = "0x1625AA0", VA = "0x181626CA0")]
|
||||
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: 0x06009699 RID: 38553 RVA: 0x001EFC5C File Offset: 0x001EDE5C
|
||||
[Token(Token = "0x6009699")]
|
||||
[Address(RVA = "0x1627640", Offset = "0x1626440", VA = "0x181627640")]
|
||||
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: 0x0600969A RID: 38554 RVA: 0x001EFC8C File Offset: 0x001EDE8C
|
||||
[Token(Token = "0x600969A")]
|
||||
[Address(RVA = "0x16270F0", Offset = "0x1625EF0", VA = "0x1816270F0")]
|
||||
public IX509AttributeCertificate ReadAttrCert(byte[] input)
|
||||
{
|
||||
int num;
|
||||
MemoryStream memoryStream = new MemoryStream(input, num != 0);
|
||||
num = 0;
|
||||
return this.ReadAttrCert(memoryStream);
|
||||
}
|
||||
|
||||
// Token: 0x0600969B RID: 38555 RVA: 0x001EFCAC File Offset: 0x001EDEAC
|
||||
[Token(Token = "0x600969B")]
|
||||
[Address(RVA = "0x1627160", Offset = "0x1625F60", VA = "0x181627160")]
|
||||
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: 0x0600969C RID: 38556 RVA: 0x001EFD04 File Offset: 0x001EDF04
|
||||
[Token(Token = "0x600969C")]
|
||||
[Address(RVA = "0x1626E30", Offset = "0x1625C30", VA = "0x181626E30")]
|
||||
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: 0x0600969D RID: 38557 RVA: 0x001EFDF4 File Offset: 0x001EDFF4
|
||||
[Token(Token = "0x600969D")]
|
||||
[Address(RVA = "0x16272D0", Offset = "0x16260D0", VA = "0x1816272D0")]
|
||||
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: 0x0600969E RID: 38558 RVA: 0x001EFE34 File Offset: 0x001EE034
|
||||
[Token(Token = "0x600969E")]
|
||||
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
||||
public X509AttrCertParser()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0400667C RID: 26236
|
||||
[Token(Token = "0x400667C")]
|
||||
private static readonly PemParser PemAttrCertParser = new PemParser("ATTRIBUTE CERTIFICATE");
|
||||
|
||||
// Token: 0x0400667D RID: 26237
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400667D")]
|
||||
private Asn1Set sData;
|
||||
|
||||
// Token: 0x0400667E RID: 26238
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400667E")]
|
||||
private int sDataObjectCount;
|
||||
|
||||
// Token: 0x0400667F RID: 26239
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400667F")]
|
||||
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: 0x02001900 RID: 6400
|
||||
[Token(Token = "0x2001900")]
|
||||
public class X509Attribute : Asn1Encodable
|
||||
{
|
||||
// Token: 0x060096A0 RID: 38560 RVA: 0x001EFE64 File Offset: 0x001EE064
|
||||
[Token(Token = "0x60096A0")]
|
||||
[Address(RVA = "0x1628910", Offset = "0x1627710", VA = "0x181628910")]
|
||||
internal X509Attribute(Asn1Encodable at)
|
||||
{
|
||||
AttributeX509 instance = AttributeX509.GetInstance(at);
|
||||
this.attr = instance;
|
||||
}
|
||||
|
||||
// Token: 0x060096A1 RID: 38561 RVA: 0x001EFE88 File Offset: 0x001EE088
|
||||
[Token(Token = "0x60096A1")]
|
||||
[Address(RVA = "0x1628850", Offset = "0x1627650", VA = "0x181628850")]
|
||||
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: 0x060096A2 RID: 38562 RVA: 0x001EFEB8 File Offset: 0x001EE0B8
|
||||
[Token(Token = "0x60096A2")]
|
||||
[Address(RVA = "0x1628790", Offset = "0x1627590", VA = "0x181628790")]
|
||||
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: 0x17001800 RID: 6144
|
||||
// (get) Token: 0x060096A3 RID: 38563 RVA: 0x001EFEE8 File Offset: 0x001EE0E8
|
||||
[Token(Token = "0x17001800")]
|
||||
public string Oid
|
||||
{
|
||||
[Token(Token = "0x60096A3")]
|
||||
[Address(RVA = "0x1628940", Offset = "0x1627740", VA = "0x181628940")]
|
||||
get
|
||||
{
|
||||
return this.attr.attrType.identifier;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060096A4 RID: 38564 RVA: 0x001EFF0C File Offset: 0x001EE10C
|
||||
[Token(Token = "0x60096A4")]
|
||||
[Address(RVA = "0x1628670", Offset = "0x1627470", VA = "0x181628670")]
|
||||
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: 0x060096A5 RID: 38565 RVA: 0x001EFF54 File Offset: 0x001EE154
|
||||
[Token(Token = "0x60096A5")]
|
||||
[Address(RVA = "0x53BA50", Offset = "0x53A850", VA = "0x18053BA50", Slot = "5")]
|
||||
public override Asn1Object ToAsn1Object()
|
||||
{
|
||||
return this.attr.ToAsn1Object();
|
||||
}
|
||||
|
||||
// Token: 0x04006680 RID: 26240
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006680")]
|
||||
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: 0x02001901 RID: 6401
|
||||
[Token(Token = "0x2001901")]
|
||||
public class X509CertPairParser
|
||||
{
|
||||
// Token: 0x060096A6 RID: 38566 RVA: 0x001EFF74 File Offset: 0x001EE174
|
||||
[Token(Token = "0x60096A6")]
|
||||
[Address(RVA = "0x1628F80", Offset = "0x1627D80", VA = "0x181628F80")]
|
||||
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: 0x060096A7 RID: 38567 RVA: 0x001EFFE4 File Offset: 0x001EE1E4
|
||||
[Token(Token = "0x60096A7")]
|
||||
[Address(RVA = "0x1628C60", Offset = "0x1627A60", VA = "0x181628C60")]
|
||||
public X509CertificatePair ReadCertPair(byte[] input)
|
||||
{
|
||||
int num;
|
||||
MemoryStream memoryStream = new MemoryStream(input, num != 0);
|
||||
num = 0;
|
||||
return this.ReadCertPair(memoryStream);
|
||||
}
|
||||
|
||||
// Token: 0x060096A8 RID: 38568 RVA: 0x001F0004 File Offset: 0x001EE204
|
||||
[Token(Token = "0x60096A8")]
|
||||
[Address(RVA = "0x1628E10", Offset = "0x1627C10", VA = "0x181628E10")]
|
||||
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: 0x060096A9 RID: 38569 RVA: 0x001F005C File Offset: 0x001EE25C
|
||||
[Token(Token = "0x60096A9")]
|
||||
[Address(RVA = "0x1628970", Offset = "0x1627770", VA = "0x181628970")]
|
||||
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: 0x060096AA RID: 38570 RVA: 0x001F0130 File Offset: 0x001EE330
|
||||
[Token(Token = "0x60096AA")]
|
||||
[Address(RVA = "0x1628CD0", Offset = "0x1627AD0", VA = "0x181628CD0")]
|
||||
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: 0x060096AB RID: 38571 RVA: 0x001F0170 File Offset: 0x001EE370
|
||||
[Token(Token = "0x60096AB")]
|
||||
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
||||
public X509CertPairParser()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04006681 RID: 26241
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006681")]
|
||||
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: 0x02001902 RID: 6402
|
||||
[Token(Token = "0x2001902")]
|
||||
public class X509Certificate : X509ExtensionBase
|
||||
{
|
||||
// Token: 0x060096AC RID: 38572 RVA: 0x001F0184 File Offset: 0x001EE384
|
||||
[Token(Token = "0x60096AC")]
|
||||
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
||||
protected X509Certificate()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060096AD RID: 38573 RVA: 0x001F0198 File Offset: 0x001EE398
|
||||
[Token(Token = "0x60096AD")]
|
||||
[Address(RVA = "0x162D410", Offset = "0x162C210", VA = "0x18162D410")]
|
||||
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: 0x17001801 RID: 6145
|
||||
// (get) Token: 0x060096AE RID: 38574 RVA: 0x001F0288 File Offset: 0x001EE488
|
||||
[Token(Token = "0x17001801")]
|
||||
public virtual X509CertificateStructure CertificateStructure
|
||||
{
|
||||
[Token(Token = "0x60096AE")]
|
||||
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20", Slot = "13")]
|
||||
get
|
||||
{
|
||||
return this.c;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001802 RID: 6146
|
||||
// (get) Token: 0x060096AF RID: 38575 RVA: 0x001F029C File Offset: 0x001EE49C
|
||||
[Token(Token = "0x17001802")]
|
||||
public virtual bool IsValidNow
|
||||
{
|
||||
[Token(Token = "0x60096AF")]
|
||||
[Address(RVA = "0x162D6F0", Offset = "0x162C4F0", VA = "0x18162D6F0", Slot = "14")]
|
||||
get
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060096AF)
|
||||
|
||||
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: 0x060096B0 RID: 38576 RVA: 0x001F02B8 File Offset: 0x001EE4B8
|
||||
[Token(Token = "0x60096B0")]
|
||||
[Address(RVA = "0x162C6C0", Offset = "0x162B4C0", VA = "0x18162C6C0", Slot = "15")]
|
||||
public virtual bool IsValid(DateTime time)
|
||||
{
|
||||
X509Name subjectDN = this.SubjectDN;
|
||||
DateTime notBefore = this.NotBefore;
|
||||
int num;
|
||||
return num <= 0;
|
||||
}
|
||||
|
||||
// Token: 0x060096B1 RID: 38577 RVA: 0x001F02E0 File Offset: 0x001EE4E0
|
||||
[Token(Token = "0x60096B1")]
|
||||
[Address(RVA = "0x162B9A0", Offset = "0x162A7A0", VA = "0x18162B9A0", Slot = "16")]
|
||||
public virtual void CheckValidity()
|
||||
{
|
||||
DateTime utcNow = DateTime.UtcNow;
|
||||
ISet criticalExtensionOids = ((IX509Extension)this).GetCriticalExtensionOids();
|
||||
}
|
||||
|
||||
// Token: 0x060096B2 RID: 38578 RVA: 0x001F02FC File Offset: 0x001EE4FC
|
||||
[Token(Token = "0x60096B2")]
|
||||
[Address(RVA = "0x162BA10", Offset = "0x162A810", VA = "0x18162BA10", Slot = "17")]
|
||||
public virtual void CheckValidity(DateTime time)
|
||||
{
|
||||
DateTime notBefore = this.NotBefore;
|
||||
X509Name subjectDN = this.SubjectDN;
|
||||
}
|
||||
|
||||
// Token: 0x17001803 RID: 6147
|
||||
// (get) Token: 0x060096B3 RID: 38579 RVA: 0x001F0338 File Offset: 0x001EE538
|
||||
[Token(Token = "0x17001803")]
|
||||
public virtual int Version
|
||||
{
|
||||
[Token(Token = "0x60096B3")]
|
||||
[Address(RVA = "0x162D950", Offset = "0x162C750", VA = "0x18162D950", Slot = "18")]
|
||||
get
|
||||
{
|
||||
return this.c.Version;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001804 RID: 6148
|
||||
// (get) Token: 0x060096B4 RID: 38580 RVA: 0x001F0358 File Offset: 0x001EE558
|
||||
[Token(Token = "0x17001804")]
|
||||
public virtual BigInteger SerialNumber
|
||||
{
|
||||
[Token(Token = "0x60096B4")]
|
||||
[Address(RVA = "0x162D810", Offset = "0x162C610", VA = "0x18162D810", Slot = "19")]
|
||||
get
|
||||
{
|
||||
return this.c.SerialNumber.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001805 RID: 6149
|
||||
// (get) Token: 0x060096B5 RID: 38581 RVA: 0x001F037C File Offset: 0x001EE57C
|
||||
[Token(Token = "0x17001805")]
|
||||
public virtual X509Name IssuerDN
|
||||
{
|
||||
[Token(Token = "0x60096B5")]
|
||||
[Address(RVA = "0x162D760", Offset = "0x162C560", VA = "0x18162D760", Slot = "20")]
|
||||
get
|
||||
{
|
||||
return this.c.Issuer;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001806 RID: 6150
|
||||
// (get) Token: 0x060096B6 RID: 38582 RVA: 0x001F039C File Offset: 0x001EE59C
|
||||
[Token(Token = "0x17001806")]
|
||||
public virtual X509Name SubjectDN
|
||||
{
|
||||
[Token(Token = "0x60096B6")]
|
||||
[Address(RVA = "0x162D900", Offset = "0x162C700", VA = "0x18162D900", Slot = "21")]
|
||||
get
|
||||
{
|
||||
return this.c.Subject;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001807 RID: 6151
|
||||
// (get) Token: 0x060096B7 RID: 38583 RVA: 0x001F03BC File Offset: 0x001EE5BC
|
||||
[Token(Token = "0x17001807")]
|
||||
public virtual DateTime NotBefore
|
||||
{
|
||||
[Token(Token = "0x60096B7")]
|
||||
[Address(RVA = "0x162D7E0", Offset = "0x162C5E0", VA = "0x18162D7E0", Slot = "22")]
|
||||
get
|
||||
{
|
||||
return this.c.StartDate.ToDateTime();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001808 RID: 6152
|
||||
// (get) Token: 0x060096B8 RID: 38584 RVA: 0x001F03E0 File Offset: 0x001EE5E0
|
||||
[Token(Token = "0x17001808")]
|
||||
public virtual DateTime NotAfter
|
||||
{
|
||||
[Token(Token = "0x60096B8")]
|
||||
[Address(RVA = "0x162D7B0", Offset = "0x162C5B0", VA = "0x18162D7B0", Slot = "23")]
|
||||
get
|
||||
{
|
||||
return this.c.EndDate.ToDateTime();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060096B9 RID: 38585 RVA: 0x001F0404 File Offset: 0x001EE604
|
||||
[Token(Token = "0x60096B9")]
|
||||
[Address(RVA = "0x162C4E0", Offset = "0x162B2E0", VA = "0x18162C4E0", Slot = "24")]
|
||||
public virtual byte[] GetTbsCertificate()
|
||||
{
|
||||
return this.c.tbsCert.GetDerEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x060096BA RID: 38586 RVA: 0x001F0428 File Offset: 0x001EE628
|
||||
[Token(Token = "0x60096BA")]
|
||||
[Address(RVA = "0x162C470", Offset = "0x162B270", VA = "0x18162C470", Slot = "25")]
|
||||
public virtual byte[] GetSignature()
|
||||
{
|
||||
return this.c.GetSignatureOctets();
|
||||
}
|
||||
|
||||
// Token: 0x17001809 RID: 6153
|
||||
// (get) Token: 0x060096BB RID: 38587 RVA: 0x001F0448 File Offset: 0x001EE648
|
||||
[Token(Token = "0x17001809")]
|
||||
public virtual string SigAlgName
|
||||
{
|
||||
[Token(Token = "0x60096BB")]
|
||||
[Address(RVA = "0x162D840", Offset = "0x162C640", VA = "0x18162D840", Slot = "26")]
|
||||
get
|
||||
{
|
||||
Asn1Object asn1Object = this.c.sigAlgID.ToAsn1Object();
|
||||
string text;
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700180A RID: 6154
|
||||
// (get) Token: 0x060096BC RID: 38588 RVA: 0x001F0470 File Offset: 0x001EE670
|
||||
[Token(Token = "0x1700180A")]
|
||||
public virtual string SigAlgOid
|
||||
{
|
||||
[Token(Token = "0x60096BC")]
|
||||
[Address(RVA = "0x162D8C0", Offset = "0x162C6C0", VA = "0x18162D8C0", Slot = "27")]
|
||||
get
|
||||
{
|
||||
Asn1Object asn1Object = this.c.sigAlgID.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060096BD RID: 38589 RVA: 0x001F0494 File Offset: 0x001EE694
|
||||
[Token(Token = "0x60096BD")]
|
||||
[Address(RVA = "0x162C3F0", Offset = "0x162B1F0", VA = "0x18162C3F0", Slot = "28")]
|
||||
public virtual byte[] GetSigAlgParams()
|
||||
{
|
||||
if (this.c.sigAlgID.ObjectID == 0)
|
||||
{
|
||||
}
|
||||
return this.c.sigAlgID.ObjectID.GetDerEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x1700180B RID: 6155
|
||||
// (get) Token: 0x060096BE RID: 38590 RVA: 0x001F04D0 File Offset: 0x001EE6D0
|
||||
[Token(Token = "0x1700180B")]
|
||||
public virtual DerBitString IssuerUniqueID
|
||||
{
|
||||
[Token(Token = "0x60096BE")]
|
||||
[Address(RVA = "0x162D780", Offset = "0x162C580", VA = "0x18162D780", Slot = "29")]
|
||||
get
|
||||
{
|
||||
return this.c.tbsCert.issuerUniqueID;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700180C RID: 6156
|
||||
// (get) Token: 0x060096BF RID: 38591 RVA: 0x001F04F4 File Offset: 0x001EE6F4
|
||||
[Token(Token = "0x1700180C")]
|
||||
public virtual DerBitString SubjectUniqueID
|
||||
{
|
||||
[Token(Token = "0x60096BF")]
|
||||
[Address(RVA = "0x162D920", Offset = "0x162C720", VA = "0x18162D920", Slot = "30")]
|
||||
get
|
||||
{
|
||||
return this.c.tbsCert.subjectUniqueID;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060096C0 RID: 38592 RVA: 0x001F0518 File Offset: 0x001EE718
|
||||
[Token(Token = "0x60096C0")]
|
||||
[Address(RVA = "0x162C340", Offset = "0x162B140", VA = "0x18162C340", Slot = "31")]
|
||||
public virtual bool[] GetKeyUsage()
|
||||
{
|
||||
while (this.keyUsage != 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060096C1 RID: 38593 RVA: 0x001F0530 File Offset: 0x001EE730
|
||||
[Token(Token = "0x60096C1")]
|
||||
[Address(RVA = "0x162BEF0", Offset = "0x162ACF0", VA = "0x18162BEF0", 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: 0x060096C2 RID: 38594 RVA: 0x001F05C0 File Offset: 0x001EE7C0
|
||||
[Token(Token = "0x60096C2")]
|
||||
[Address(RVA = "0x162BE50", Offset = "0x162AC50", VA = "0x18162BE50", 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: 0x060096C3 RID: 38595 RVA: 0x001F0610 File Offset: 0x001EE810
|
||||
[Token(Token = "0x60096C3")]
|
||||
[Address(RVA = "0x162C490", Offset = "0x162B290", VA = "0x18162C490", Slot = "34")]
|
||||
public virtual ICollection GetSubjectAlternativeNames()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060096C3)
|
||||
|
||||
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: 0x060096C4 RID: 38596 RVA: 0x001F0624 File Offset: 0x001EE824
|
||||
[Token(Token = "0x60096C4")]
|
||||
[Address(RVA = "0x162C2F0", Offset = "0x162B0F0", VA = "0x18162C2F0", Slot = "35")]
|
||||
public virtual ICollection GetIssuerAlternativeNames()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060096C4)
|
||||
|
||||
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: 0x060096C5 RID: 38597 RVA: 0x001F0638 File Offset: 0x001EE838
|
||||
[Token(Token = "0x60096C5")]
|
||||
[Address(RVA = "0x162BC40", Offset = "0x162AA40", VA = "0x18162BC40", 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: 0x060096C6 RID: 38598 RVA: 0x001F06B8 File Offset: 0x001EE8B8
|
||||
[Token(Token = "0x60096C6")]
|
||||
[Address(RVA = "0x162C510", Offset = "0x162B310", VA = "0x18162C510", Slot = "8")]
|
||||
protected override X509Extensions GetX509Extensions()
|
||||
{
|
||||
int version = this.c.Version;
|
||||
return this.c.tbsCert.extensions;
|
||||
}
|
||||
|
||||
// Token: 0x060096C7 RID: 38599 RVA: 0x001F06EC File Offset: 0x001EE8EC
|
||||
[Token(Token = "0x60096C7")]
|
||||
[Address(RVA = "0x162C3C0", Offset = "0x162B1C0", VA = "0x18162C3C0", Slot = "37")]
|
||||
public virtual AsymmetricKeyParameter GetPublicKey()
|
||||
{
|
||||
return PublicKeyFactory.CreateKey(this.c.SubjectPublicKeyInfo);
|
||||
}
|
||||
|
||||
// Token: 0x060096C8 RID: 38600 RVA: 0x001F0710 File Offset: 0x001EE910
|
||||
[Token(Token = "0x60096C8")]
|
||||
[Address(RVA = "0x162BED0", Offset = "0x162ACD0", VA = "0x18162BED0", Slot = "38")]
|
||||
public virtual byte[] GetEncoded()
|
||||
{
|
||||
return this.c.GetDerEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x060096C9 RID: 38601 RVA: 0x001F0730 File Offset: 0x001EE930
|
||||
[Token(Token = "0x60096C9")]
|
||||
[Address(RVA = "0x162BB80", Offset = "0x162A980", VA = "0x18162BB80", Slot = "0")]
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj != this)
|
||||
{
|
||||
if (obj != 0 && obj != 0)
|
||||
{
|
||||
Asn1Object asn1Object = this.c.ToAsn1Object();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x060096CA RID: 38602 RVA: 0x001F0760 File Offset: 0x001EE960
|
||||
[Token(Token = "0x60096CA")]
|
||||
[Address(RVA = "0x162C240", Offset = "0x162B040", VA = "0x18162C240", 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: 0x060096CB RID: 38603 RVA: 0x001F07A0 File Offset: 0x001EE9A0
|
||||
[Token(Token = "0x60096CB")]
|
||||
[Address(RVA = "0x162C730", Offset = "0x162B530", VA = "0x18162C730", 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: 0x060096CC RID: 38604 RVA: 0x001F0ACC File Offset: 0x001EECCC
|
||||
[Token(Token = "0x60096CC")]
|
||||
[Address(RVA = "0x162D370", Offset = "0x162C170", VA = "0x18162D370", Slot = "39")]
|
||||
public virtual void Verify(AsymmetricKeyParameter key)
|
||||
{
|
||||
Asn1VerifierFactory asn1VerifierFactory = new Asn1VerifierFactory(this.c.sigAlgID, key);
|
||||
ISet criticalExtensionOids = ((IX509Extension)this).GetCriticalExtensionOids();
|
||||
}
|
||||
|
||||
// Token: 0x060096CD RID: 38605 RVA: 0x001F0AF8 File Offset: 0x001EECF8
|
||||
[Token(Token = "0x60096CD")]
|
||||
[Address(RVA = "0x162D2F0", Offset = "0x162C0F0", VA = "0x18162D2F0", Slot = "40")]
|
||||
public virtual void Verify(IVerifierFactoryProvider verifierProvider)
|
||||
{
|
||||
X509CertificateStructure x509CertificateStructure = this.c;
|
||||
ISet criticalExtensionOids = ((IX509Extension)this).GetCriticalExtensionOids();
|
||||
}
|
||||
|
||||
// Token: 0x060096CE RID: 38606 RVA: 0x001F0B1C File Offset: 0x001EED1C
|
||||
[Token(Token = "0x60096CE")]
|
||||
[Address(RVA = "0x162B620", Offset = "0x162A420", VA = "0x18162B620", Slot = "41")]
|
||||
protected virtual void CheckSignature(IVerifierFactory verifier)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060096CE)
|
||||
|
||||
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: 0x060096CF RID: 38607 RVA: 0x001F0BE0 File Offset: 0x001EEDE0
|
||||
[Token(Token = "0x60096CF")]
|
||||
[Address(RVA = "0x162C560", Offset = "0x162B360", VA = "0x18162C560")]
|
||||
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: 0x04006682 RID: 26242
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006682")]
|
||||
private readonly X509CertificateStructure c;
|
||||
|
||||
// Token: 0x04006683 RID: 26243
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006683")]
|
||||
private readonly BasicConstraints basicConstraints;
|
||||
|
||||
// Token: 0x04006684 RID: 26244
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4006684")]
|
||||
private readonly bool[] keyUsage;
|
||||
|
||||
// Token: 0x04006685 RID: 26245
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4006685")]
|
||||
private bool hashValueSet;
|
||||
|
||||
// Token: 0x04006686 RID: 26246
|
||||
[FieldOffset(Offset = "0x2C")]
|
||||
[Token(Token = "0x4006686")]
|
||||
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: 0x02001903 RID: 6403
|
||||
[Token(Token = "0x2001903")]
|
||||
public class X509CertificatePair
|
||||
{
|
||||
// Token: 0x060096D0 RID: 38608 RVA: 0x001F0C38 File Offset: 0x001EEE38
|
||||
[Token(Token = "0x60096D0")]
|
||||
[Address(RVA = "0x4089A0", Offset = "0x4077A0", VA = "0x1804089A0")]
|
||||
public X509CertificatePair(X509Certificate forward, X509Certificate reverse)
|
||||
{
|
||||
this.forward = forward;
|
||||
this.reverse = reverse;
|
||||
}
|
||||
|
||||
// Token: 0x060096D1 RID: 38609 RVA: 0x001F0C5C File Offset: 0x001EEE5C
|
||||
[Token(Token = "0x60096D1")]
|
||||
[Address(RVA = "0x162AAF0", Offset = "0x16298F0", VA = "0x18162AAF0")]
|
||||
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: 0x060096D2 RID: 38610 RVA: 0x001F0CA8 File Offset: 0x001EEEA8
|
||||
[Token(Token = "0x60096D2")]
|
||||
[Address(RVA = "0x162A8C0", Offset = "0x16296C0", VA = "0x18162A8C0")]
|
||||
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: 0x1700180D RID: 6157
|
||||
// (get) Token: 0x060096D3 RID: 38611 RVA: 0x001F0D28 File Offset: 0x001EEF28
|
||||
[Token(Token = "0x1700180D")]
|
||||
public X509Certificate Forward
|
||||
{
|
||||
[Token(Token = "0x60096D3")]
|
||||
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20")]
|
||||
get
|
||||
{
|
||||
return this.forward;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700180E RID: 6158
|
||||
// (get) Token: 0x060096D4 RID: 38612 RVA: 0x001F0D3C File Offset: 0x001EEF3C
|
||||
[Token(Token = "0x1700180E")]
|
||||
public X509Certificate Reverse
|
||||
{
|
||||
[Token(Token = "0x60096D4")]
|
||||
[Address(RVA = "0x3F5F40", Offset = "0x3F4D40", VA = "0x1803F5F40")]
|
||||
get
|
||||
{
|
||||
return this.reverse;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060096D5 RID: 38613 RVA: 0x001F0D50 File Offset: 0x001EEF50
|
||||
[Token(Token = "0x60096D5")]
|
||||
[Address(RVA = "0x162A7F0", Offset = "0x16295F0", VA = "0x18162A7F0", 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: 0x060096D6 RID: 38614 RVA: 0x001F0D84 File Offset: 0x001EEF84
|
||||
[Token(Token = "0x60096D6")]
|
||||
[Address(RVA = "0x162AA80", Offset = "0x1629880", VA = "0x18162AA80", Slot = "2")]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060096D6)
|
||||
|
||||
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: 0x04006687 RID: 26247
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006687")]
|
||||
private readonly X509Certificate forward;
|
||||
|
||||
// Token: 0x04006688 RID: 26248
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006688")]
|
||||
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: 0x02001904 RID: 6404
|
||||
[Token(Token = "0x2001904")]
|
||||
public class X509CertificateParser
|
||||
{
|
||||
// Token: 0x060096D7 RID: 38615 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x60096D7")]
|
||||
[Address(RVA = "0x162B2F0", Offset = "0x162A0F0", VA = "0x18162B2F0")]
|
||||
private X509Certificate ReadDerCertificate(Asn1InputStream dIn)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x060096D8 RID: 38616 RVA: 0x001F0DBC File Offset: 0x001EEFBC
|
||||
[Token(Token = "0x60096D8")]
|
||||
[Address(RVA = "0x162AC10", Offset = "0x1629A10", VA = "0x18162AC10")]
|
||||
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: 0x060096D9 RID: 38617 RVA: 0x001F0E1C File Offset: 0x001EF01C
|
||||
[Token(Token = "0x60096D9")]
|
||||
[Address(RVA = "0x162B510", Offset = "0x162A310", VA = "0x18162B510")]
|
||||
private X509Certificate ReadPemCertificate(Stream inStream)
|
||||
{
|
||||
Asn1Sequence asn1Sequence = X509CertificateParser.PemCertParser.ReadPemObject(inStream);
|
||||
if (asn1Sequence == 0)
|
||||
{
|
||||
}
|
||||
X509CertificateStructure instance = X509CertificateStructure.GetInstance(asn1Sequence);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x060096DA RID: 38618 RVA: 0x001F0E48 File Offset: 0x001EF048
|
||||
[Token(Token = "0x60096DA")]
|
||||
[Address(RVA = "0x162ABB0", Offset = "0x16299B0", VA = "0x18162ABB0", Slot = "4")]
|
||||
protected virtual X509Certificate CreateX509Certificate(X509CertificateStructure c)
|
||||
{
|
||||
return new X509Certificate(c);
|
||||
}
|
||||
|
||||
// Token: 0x060096DB RID: 38619 RVA: 0x001F0E5C File Offset: 0x001EF05C
|
||||
[Token(Token = "0x60096DB")]
|
||||
[Address(RVA = "0x162AD30", Offset = "0x1629B30", VA = "0x18162AD30")]
|
||||
public X509Certificate ReadCertificate(byte[] input)
|
||||
{
|
||||
int num;
|
||||
MemoryStream memoryStream = new MemoryStream(input, num != 0);
|
||||
num = 0;
|
||||
return this.ReadCertificate(memoryStream);
|
||||
}
|
||||
|
||||
// Token: 0x060096DC RID: 38620 RVA: 0x001F0E7C File Offset: 0x001EF07C
|
||||
[Token(Token = "0x60096DC")]
|
||||
[Address(RVA = "0x162B040", Offset = "0x1629E40", VA = "0x18162B040")]
|
||||
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: 0x060096DD RID: 38621 RVA: 0x001F0ED4 File Offset: 0x001EF0D4
|
||||
[Token(Token = "0x60096DD")]
|
||||
[Address(RVA = "0x162ADA0", Offset = "0x1629BA0", VA = "0x18162ADA0")]
|
||||
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: 0x060096DE RID: 38622 RVA: 0x001F0FC0 File Offset: 0x001EF1C0
|
||||
[Token(Token = "0x60096DE")]
|
||||
[Address(RVA = "0x162B1B0", Offset = "0x1629FB0", VA = "0x18162B1B0")]
|
||||
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: 0x060096DF RID: 38623 RVA: 0x001F1000 File Offset: 0x001EF200
|
||||
[Token(Token = "0x60096DF")]
|
||||
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
||||
public X509CertificateParser()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04006689 RID: 26249
|
||||
[Token(Token = "0x4006689")]
|
||||
private static readonly PemParser PemCertParser = new PemParser("CERTIFICATE");
|
||||
|
||||
// Token: 0x0400668A RID: 26250
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400668A")]
|
||||
private Asn1Set sData;
|
||||
|
||||
// Token: 0x0400668B RID: 26251
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400668B")]
|
||||
private int sDataObjectCount;
|
||||
|
||||
// Token: 0x0400668C RID: 26252
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400668C")]
|
||||
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: 0x02001905 RID: 6405
|
||||
[Token(Token = "0x2001905")]
|
||||
public class X509Crl : X509ExtensionBase
|
||||
{
|
||||
// Token: 0x060096E1 RID: 38625 RVA: 0x001F1030 File Offset: 0x001EF230
|
||||
[Token(Token = "0x60096E1")]
|
||||
[Address(RVA = "0x16317B0", Offset = "0x16305B0", VA = "0x1816317B0")]
|
||||
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: 0x060096E2 RID: 38626 RVA: 0x001F10B4 File Offset: 0x001EF2B4
|
||||
[Token(Token = "0x60096E2")]
|
||||
[Address(RVA = "0x1630560", Offset = "0x162F360", VA = "0x181630560", Slot = "8")]
|
||||
protected override X509Extensions GetX509Extensions()
|
||||
{
|
||||
int version = this.c.Version;
|
||||
return this.c.tbsCertList.crlExtensions;
|
||||
}
|
||||
|
||||
// Token: 0x060096E3 RID: 38627 RVA: 0x001F10E8 File Offset: 0x001EF2E8
|
||||
[Token(Token = "0x60096E3")]
|
||||
[Address(RVA = "0x1630080", Offset = "0x162EE80", VA = "0x181630080", Slot = "13")]
|
||||
public virtual byte[] GetEncoded()
|
||||
{
|
||||
return this.c.GetDerEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x060096E4 RID: 38628 RVA: 0x001F110C File Offset: 0x001EF30C
|
||||
[Token(Token = "0x60096E4")]
|
||||
[Address(RVA = "0x16316B0", Offset = "0x16304B0", VA = "0x1816316B0", Slot = "14")]
|
||||
public virtual void Verify(AsymmetricKeyParameter publicKey)
|
||||
{
|
||||
Asn1VerifierFactoryProvider asn1VerifierFactoryProvider = new Asn1VerifierFactoryProvider(publicKey);
|
||||
ISet criticalExtensionOids = ((IX509Extension)this).GetCriticalExtensionOids();
|
||||
}
|
||||
|
||||
// Token: 0x060096E5 RID: 38629 RVA: 0x001F1128 File Offset: 0x001EF328
|
||||
[Token(Token = "0x60096E5")]
|
||||
[Address(RVA = "0x1631730", Offset = "0x1630530", VA = "0x181631730", Slot = "15")]
|
||||
public virtual void Verify(IVerifierFactoryProvider verifierProvider)
|
||||
{
|
||||
CertificateList certificateList = this.c;
|
||||
ISet criticalExtensionOids = ((IX509Extension)this).GetCriticalExtensionOids();
|
||||
}
|
||||
|
||||
// Token: 0x060096E6 RID: 38630 RVA: 0x001F114C File Offset: 0x001EF34C
|
||||
[Token(Token = "0x60096E6")]
|
||||
[Address(RVA = "0x162FD50", Offset = "0x162EB50", VA = "0x18162FD50", Slot = "16")]
|
||||
protected virtual void CheckSignature(IVerifierFactory verifier)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060096E6)
|
||||
|
||||
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: 0x1700180F RID: 6159
|
||||
// (get) Token: 0x060096E7 RID: 38631 RVA: 0x001F11BC File Offset: 0x001EF3BC
|
||||
[Token(Token = "0x1700180F")]
|
||||
public virtual int Version
|
||||
{
|
||||
[Token(Token = "0x60096E7")]
|
||||
[Address(RVA = "0x1631B30", Offset = "0x1630930", VA = "0x181631B30", Slot = "17")]
|
||||
get
|
||||
{
|
||||
return this.c.Version;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001810 RID: 6160
|
||||
// (get) Token: 0x060096E8 RID: 38632 RVA: 0x001F11DC File Offset: 0x001EF3DC
|
||||
[Token(Token = "0x17001810")]
|
||||
public virtual X509Name IssuerDN
|
||||
{
|
||||
[Token(Token = "0x60096E8")]
|
||||
[Address(RVA = "0x1631A40", Offset = "0x1630840", VA = "0x181631A40", Slot = "18")]
|
||||
get
|
||||
{
|
||||
return this.c.Issuer;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001811 RID: 6161
|
||||
// (get) Token: 0x060096E9 RID: 38633 RVA: 0x001F11FC File Offset: 0x001EF3FC
|
||||
[Token(Token = "0x17001811")]
|
||||
public virtual DateTime ThisUpdate
|
||||
{
|
||||
[Token(Token = "0x60096E9")]
|
||||
[Address(RVA = "0x1631B00", Offset = "0x1630900", VA = "0x181631B00", Slot = "19")]
|
||||
get
|
||||
{
|
||||
return this.c.ThisUpdate.ToDateTime();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001812 RID: 6162
|
||||
// (get) Token: 0x060096EA RID: 38634 RVA: 0x001F1220 File Offset: 0x001EF420
|
||||
[Token(Token = "0x17001812")]
|
||||
public virtual DateTimeObject NextUpdate
|
||||
{
|
||||
[Token(Token = "0x60096EA")]
|
||||
[Address(RVA = "0x1631A60", Offset = "0x1630860", VA = "0x181631A60", Slot = "20")]
|
||||
get
|
||||
{
|
||||
if (this.c.NextUpdate == 0)
|
||||
{
|
||||
}
|
||||
return new DateTimeObject(this.c.NextUpdate.ToDateTime());
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060096EB RID: 38635 RVA: 0x001F1258 File Offset: 0x001EF458
|
||||
[Token(Token = "0x60096EB")]
|
||||
[Address(RVA = "0x1630690", Offset = "0x162F490", VA = "0x181630690")]
|
||||
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: 0x060096EC RID: 38636 RVA: 0x001F1304 File Offset: 0x001EF504
|
||||
[Token(Token = "0x60096EC")]
|
||||
[Address(RVA = "0x1630130", Offset = "0x162EF30", VA = "0x181630130", 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: 0x060096ED RID: 38637 RVA: 0x001F1370 File Offset: 0x001EF570
|
||||
[Token(Token = "0x60096ED")]
|
||||
[Address(RVA = "0x16303D0", Offset = "0x162F1D0", VA = "0x1816303D0", Slot = "22")]
|
||||
public virtual ISet GetRevokedCertificates()
|
||||
{
|
||||
ISet set = this.LoadCrlEntries();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x060096EE RID: 38638 RVA: 0x001F138C File Offset: 0x001EF58C
|
||||
[Token(Token = "0x60096EE")]
|
||||
[Address(RVA = "0x16304A0", Offset = "0x162F2A0", VA = "0x1816304A0", Slot = "23")]
|
||||
public virtual byte[] GetTbsCertList()
|
||||
{
|
||||
return this.c.tbsCertList.GetDerEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x060096EF RID: 38639 RVA: 0x001F13BC File Offset: 0x001EF5BC
|
||||
[Token(Token = "0x60096EF")]
|
||||
[Address(RVA = "0x162C470", Offset = "0x162B270", VA = "0x18162C470", Slot = "24")]
|
||||
public virtual byte[] GetSignature()
|
||||
{
|
||||
return this.c.GetSignatureOctets();
|
||||
}
|
||||
|
||||
// Token: 0x17001813 RID: 6163
|
||||
// (get) Token: 0x060096F0 RID: 38640 RVA: 0x001F13DC File Offset: 0x001EF5DC
|
||||
[Token(Token = "0x17001813")]
|
||||
public virtual string SigAlgName
|
||||
{
|
||||
[Token(Token = "0x60096F0")]
|
||||
[Address(RVA = "0x3F5F40", Offset = "0x3F4D40", VA = "0x1803F5F40", Slot = "25")]
|
||||
get
|
||||
{
|
||||
return this.sigAlgName;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001814 RID: 6164
|
||||
// (get) Token: 0x060096F1 RID: 38641 RVA: 0x001F13F0 File Offset: 0x001EF5F0
|
||||
[Token(Token = "0x17001814")]
|
||||
public virtual string SigAlgOid
|
||||
{
|
||||
[Token(Token = "0x60096F1")]
|
||||
[Address(RVA = "0x162D8C0", Offset = "0x162C6C0", VA = "0x18162D8C0", Slot = "26")]
|
||||
get
|
||||
{
|
||||
Asn1Object asn1Object = this.c.sigAlgID.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060096F2 RID: 38642 RVA: 0x001F1414 File Offset: 0x001EF614
|
||||
[Token(Token = "0x60096F2")]
|
||||
[Address(RVA = "0x1630440", Offset = "0x162F240", VA = "0x181630440", Slot = "27")]
|
||||
public virtual byte[] GetSigAlgParams()
|
||||
{
|
||||
return Arrays.Clone(this.sigAlgParams);
|
||||
}
|
||||
|
||||
// Token: 0x060096F3 RID: 38643 RVA: 0x001F142C File Offset: 0x001EF62C
|
||||
[Token(Token = "0x60096F3")]
|
||||
[Address(RVA = "0x162FFC0", Offset = "0x162EDC0", VA = "0x18162FFC0", Slot = "0")]
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj != this)
|
||||
{
|
||||
if (obj != 0 && obj != 0)
|
||||
{
|
||||
Asn1Object asn1Object = this.c.ToAsn1Object();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x060096F4 RID: 38644 RVA: 0x001F145C File Offset: 0x001EF65C
|
||||
[Token(Token = "0x60096F4")]
|
||||
[Address(RVA = "0x4DA700", Offset = "0x4D9500", VA = "0x1804DA700", Slot = "2")]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
Asn1Object asn1Object = this.c.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x060096F5 RID: 38645 RVA: 0x001F147C File Offset: 0x001EF67C
|
||||
[Token(Token = "0x60096F5")]
|
||||
[Address(RVA = "0x1630990", Offset = "0x162F790", VA = "0x181630990", 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: 0x060096F6 RID: 38646 RVA: 0x001F17A0 File Offset: 0x001EF9A0
|
||||
[Token(Token = "0x60096F6")]
|
||||
[Address(RVA = "0x16305B0", Offset = "0x162F3B0", VA = "0x1816305B0", 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: 0x17001815 RID: 6165
|
||||
// (get) Token: 0x060096F7 RID: 38647 RVA: 0x001F17F4 File Offset: 0x001EF9F4
|
||||
[Token(Token = "0x17001815")]
|
||||
protected virtual bool IsIndirectCrl
|
||||
{
|
||||
[Token(Token = "0x60096F7")]
|
||||
[Address(RVA = "0x1631920", Offset = "0x1630720", VA = "0x181631920", 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: 0x0400668D RID: 26253
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400668D")]
|
||||
private readonly CertificateList c;
|
||||
|
||||
// Token: 0x0400668E RID: 26254
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400668E")]
|
||||
private readonly string sigAlgName;
|
||||
|
||||
// Token: 0x0400668F RID: 26255
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400668F")]
|
||||
private readonly byte[] sigAlgParams;
|
||||
|
||||
// Token: 0x04006690 RID: 26256
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4006690")]
|
||||
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: 0x02001906 RID: 6406
|
||||
[Token(Token = "0x2001906")]
|
||||
public class X509CrlEntry : X509ExtensionBase
|
||||
{
|
||||
// Token: 0x060096F8 RID: 38648 RVA: 0x001F1834 File Offset: 0x001EFA34
|
||||
[Token(Token = "0x60096F8")]
|
||||
[Address(RVA = "0x162E6C0", Offset = "0x162D4C0", VA = "0x18162E6C0")]
|
||||
public X509CrlEntry(CrlEntry c)
|
||||
{
|
||||
this.c = c;
|
||||
X509Name x509Name = this.loadCertificateIssuer();
|
||||
this.certificateIssuer = x509Name;
|
||||
}
|
||||
|
||||
// Token: 0x060096F9 RID: 38649 RVA: 0x001F185C File Offset: 0x001EFA5C
|
||||
[Token(Token = "0x60096F9")]
|
||||
[Address(RVA = "0x162E700", Offset = "0x162D500", VA = "0x18162E700")]
|
||||
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: 0x060096FA RID: 38650 RVA: 0x001F1894 File Offset: 0x001EFA94
|
||||
[Token(Token = "0x60096FA")]
|
||||
[Address(RVA = "0x162E7F0", Offset = "0x162D5F0", VA = "0x18162E7F0")]
|
||||
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: 0x060096FB RID: 38651 RVA: 0x001F1920 File Offset: 0x001EFB20
|
||||
[Token(Token = "0x60096FB")]
|
||||
[Address(RVA = "0x3F63E0", Offset = "0x3F51E0", VA = "0x1803F63E0")]
|
||||
public X509Name GetCertificateIssuer()
|
||||
{
|
||||
return this.certificateIssuer;
|
||||
}
|
||||
|
||||
// Token: 0x060096FC RID: 38652 RVA: 0x001F1934 File Offset: 0x001EFB34
|
||||
[Token(Token = "0x60096FC")]
|
||||
[Address(RVA = "0x162DEE0", Offset = "0x162CCE0", VA = "0x18162DEE0", Slot = "8")]
|
||||
protected override X509Extensions GetX509Extensions()
|
||||
{
|
||||
return this.c.Extensions;
|
||||
}
|
||||
|
||||
// Token: 0x060096FD RID: 38653 RVA: 0x001F1954 File Offset: 0x001EFB54
|
||||
[Token(Token = "0x60096FD")]
|
||||
[Address(RVA = "0x162DE30", Offset = "0x162CC30", VA = "0x18162DE30")]
|
||||
public byte[] GetEncoded()
|
||||
{
|
||||
return this.c.GetDerEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x17001816 RID: 6166
|
||||
// (get) Token: 0x060096FE RID: 38654 RVA: 0x001F1978 File Offset: 0x001EFB78
|
||||
[Token(Token = "0x17001816")]
|
||||
public BigInteger SerialNumber
|
||||
{
|
||||
[Token(Token = "0x60096FE")]
|
||||
[Address(RVA = "0x162E7C0", Offset = "0x162D5C0", VA = "0x18162E7C0")]
|
||||
get
|
||||
{
|
||||
return this.c.userCertificate.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001817 RID: 6167
|
||||
// (get) Token: 0x060096FF RID: 38655 RVA: 0x001F199C File Offset: 0x001EFB9C
|
||||
[Token(Token = "0x17001817")]
|
||||
public DateTime RevocationDate
|
||||
{
|
||||
[Token(Token = "0x60096FF")]
|
||||
[Address(RVA = "0x162E790", Offset = "0x162D590", VA = "0x18162E790")]
|
||||
get
|
||||
{
|
||||
return this.c.revocationDate.ToDateTime();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001818 RID: 6168
|
||||
// (get) Token: 0x06009700 RID: 38656 RVA: 0x001F19C0 File Offset: 0x001EFBC0
|
||||
[Token(Token = "0x17001818")]
|
||||
public bool HasExtensions
|
||||
{
|
||||
[Token(Token = "0x6009700")]
|
||||
[Address(RVA = "0x162E760", Offset = "0x162D560", VA = "0x18162E760")]
|
||||
get
|
||||
{
|
||||
return this.c.Extensions != 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009701 RID: 38657 RVA: 0x001F19E4 File Offset: 0x001EFBE4
|
||||
[Token(Token = "0x6009701")]
|
||||
[Address(RVA = "0x162DF00", Offset = "0x162CD00", VA = "0x18162DF00", 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: 0x04006691 RID: 26257
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006691")]
|
||||
private CrlEntry c;
|
||||
|
||||
// Token: 0x04006692 RID: 26258
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006692")]
|
||||
private bool isIndirect;
|
||||
|
||||
// Token: 0x04006693 RID: 26259
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4006693")]
|
||||
private X509Name previousCertificateIssuer;
|
||||
|
||||
// Token: 0x04006694 RID: 26260
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4006694")]
|
||||
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: 0x02001907 RID: 6407
|
||||
[Token(Token = "0x2001907")]
|
||||
public class X509CrlParser
|
||||
{
|
||||
// Token: 0x06009702 RID: 38658 RVA: 0x001F1BF4 File Offset: 0x001EFDF4
|
||||
[Token(Token = "0x6009702")]
|
||||
[Address(RVA = "0x637D50", Offset = "0x636B50", VA = "0x180637D50")]
|
||||
public X509CrlParser()
|
||||
{
|
||||
this.lazyAsn1 = false;
|
||||
}
|
||||
|
||||
// Token: 0x06009703 RID: 38659 RVA: 0x001F1C10 File Offset: 0x001EFE10
|
||||
[Token(Token = "0x6009703")]
|
||||
[Address(RVA = "0x162F3C0", Offset = "0x162E1C0", VA = "0x18162F3C0")]
|
||||
public X509CrlParser(bool lazyAsn1)
|
||||
{
|
||||
this.lazyAsn1 = lazyAsn1;
|
||||
}
|
||||
|
||||
// Token: 0x06009704 RID: 38660 RVA: 0x001F1C2C File Offset: 0x001EFE2C
|
||||
[Token(Token = "0x6009704")]
|
||||
[Address(RVA = "0x162F2B0", Offset = "0x162E0B0", VA = "0x18162F2B0")]
|
||||
private X509Crl ReadPemCrl(Stream inStream)
|
||||
{
|
||||
Asn1Sequence asn1Sequence = X509CrlParser.PemCrlParser.ReadPemObject(inStream);
|
||||
if (asn1Sequence == 0)
|
||||
{
|
||||
}
|
||||
CertificateList instance = CertificateList.GetInstance(asn1Sequence);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009705 RID: 38661 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6009705")]
|
||||
[Address(RVA = "0x162F090", Offset = "0x162DE90", VA = "0x18162F090")]
|
||||
private X509Crl ReadDerCrl(Asn1InputStream dIn)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x06009706 RID: 38662 RVA: 0x001F1C58 File Offset: 0x001EFE58
|
||||
[Token(Token = "0x6009706")]
|
||||
[Address(RVA = "0x162E9F0", Offset = "0x162D7F0", VA = "0x18162E9F0")]
|
||||
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: 0x06009707 RID: 38663 RVA: 0x001F1CA0 File Offset: 0x001EFEA0
|
||||
[Token(Token = "0x6009707")]
|
||||
[Address(RVA = "0x162E990", Offset = "0x162D790", VA = "0x18162E990", Slot = "4")]
|
||||
protected virtual X509Crl CreateX509Crl(CertificateList c)
|
||||
{
|
||||
return new X509Crl(c);
|
||||
}
|
||||
|
||||
// Token: 0x06009708 RID: 38664 RVA: 0x001F1CB4 File Offset: 0x001EFEB4
|
||||
[Token(Token = "0x6009708")]
|
||||
[Address(RVA = "0x162ED70", Offset = "0x162DB70", VA = "0x18162ED70")]
|
||||
public X509Crl ReadCrl(byte[] input)
|
||||
{
|
||||
int num;
|
||||
MemoryStream memoryStream = new MemoryStream(input, num != 0);
|
||||
num = 0;
|
||||
return this.ReadCrl(memoryStream);
|
||||
}
|
||||
|
||||
// Token: 0x06009709 RID: 38665 RVA: 0x001F1CD4 File Offset: 0x001EFED4
|
||||
[Token(Token = "0x6009709")]
|
||||
[Address(RVA = "0x162EF20", Offset = "0x162DD20", VA = "0x18162EF20")]
|
||||
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: 0x0600970A RID: 38666 RVA: 0x001F1D2C File Offset: 0x001EFF2C
|
||||
[Token(Token = "0x600970A")]
|
||||
[Address(RVA = "0x162EA80", Offset = "0x162D880", VA = "0x18162EA80")]
|
||||
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: 0x0600970B RID: 38667 RVA: 0x001F1E04 File Offset: 0x001F0004
|
||||
[Token(Token = "0x600970B")]
|
||||
[Address(RVA = "0x162EDE0", Offset = "0x162DBE0", VA = "0x18162EDE0")]
|
||||
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: 0x04006695 RID: 26261
|
||||
[Token(Token = "0x4006695")]
|
||||
private static readonly PemParser PemCrlParser = new PemParser("CRL");
|
||||
|
||||
// Token: 0x04006696 RID: 26262
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006696")]
|
||||
private readonly bool lazyAsn1;
|
||||
|
||||
// Token: 0x04006697 RID: 26263
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006697")]
|
||||
private Asn1Set sCrlData;
|
||||
|
||||
// Token: 0x04006698 RID: 26264
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4006698")]
|
||||
private int sCrlDataObjectCount;
|
||||
|
||||
// Token: 0x04006699 RID: 26265
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4006699")]
|
||||
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: 0x02001908 RID: 6408
|
||||
[Token(Token = "0x2001908")]
|
||||
public abstract class X509ExtensionBase : IX509Extension
|
||||
{
|
||||
// Token: 0x0600970D RID: 38669
|
||||
[Token(Token = "0x600970D")]
|
||||
[Address(Slot = "8")]
|
||||
protected abstract X509Extensions GetX509Extensions();
|
||||
|
||||
// Token: 0x0600970E RID: 38670 RVA: 0x001F1E60 File Offset: 0x001F0060
|
||||
[Token(Token = "0x600970E")]
|
||||
[Address(RVA = "0x1631B70", Offset = "0x1630970", VA = "0x181631B70", 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: 0x0600970F RID: 38671 RVA: 0x001F1EC8 File Offset: 0x001F00C8
|
||||
[Token(Token = "0x600970F")]
|
||||
[Address(RVA = "0x4DB5D0", Offset = "0x4DA3D0", VA = "0x1804DB5D0", Slot = "10")]
|
||||
public virtual ISet GetNonCriticalExtensionOids()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600970F)
|
||||
|
||||
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: 0x06009710 RID: 38672 RVA: 0x001F1EDC File Offset: 0x001F00DC
|
||||
[Token(Token = "0x6009710")]
|
||||
[Address(RVA = "0x1631B50", Offset = "0x1630950", VA = "0x181631B50", Slot = "11")]
|
||||
public virtual ISet GetCriticalExtensionOids()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009710)
|
||||
|
||||
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: 0x06009711 RID: 38673 RVA: 0x001F1EF0 File Offset: 0x001F00F0
|
||||
[Token(Token = "0x6009711")]
|
||||
[Address(RVA = "0x1631E40", Offset = "0x1630C40", VA = "0x181631E40", Slot = "6")]
|
||||
[Obsolete]
|
||||
public Asn1OctetString GetExtensionValue(string oid)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009711)
|
||||
|
||||
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: 0x06009712 RID: 38674 RVA: 0x001F1F0C File Offset: 0x001F010C
|
||||
[Token(Token = "0x6009712")]
|
||||
[Address(RVA = "0x1631DF0", Offset = "0x1630BF0", VA = "0x181631DF0", Slot = "12")]
|
||||
public virtual Asn1OctetString GetExtensionValue(DerObjectIdentifier oid)
|
||||
{
|
||||
Asn1OctetString asn1OctetString;
|
||||
X509Extension x509Extension;
|
||||
if (asn1OctetString != 0 && x509Extension != 0)
|
||||
{
|
||||
return x509Extension.value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009713 RID: 38675 RVA: 0x001F1F2C File Offset: 0x001F012C
|
||||
[Token(Token = "0x6009713")]
|
||||
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
||||
protected X509ExtensionBase()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
|
||||
{
|
||||
// Token: 0x02001909 RID: 6409
|
||||
[Token(Token = "0x2001909")]
|
||||
public class X509KeyUsage : Asn1Encodable
|
||||
{
|
||||
// Token: 0x06009714 RID: 38676 RVA: 0x001F1F40 File Offset: 0x001F0140
|
||||
[Token(Token = "0x6009714")]
|
||||
[Address(RVA = "0x4D83A0", Offset = "0x4D71A0", VA = "0x1804D83A0")]
|
||||
public X509KeyUsage(int usage)
|
||||
{
|
||||
this.usage = usage;
|
||||
}
|
||||
|
||||
// Token: 0x06009715 RID: 38677 RVA: 0x001F1F5C File Offset: 0x001F015C
|
||||
[Token(Token = "0x6009715")]
|
||||
[Address(RVA = "0x16324A0", Offset = "0x16312A0", VA = "0x1816324A0", Slot = "5")]
|
||||
public override Asn1Object ToAsn1Object()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009715)
|
||||
|
||||
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: 0x0400669A RID: 26266
|
||||
[Token(Token = "0x400669A")]
|
||||
public const int DigitalSignature = 128;
|
||||
|
||||
// Token: 0x0400669B RID: 26267
|
||||
[Token(Token = "0x400669B")]
|
||||
public const int NonRepudiation = 64;
|
||||
|
||||
// Token: 0x0400669C RID: 26268
|
||||
[Token(Token = "0x400669C")]
|
||||
public const int KeyEncipherment = 32;
|
||||
|
||||
// Token: 0x0400669D RID: 26269
|
||||
[Token(Token = "0x400669D")]
|
||||
public const int DataEncipherment = 16;
|
||||
|
||||
// Token: 0x0400669E RID: 26270
|
||||
[Token(Token = "0x400669E")]
|
||||
public const int KeyAgreement = 8;
|
||||
|
||||
// Token: 0x0400669F RID: 26271
|
||||
[Token(Token = "0x400669F")]
|
||||
public const int KeyCertSign = 4;
|
||||
|
||||
// Token: 0x040066A0 RID: 26272
|
||||
[Token(Token = "0x40066A0")]
|
||||
public const int CrlSign = 2;
|
||||
|
||||
// Token: 0x040066A1 RID: 26273
|
||||
[Token(Token = "0x40066A1")]
|
||||
public const int EncipherOnly = 1;
|
||||
|
||||
// Token: 0x040066A2 RID: 26274
|
||||
[Token(Token = "0x40066A2")]
|
||||
public const int DecipherOnly = 32768;
|
||||
|
||||
// Token: 0x040066A3 RID: 26275
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40066A3")]
|
||||
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: 0x0200190A RID: 6410
|
||||
[Token(Token = "0x200190A")]
|
||||
internal class X509SignatureUtilities
|
||||
{
|
||||
// Token: 0x06009716 RID: 38678 RVA: 0x001F1F74 File Offset: 0x001F0174
|
||||
[Token(Token = "0x6009716")]
|
||||
[Address(RVA = "0x1632BE0", Offset = "0x16319E0", VA = "0x181632BE0")]
|
||||
internal static void SetSignatureParameters(ISigner signature, Asn1Encodable parameters)
|
||||
{
|
||||
if (parameters != 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009717 RID: 38679 RVA: 0x001F1F8C File Offset: 0x001F018C
|
||||
[Token(Token = "0x6009717")]
|
||||
[Address(RVA = "0x1632920", Offset = "0x1631720", VA = "0x181632920")]
|
||||
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: 0x06009718 RID: 38680 RVA: 0x001F1FEC File Offset: 0x001F01EC
|
||||
[Token(Token = "0x6009718")]
|
||||
[Address(RVA = "0x1632500", Offset = "0x1631300", VA = "0x181632500")]
|
||||
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: 0x06009719 RID: 38681 RVA: 0x001F2084 File Offset: 0x001F0284
|
||||
[Token(Token = "0x6009719")]
|
||||
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
||||
public X509SignatureUtilities()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600971A RID: 38682 RVA: 0x001F2098 File Offset: 0x001F0298
|
||||
// Note: this type is marked as 'beforefieldinit'.
|
||||
[Token(Token = "0x600971A")]
|
||||
[Address(RVA = "0x1632C70", Offset = "0x1631A70", VA = "0x181632C70")]
|
||||
static X509SignatureUtilities()
|
||||
{
|
||||
DerNull instance = DerNull.Instance;
|
||||
}
|
||||
|
||||
// Token: 0x040066A4 RID: 26276
|
||||
[Token(Token = "0x40066A4")]
|
||||
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: 0x0200190B RID: 6411
|
||||
[Token(Token = "0x200190B")]
|
||||
internal class X509Utilities
|
||||
{
|
||||
// Token: 0x0600971B RID: 38683 RVA: 0x001F20AC File Offset: 0x001F02AC
|
||||
[Token(Token = "0x600971B")]
|
||||
[Address(RVA = "0x1633960", Offset = "0x1632760", VA = "0x181633960")]
|
||||
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: 0x0600971C RID: 38684 RVA: 0x001F245C File Offset: 0x001F065C
|
||||
[Token(Token = "0x600971C")]
|
||||
[Address(RVA = "0x1633230", Offset = "0x1632030", VA = "0x181633230")]
|
||||
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: 0x0600971D RID: 38685 RVA: 0x001F248C File Offset: 0x001F068C
|
||||
[Token(Token = "0x600971D")]
|
||||
[Address(RVA = "0x1633400", Offset = "0x1632200", VA = "0x181633400")]
|
||||
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: 0x0600971E RID: 38686 RVA: 0x001F24C8 File Offset: 0x001F06C8
|
||||
[Token(Token = "0x600971E")]
|
||||
[Address(RVA = "0x1633580", Offset = "0x1632380", VA = "0x181633580")]
|
||||
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: 0x0600971F RID: 38687 RVA: 0x001F2520 File Offset: 0x001F0720
|
||||
[Token(Token = "0x600971F")]
|
||||
[Address(RVA = "0x1633350", Offset = "0x1632150", VA = "0x181633350")]
|
||||
internal static IEnumerable GetAlgNames()
|
||||
{
|
||||
IDictionary dictionary = X509Utilities.algorithms;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009720 RID: 38688 RVA: 0x001F2538 File Offset: 0x001F0738
|
||||
[Token(Token = "0x6009720")]
|
||||
[Address(RVA = "0x16337F0", Offset = "0x16325F0", VA = "0x1816337F0")]
|
||||
internal static byte[] GetSignatureForObject(DerObjectIdentifier sigOid, string sigName, AsymmetricKeyParameter privateKey, SecureRandom random, Asn1Encodable ae)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009720)
|
||||
|
||||
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: 0x06009721 RID: 38689 RVA: 0x001F2570 File Offset: 0x001F0770
|
||||
[Token(Token = "0x6009721")]
|
||||
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
||||
public X509Utilities()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x040066A5 RID: 26277
|
||||
[Token(Token = "0x40066A5")]
|
||||
private static readonly IDictionary algorithms;
|
||||
|
||||
// Token: 0x040066A6 RID: 26278
|
||||
[Token(Token = "0x40066A6")]
|
||||
private static readonly IDictionary exParams;
|
||||
|
||||
// Token: 0x040066A7 RID: 26279
|
||||
[Token(Token = "0x40066A7")]
|
||||
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: 0x0200190C RID: 6412
|
||||
[Token(Token = "0x200190C")]
|
||||
public class X509V1CertificateGenerator
|
||||
{
|
||||
// Token: 0x06009722 RID: 38690 RVA: 0x001F2584 File Offset: 0x001F0784
|
||||
[Token(Token = "0x6009722")]
|
||||
[Address(RVA = "0x1635700", Offset = "0x1634500", VA = "0x181635700")]
|
||||
public X509V1CertificateGenerator()
|
||||
{
|
||||
V1TbsCertificateGenerator v1TbsCertificateGenerator = new V1TbsCertificateGenerator();
|
||||
this.tbsGen = v1TbsCertificateGenerator;
|
||||
}
|
||||
|
||||
// Token: 0x06009723 RID: 38691 RVA: 0x001F25A4 File Offset: 0x001F07A4
|
||||
[Token(Token = "0x6009723")]
|
||||
[Address(RVA = "0x16351B0", Offset = "0x1633FB0", VA = "0x1816351B0")]
|
||||
public void Reset()
|
||||
{
|
||||
V1TbsCertificateGenerator v1TbsCertificateGenerator = new V1TbsCertificateGenerator();
|
||||
this.tbsGen = v1TbsCertificateGenerator;
|
||||
}
|
||||
|
||||
// Token: 0x06009724 RID: 38692 RVA: 0x001F25C0 File Offset: 0x001F07C0
|
||||
[Token(Token = "0x6009724")]
|
||||
[Address(RVA = "0x16353B0", Offset = "0x16341B0", VA = "0x1816353B0")]
|
||||
public void SetSerialNumber(BigInteger serialNumber)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009724)
|
||||
|
||||
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: 0x06009725 RID: 38693 RVA: 0x001F2604 File Offset: 0x001F0804
|
||||
[Token(Token = "0x6009725")]
|
||||
[Address(RVA = "0x15D18A0", Offset = "0x15D06A0", VA = "0x1815D18A0")]
|
||||
public void SetIssuerDN(X509Name issuer)
|
||||
{
|
||||
this.tbsGen.issuer = issuer;
|
||||
}
|
||||
|
||||
// Token: 0x06009726 RID: 38694 RVA: 0x001F2624 File Offset: 0x001F0824
|
||||
[Token(Token = "0x6009726")]
|
||||
[Address(RVA = "0x1635270", Offset = "0x1634070", VA = "0x181635270")]
|
||||
public void SetNotBefore(DateTime date)
|
||||
{
|
||||
V1TbsCertificateGenerator v1TbsCertificateGenerator = this.tbsGen;
|
||||
Time time = new Time(date);
|
||||
v1TbsCertificateGenerator.startDate = time;
|
||||
}
|
||||
|
||||
// Token: 0x06009727 RID: 38695 RVA: 0x001F264C File Offset: 0x001F084C
|
||||
[Token(Token = "0x6009727")]
|
||||
[Address(RVA = "0x1635200", Offset = "0x1634000", VA = "0x181635200")]
|
||||
public void SetNotAfter(DateTime date)
|
||||
{
|
||||
V1TbsCertificateGenerator v1TbsCertificateGenerator = this.tbsGen;
|
||||
Time time = new Time(date);
|
||||
v1TbsCertificateGenerator.endDate = time;
|
||||
}
|
||||
|
||||
// Token: 0x06009728 RID: 38696 RVA: 0x001F2674 File Offset: 0x001F0874
|
||||
[Token(Token = "0x6009728")]
|
||||
[Address(RVA = "0x16356E0", Offset = "0x16344E0", VA = "0x1816356E0")]
|
||||
public void SetSubjectDN(X509Name subject)
|
||||
{
|
||||
this.tbsGen.subject = subject;
|
||||
}
|
||||
|
||||
// Token: 0x06009729 RID: 38697 RVA: 0x001F2694 File Offset: 0x001F0894
|
||||
[Token(Token = "0x6009729")]
|
||||
[Address(RVA = "0x16352E0", Offset = "0x16340E0", VA = "0x1816352E0")]
|
||||
public void SetPublicKey(AsymmetricKeyParameter publicKey)
|
||||
{
|
||||
V1TbsCertificateGenerator v1TbsCertificateGenerator = this.tbsGen;
|
||||
SubjectPublicKeyInfo subjectPublicKeyInfo = SubjectPublicKeyInfoFactory.CreateSubjectPublicKeyInfo(publicKey);
|
||||
v1TbsCertificateGenerator.subjectPublicKeyInfo = subjectPublicKeyInfo;
|
||||
}
|
||||
|
||||
// Token: 0x0600972A RID: 38698 RVA: 0x001F26CC File Offset: 0x001F08CC
|
||||
[Token(Token = "0x600972A")]
|
||||
[Address(RVA = "0x1635470", Offset = "0x1634270", VA = "0x181635470")]
|
||||
[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: 0x0600972B RID: 38699 RVA: 0x001F273C File Offset: 0x001F093C
|
||||
[Token(Token = "0x600972B")]
|
||||
[Address(RVA = "0x1634E10", Offset = "0x1633C10", VA = "0x181634E10")]
|
||||
[Obsolete]
|
||||
public X509Certificate Generate(AsymmetricKeyParameter privateKey)
|
||||
{
|
||||
int num;
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, num);
|
||||
num = 0;
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x0600972C RID: 38700 RVA: 0x001F2760 File Offset: 0x001F0960
|
||||
[Token(Token = "0x600972C")]
|
||||
[Address(RVA = "0x1634D70", Offset = "0x1633B70", VA = "0x181634D70")]
|
||||
[Obsolete]
|
||||
public X509Certificate Generate(AsymmetricKeyParameter privateKey, SecureRandom random)
|
||||
{
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, random);
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x0600972D RID: 38701 RVA: 0x001F2784 File Offset: 0x001F0984
|
||||
[Token(Token = "0x600972D")]
|
||||
[Address(RVA = "0x1634EA0", Offset = "0x1633CA0", VA = "0x181634EA0")]
|
||||
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: 0x0600972E RID: 38702 RVA: 0x001F27E0 File Offset: 0x001F09E0
|
||||
[Token(Token = "0x600972E")]
|
||||
[Address(RVA = "0x1634CB0", Offset = "0x1633AB0", VA = "0x181634CB0")]
|
||||
private X509Certificate GenerateJcaObject(TbsCertificateStructure tbsCert, AlgorithmIdentifier sigAlg, byte[] signature)
|
||||
{
|
||||
DerBitString derBitString = new DerBitString(signature);
|
||||
return new X509Certificate(new X509CertificateStructure(tbsCert, sigAlg, derBitString));
|
||||
}
|
||||
|
||||
// Token: 0x17001819 RID: 6169
|
||||
// (get) Token: 0x0600972F RID: 38703 RVA: 0x001F2804 File Offset: 0x001F0A04
|
||||
[Token(Token = "0x17001819")]
|
||||
public IEnumerable SignatureAlgNames
|
||||
{
|
||||
[Token(Token = "0x600972F")]
|
||||
[Address(RVA = "0x1635760", Offset = "0x1634560", VA = "0x181635760")]
|
||||
get
|
||||
{
|
||||
IDictionary algorithms = X509Utilities.algorithms;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040066A8 RID: 26280
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40066A8")]
|
||||
private V1TbsCertificateGenerator tbsGen;
|
||||
|
||||
// Token: 0x040066A9 RID: 26281
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40066A9")]
|
||||
private DerObjectIdentifier sigOID;
|
||||
|
||||
// Token: 0x040066AA RID: 26282
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40066AA")]
|
||||
private AlgorithmIdentifier sigAlgId;
|
||||
|
||||
// Token: 0x040066AB RID: 26283
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40066AB")]
|
||||
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: 0x0200190D RID: 6413
|
||||
[Token(Token = "0x200190D")]
|
||||
public class X509V2AttributeCertificate : X509ExtensionBase, IX509AttributeCertificate, IX509Extension
|
||||
{
|
||||
// Token: 0x06009730 RID: 38704 RVA: 0x001F281C File Offset: 0x001F0A1C
|
||||
[Token(Token = "0x6009730")]
|
||||
[Address(RVA = "0x1636450", Offset = "0x1635250", VA = "0x181636450")]
|
||||
private static AttributeCertificate GetObject(Stream input)
|
||||
{
|
||||
return AttributeCertificate.GetInstance(Asn1Object.FromStream(input));
|
||||
}
|
||||
|
||||
// Token: 0x06009731 RID: 38705 RVA: 0x001F2834 File Offset: 0x001F0A34
|
||||
[Token(Token = "0x6009731")]
|
||||
[Address(RVA = "0x1636740", Offset = "0x1635540", VA = "0x181636740")]
|
||||
public X509V2AttributeCertificate(Stream encIn)
|
||||
{
|
||||
AttributeCertificate @object = X509V2AttributeCertificate.GetObject(encIn);
|
||||
}
|
||||
|
||||
// Token: 0x06009732 RID: 38706 RVA: 0x001F2848 File Offset: 0x001F0A48
|
||||
[Token(Token = "0x6009732")]
|
||||
[Address(RVA = "0x16366C0", Offset = "0x16354C0", VA = "0x1816366C0")]
|
||||
public X509V2AttributeCertificate(byte[] encoded)
|
||||
{
|
||||
int num;
|
||||
MemoryStream memoryStream = new MemoryStream(encoded, num != 0);
|
||||
num = 0;
|
||||
AttributeCertificate @object = X509V2AttributeCertificate.GetObject(memoryStream);
|
||||
}
|
||||
|
||||
// Token: 0x06009733 RID: 38707 RVA: 0x001F2868 File Offset: 0x001F0A68
|
||||
[Token(Token = "0x6009733")]
|
||||
[Address(RVA = "0x1636770", Offset = "0x1635570", VA = "0x181636770")]
|
||||
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: 0x1700181A RID: 6170
|
||||
// (get) Token: 0x06009734 RID: 38708 RVA: 0x001F28E8 File Offset: 0x001F0AE8
|
||||
[Token(Token = "0x1700181A")]
|
||||
public virtual int Version
|
||||
{
|
||||
[Token(Token = "0x6009734")]
|
||||
[Address(RVA = "0x1636AA0", Offset = "0x16358A0", VA = "0x181636AA0", Slot = "29")]
|
||||
get
|
||||
{
|
||||
int intValue = this.cert.acinfo.version.Value.IntValue;
|
||||
return intValue + 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700181B RID: 6171
|
||||
// (get) Token: 0x06009735 RID: 38709 RVA: 0x001F291C File Offset: 0x001F0B1C
|
||||
[Token(Token = "0x1700181B")]
|
||||
public virtual BigInteger SerialNumber
|
||||
{
|
||||
[Token(Token = "0x6009735")]
|
||||
[Address(RVA = "0x1636A70", Offset = "0x1635870", VA = "0x181636A70", Slot = "30")]
|
||||
get
|
||||
{
|
||||
return this.cert.acinfo.serialNumber.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700181C RID: 6172
|
||||
// (get) Token: 0x06009736 RID: 38710 RVA: 0x001F2944 File Offset: 0x001F0B44
|
||||
[Token(Token = "0x1700181C")]
|
||||
public virtual AttributeCertificateHolder Holder
|
||||
{
|
||||
[Token(Token = "0x6009736")]
|
||||
[Address(RVA = "0x1636880", Offset = "0x1635680", VA = "0x181636880", 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: 0x1700181D RID: 6173
|
||||
// (get) Token: 0x06009737 RID: 38711 RVA: 0x001F2988 File Offset: 0x001F0B88
|
||||
[Token(Token = "0x1700181D")]
|
||||
public virtual AttributeCertificateIssuer Issuer
|
||||
{
|
||||
[Token(Token = "0x6009737")]
|
||||
[Address(RVA = "0x16369F0", Offset = "0x16357F0", VA = "0x1816369F0", Slot = "32")]
|
||||
get
|
||||
{
|
||||
Asn1Encodable obj = this.cert.acinfo.issuer.obj;
|
||||
AttributeCertificateIssuer attributeCertificateIssuer;
|
||||
attributeCertificateIssuer.form = obj;
|
||||
return attributeCertificateIssuer;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700181E RID: 6174
|
||||
// (get) Token: 0x06009738 RID: 38712 RVA: 0x001F29BC File Offset: 0x001F0BBC
|
||||
[Token(Token = "0x1700181E")]
|
||||
public virtual DateTime NotBefore
|
||||
{
|
||||
[Token(Token = "0x6009738")]
|
||||
[Address(RVA = "0x3F5F40", Offset = "0x3F4D40", VA = "0x1803F5F40", Slot = "33")]
|
||||
get
|
||||
{
|
||||
return this.notBefore;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700181F RID: 6175
|
||||
// (get) Token: 0x06009739 RID: 38713 RVA: 0x001F29D0 File Offset: 0x001F0BD0
|
||||
[Token(Token = "0x1700181F")]
|
||||
public virtual DateTime NotAfter
|
||||
{
|
||||
[Token(Token = "0x6009739")]
|
||||
[Address(RVA = "0x3F6400", Offset = "0x3F5200", VA = "0x1803F6400", Slot = "34")]
|
||||
get
|
||||
{
|
||||
return this.notAfter;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600973A RID: 38714 RVA: 0x001F29E4 File Offset: 0x001F0BE4
|
||||
[Token(Token = "0x600973A")]
|
||||
[Address(RVA = "0x1636310", Offset = "0x1635110", VA = "0x181636310", 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: 0x17001820 RID: 6176
|
||||
// (get) Token: 0x0600973B RID: 38715 RVA: 0x001F2A5C File Offset: 0x001F0C5C
|
||||
[Token(Token = "0x17001820")]
|
||||
public virtual bool IsValidNow
|
||||
{
|
||||
[Token(Token = "0x600973B")]
|
||||
[Address(RVA = "0x1636980", Offset = "0x1635780", VA = "0x181636980", Slot = "36")]
|
||||
get
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600973B)
|
||||
|
||||
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: 0x0600973C RID: 38716 RVA: 0x001F2A78 File Offset: 0x001F0C78
|
||||
[Token(Token = "0x600973C")]
|
||||
[Address(RVA = "0x1636530", Offset = "0x1635330", VA = "0x181636530", Slot = "37")]
|
||||
public virtual bool IsValid(DateTime date)
|
||||
{
|
||||
AttributeCertificateIssuer issuer = this.Issuer;
|
||||
DateTime dateTime = this.NotBefore;
|
||||
int num;
|
||||
return num <= 0;
|
||||
}
|
||||
|
||||
// Token: 0x0600973D RID: 38717 RVA: 0x001F2AA0 File Offset: 0x001F0CA0
|
||||
[Token(Token = "0x600973D")]
|
||||
[Address(RVA = "0x1635B30", Offset = "0x1634930", VA = "0x181635B30", Slot = "38")]
|
||||
public virtual void CheckValidity()
|
||||
{
|
||||
DateTime utcNow = DateTime.UtcNow;
|
||||
int version = ((IX509AttributeCertificate)this).Version;
|
||||
}
|
||||
|
||||
// Token: 0x0600973E RID: 38718 RVA: 0x001F2ABC File Offset: 0x001F0CBC
|
||||
[Token(Token = "0x600973E")]
|
||||
[Address(RVA = "0x1635BA0", Offset = "0x16349A0", VA = "0x181635BA0", Slot = "39")]
|
||||
public virtual void CheckValidity(DateTime date)
|
||||
{
|
||||
DateTime dateTime = this.NotBefore;
|
||||
AttributeCertificateIssuer issuer = this.Issuer;
|
||||
}
|
||||
|
||||
// Token: 0x17001821 RID: 6177
|
||||
// (get) Token: 0x0600973F RID: 38719 RVA: 0x001F2AEC File Offset: 0x001F0CEC
|
||||
[Token(Token = "0x17001821")]
|
||||
public virtual AlgorithmIdentifier SignatureAlgorithm
|
||||
{
|
||||
[Token(Token = "0x600973F")]
|
||||
[Address(RVA = "0x434BE0", Offset = "0x4339E0", VA = "0x180434BE0", Slot = "40")]
|
||||
get
|
||||
{
|
||||
return this.cert.signatureAlgorithm;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009740 RID: 38720 RVA: 0x001F2B0C File Offset: 0x001F0D0C
|
||||
[Token(Token = "0x6009740")]
|
||||
[Address(RVA = "0x162C470", Offset = "0x162B270", VA = "0x18162C470", Slot = "41")]
|
||||
public virtual byte[] GetSignature()
|
||||
{
|
||||
return this.cert.GetSignatureOctets();
|
||||
}
|
||||
|
||||
// Token: 0x06009741 RID: 38721 RVA: 0x001F2B2C File Offset: 0x001F0D2C
|
||||
[Token(Token = "0x6009741")]
|
||||
[Address(RVA = "0x1636620", Offset = "0x1635420", VA = "0x181636620", Slot = "42")]
|
||||
public virtual void Verify(AsymmetricKeyParameter key)
|
||||
{
|
||||
Asn1VerifierFactory asn1VerifierFactory = new Asn1VerifierFactory(this.cert.signatureAlgorithm, key);
|
||||
int version = ((IX509AttributeCertificate)this).Version;
|
||||
}
|
||||
|
||||
// Token: 0x06009742 RID: 38722 RVA: 0x001F2B58 File Offset: 0x001F0D58
|
||||
[Token(Token = "0x6009742")]
|
||||
[Address(RVA = "0x16365A0", Offset = "0x16353A0", VA = "0x1816365A0", Slot = "43")]
|
||||
public virtual void Verify(IVerifierFactoryProvider verifierProvider)
|
||||
{
|
||||
AttributeCertificate attributeCertificate = this.cert;
|
||||
int version = ((IX509AttributeCertificate)this).Version;
|
||||
}
|
||||
|
||||
// Token: 0x06009743 RID: 38723 RVA: 0x001F2B7C File Offset: 0x001F0D7C
|
||||
[Token(Token = "0x6009743")]
|
||||
[Address(RVA = "0x1635850", Offset = "0x1634650", VA = "0x181635850", Slot = "44")]
|
||||
protected virtual void CheckSignature(IVerifierFactory verifier)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009743)
|
||||
|
||||
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: 0x06009744 RID: 38724 RVA: 0x001F2BD4 File Offset: 0x001F0DD4
|
||||
[Token(Token = "0x6009744")]
|
||||
[Address(RVA = "0x16362F0", Offset = "0x16350F0", VA = "0x1816362F0", Slot = "45")]
|
||||
public virtual byte[] GetEncoded()
|
||||
{
|
||||
return this.cert.GetEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x06009745 RID: 38725 RVA: 0x001F2BF4 File Offset: 0x001F0DF4
|
||||
[Token(Token = "0x6009745")]
|
||||
[Address(RVA = "0x1636500", Offset = "0x1635300", VA = "0x181636500", Slot = "8")]
|
||||
protected override X509Extensions GetX509Extensions()
|
||||
{
|
||||
return this.cert.acinfo.extensions;
|
||||
}
|
||||
|
||||
// Token: 0x06009746 RID: 38726 RVA: 0x001F2C18 File Offset: 0x001F0E18
|
||||
[Token(Token = "0x6009746")]
|
||||
[Address(RVA = "0x1635DC0", Offset = "0x1634BC0", VA = "0x181635DC0", 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: 0x06009747 RID: 38727 RVA: 0x001F2C6C File Offset: 0x001F0E6C
|
||||
[Token(Token = "0x6009747")]
|
||||
[Address(RVA = "0x1635F20", Offset = "0x1634D20", VA = "0x181635F20", 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: 0x06009748 RID: 38728 RVA: 0x001F2D24 File Offset: 0x001F0F24
|
||||
[Token(Token = "0x6009748")]
|
||||
[Address(RVA = "0x1635D00", Offset = "0x1634B00", VA = "0x181635D00", Slot = "0")]
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj != this)
|
||||
{
|
||||
if (obj != 0 && obj != 0)
|
||||
{
|
||||
Asn1Object asn1Object = this.cert.ToAsn1Object();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x06009749 RID: 38729 RVA: 0x001F2D54 File Offset: 0x001F0F54
|
||||
[Token(Token = "0x6009749")]
|
||||
[Address(RVA = "0x4DA700", Offset = "0x4D9500", VA = "0x1804DA700", Slot = "2")]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
Asn1Object asn1Object = this.cert.ToAsn1Object();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x040066AC RID: 26284
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40066AC")]
|
||||
private readonly AttributeCertificate cert;
|
||||
|
||||
// Token: 0x040066AD RID: 26285
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40066AD")]
|
||||
private readonly DateTime notBefore;
|
||||
|
||||
// Token: 0x040066AE RID: 26286
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40066AE")]
|
||||
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: 0x0200190E RID: 6414
|
||||
[Token(Token = "0x200190E")]
|
||||
public class X509V2AttributeCertificateGenerator
|
||||
{
|
||||
// Token: 0x0600974A RID: 38730 RVA: 0x001F2D74 File Offset: 0x001F0F74
|
||||
[Token(Token = "0x600974A")]
|
||||
[Address(RVA = "0x1C48B50", Offset = "0x1C47950", VA = "0x181C48B50")]
|
||||
public X509V2AttributeCertificateGenerator()
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = new X509ExtensionsGenerator();
|
||||
this.extGenerator = x509ExtensionsGenerator;
|
||||
base..ctor();
|
||||
V2AttributeCertificateInfoGenerator v2AttributeCertificateInfoGenerator = new V2AttributeCertificateInfoGenerator();
|
||||
this.acInfoGen = v2AttributeCertificateInfoGenerator;
|
||||
}
|
||||
|
||||
// Token: 0x0600974B RID: 38731 RVA: 0x001F2DA4 File Offset: 0x001F0FA4
|
||||
[Token(Token = "0x600974B")]
|
||||
[Address(RVA = "0x1C487B0", Offset = "0x1C475B0", VA = "0x181C487B0")]
|
||||
public void Reset()
|
||||
{
|
||||
V2AttributeCertificateInfoGenerator v2AttributeCertificateInfoGenerator = new V2AttributeCertificateInfoGenerator();
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
this.acInfoGen = v2AttributeCertificateInfoGenerator;
|
||||
x509ExtensionsGenerator.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x0600974C RID: 38732 RVA: 0x001F2DD4 File Offset: 0x001F0FD4
|
||||
[Token(Token = "0x600974C")]
|
||||
[Address(RVA = "0x1C48820", Offset = "0x1C47620", VA = "0x181C48820")]
|
||||
public void SetHolder(AttributeCertificateHolder holder)
|
||||
{
|
||||
V2AttributeCertificateInfoGenerator v2AttributeCertificateInfoGenerator = this.acInfoGen;
|
||||
Holder holder2 = holder.holder;
|
||||
v2AttributeCertificateInfoGenerator.holder = holder2;
|
||||
}
|
||||
|
||||
// Token: 0x0600974D RID: 38733 RVA: 0x001F2DFC File Offset: 0x001F0FFC
|
||||
[Token(Token = "0x600974D")]
|
||||
[Address(RVA = "0x1C488B0", Offset = "0x1C476B0", VA = "0x181C488B0")]
|
||||
public void SetIssuer(AttributeCertificateIssuer issuer)
|
||||
{
|
||||
V2AttributeCertificateInfoGenerator v2AttributeCertificateInfoGenerator = this.acInfoGen;
|
||||
AttCertIssuer instance = AttCertIssuer.GetInstance(issuer.form);
|
||||
v2AttributeCertificateInfoGenerator.issuer = instance;
|
||||
}
|
||||
|
||||
// Token: 0x0600974E RID: 38734 RVA: 0x001F2E2C File Offset: 0x001F102C
|
||||
[Token(Token = "0x600974E")]
|
||||
[Address(RVA = "0x1C489D0", Offset = "0x1C477D0", VA = "0x181C489D0")]
|
||||
public void SetSerialNumber(BigInteger serialNumber)
|
||||
{
|
||||
V2AttributeCertificateInfoGenerator v2AttributeCertificateInfoGenerator = this.acInfoGen;
|
||||
DerInteger derInteger = new DerInteger(serialNumber);
|
||||
v2AttributeCertificateInfoGenerator.serialNumber = derInteger;
|
||||
}
|
||||
|
||||
// Token: 0x0600974F RID: 38735 RVA: 0x001F2E54 File Offset: 0x001F1054
|
||||
[Token(Token = "0x600974F")]
|
||||
[Address(RVA = "0x1C48960", Offset = "0x1C47760", VA = "0x181C48960")]
|
||||
public void SetNotBefore(DateTime date)
|
||||
{
|
||||
V2AttributeCertificateInfoGenerator v2AttributeCertificateInfoGenerator = this.acInfoGen;
|
||||
DerGeneralizedTime derGeneralizedTime = new DerGeneralizedTime(date);
|
||||
v2AttributeCertificateInfoGenerator.startDate = derGeneralizedTime;
|
||||
}
|
||||
|
||||
// Token: 0x06009750 RID: 38736 RVA: 0x001F2E7C File Offset: 0x001F107C
|
||||
[Token(Token = "0x6009750")]
|
||||
[Address(RVA = "0x1C488F0", Offset = "0x1C476F0", VA = "0x181C488F0")]
|
||||
public void SetNotAfter(DateTime date)
|
||||
{
|
||||
V2AttributeCertificateInfoGenerator v2AttributeCertificateInfoGenerator = this.acInfoGen;
|
||||
DerGeneralizedTime derGeneralizedTime = new DerGeneralizedTime(date);
|
||||
v2AttributeCertificateInfoGenerator.endDate = derGeneralizedTime;
|
||||
}
|
||||
|
||||
// Token: 0x06009751 RID: 38737 RVA: 0x001F2EA4 File Offset: 0x001F10A4
|
||||
[Token(Token = "0x6009751")]
|
||||
[Address(RVA = "0x1C48A40", Offset = "0x1C47840", VA = "0x181C48A40")]
|
||||
[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: 0x06009752 RID: 38738 RVA: 0x001F2EEC File Offset: 0x001F10EC
|
||||
[Token(Token = "0x6009752")]
|
||||
[Address(RVA = "0x1C48180", Offset = "0x1C46F80", VA = "0x181C48180")]
|
||||
public void AddAttribute(X509Attribute attribute)
|
||||
{
|
||||
V2AttributeCertificateInfoGenerator v2AttributeCertificateInfoGenerator = this.acInfoGen;
|
||||
AttributeX509 instance = AttributeX509.GetInstance(attribute.ToAsn1Object());
|
||||
v2AttributeCertificateInfoGenerator.AddAttribute(instance);
|
||||
}
|
||||
|
||||
// Token: 0x06009753 RID: 38739 RVA: 0x001F2F1C File Offset: 0x001F111C
|
||||
[Token(Token = "0x6009753")]
|
||||
[Address(RVA = "0x1C48850", Offset = "0x1C47650", VA = "0x181C48850")]
|
||||
public void SetIssuerUniqueId(bool[] iui)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009753)
|
||||
|
||||
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: 0x06009754 RID: 38740 RVA: 0x001F2F34 File Offset: 0x001F1134
|
||||
[Token(Token = "0x6009754")]
|
||||
[Address(RVA = "0x1C481D0", Offset = "0x1C46FD0", VA = "0x181C481D0")]
|
||||
public void AddExtension(string oid, bool critical, Asn1Encodable extensionValue)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
||||
x509ExtensionsGenerator.AddExtension(derObjectIdentifier, critical, extensionValue);
|
||||
}
|
||||
|
||||
// Token: 0x06009755 RID: 38741 RVA: 0x001F2F60 File Offset: 0x001F1160
|
||||
[Token(Token = "0x6009755")]
|
||||
[Address(RVA = "0x1C48280", Offset = "0x1C47080", VA = "0x181C48280")]
|
||||
public void AddExtension(string oid, bool critical, byte[] extensionValue)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
||||
x509ExtensionsGenerator.AddExtension(derObjectIdentifier, critical, extensionValue);
|
||||
}
|
||||
|
||||
// Token: 0x06009756 RID: 38742 RVA: 0x001F2F8C File Offset: 0x001F118C
|
||||
[Token(Token = "0x6009756")]
|
||||
[Address(RVA = "0x1C48720", Offset = "0x1C47520", VA = "0x181C48720")]
|
||||
[Obsolete]
|
||||
public IX509AttributeCertificate Generate(AsymmetricKeyParameter privateKey)
|
||||
{
|
||||
int num;
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, num);
|
||||
num = 0;
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x06009757 RID: 38743 RVA: 0x001F2FB0 File Offset: 0x001F11B0
|
||||
[Token(Token = "0x6009757")]
|
||||
[Address(RVA = "0x1C48330", Offset = "0x1C47130", VA = "0x181C48330")]
|
||||
[Obsolete]
|
||||
public IX509AttributeCertificate Generate(AsymmetricKeyParameter privateKey, SecureRandom random)
|
||||
{
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, random);
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x06009758 RID: 38744 RVA: 0x001F2FD4 File Offset: 0x001F11D4
|
||||
[Token(Token = "0x6009758")]
|
||||
[Address(RVA = "0x1C483D0", Offset = "0x1C471D0", VA = "0x181C483D0")]
|
||||
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: 0x17001822 RID: 6178
|
||||
// (get) Token: 0x06009759 RID: 38745 RVA: 0x001F3074 File Offset: 0x001F1274
|
||||
[Token(Token = "0x17001822")]
|
||||
public IEnumerable SignatureAlgNames
|
||||
{
|
||||
[Token(Token = "0x6009759")]
|
||||
[Address(RVA = "0x1C48BD0", Offset = "0x1C479D0", VA = "0x181C48BD0")]
|
||||
get
|
||||
{
|
||||
return X509Utilities.GetAlgNames();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040066AF RID: 26287
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40066AF")]
|
||||
private readonly X509ExtensionsGenerator extGenerator;
|
||||
|
||||
// Token: 0x040066B0 RID: 26288
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40066B0")]
|
||||
private V2AttributeCertificateInfoGenerator acInfoGen;
|
||||
|
||||
// Token: 0x040066B1 RID: 26289
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40066B1")]
|
||||
private DerObjectIdentifier sigOID;
|
||||
|
||||
// Token: 0x040066B2 RID: 26290
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40066B2")]
|
||||
private AlgorithmIdentifier sigAlgId;
|
||||
|
||||
// Token: 0x040066B3 RID: 26291
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40066B3")]
|
||||
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: 0x0200190F RID: 6415
|
||||
[Token(Token = "0x200190F")]
|
||||
public class X509V2CrlGenerator
|
||||
{
|
||||
// Token: 0x0600975A RID: 38746 RVA: 0x001F3088 File Offset: 0x001F1288
|
||||
[Token(Token = "0x600975A")]
|
||||
[Address(RVA = "0x1C49B80", Offset = "0x1C48980", VA = "0x181C49B80")]
|
||||
public X509V2CrlGenerator()
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = new X509ExtensionsGenerator();
|
||||
this.extGenerator = x509ExtensionsGenerator;
|
||||
base..ctor();
|
||||
V2TbsCertListGenerator v2TbsCertListGenerator = new V2TbsCertListGenerator();
|
||||
this.tbsGen = v2TbsCertListGenerator;
|
||||
}
|
||||
|
||||
// Token: 0x0600975B RID: 38747 RVA: 0x001F30B8 File Offset: 0x001F12B8
|
||||
[Token(Token = "0x600975B")]
|
||||
[Address(RVA = "0x1C49900", Offset = "0x1C48700", VA = "0x181C49900")]
|
||||
public void Reset()
|
||||
{
|
||||
V2TbsCertListGenerator v2TbsCertListGenerator = new V2TbsCertListGenerator();
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
this.tbsGen = v2TbsCertListGenerator;
|
||||
x509ExtensionsGenerator.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x0600975C RID: 38748 RVA: 0x001F30E8 File Offset: 0x001F12E8
|
||||
[Token(Token = "0x600975C")]
|
||||
[Address(RVA = "0x1C49970", Offset = "0x1C48770", VA = "0x181C49970")]
|
||||
public void SetIssuerDN(X509Name issuer)
|
||||
{
|
||||
this.tbsGen.issuer = issuer;
|
||||
}
|
||||
|
||||
// Token: 0x0600975D RID: 38749 RVA: 0x001F3108 File Offset: 0x001F1308
|
||||
[Token(Token = "0x600975D")]
|
||||
[Address(RVA = "0x1C49B10", Offset = "0x1C48910", VA = "0x181C49B10")]
|
||||
public void SetThisUpdate(DateTime date)
|
||||
{
|
||||
V2TbsCertListGenerator v2TbsCertListGenerator = this.tbsGen;
|
||||
Time time = new Time(date);
|
||||
v2TbsCertListGenerator.thisUpdate = time;
|
||||
}
|
||||
|
||||
// Token: 0x0600975E RID: 38750 RVA: 0x001F3130 File Offset: 0x001F1330
|
||||
[Token(Token = "0x600975E")]
|
||||
[Address(RVA = "0x1C49990", Offset = "0x1C48790", VA = "0x181C49990")]
|
||||
public void SetNextUpdate(DateTime date)
|
||||
{
|
||||
V2TbsCertListGenerator v2TbsCertListGenerator = this.tbsGen;
|
||||
Time time = new Time(date);
|
||||
v2TbsCertListGenerator.nextUpdate = time;
|
||||
}
|
||||
|
||||
// Token: 0x0600975F RID: 38751 RVA: 0x001F3158 File Offset: 0x001F1358
|
||||
[Token(Token = "0x600975F")]
|
||||
[Address(RVA = "0x1C48CE0", Offset = "0x1C47AE0", VA = "0x181C48CE0")]
|
||||
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: 0x06009760 RID: 38752 RVA: 0x001F318C File Offset: 0x001F138C
|
||||
[Token(Token = "0x6009760")]
|
||||
[Address(RVA = "0x1C48DA0", Offset = "0x1C47BA0", VA = "0x181C48DA0")]
|
||||
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: 0x06009761 RID: 38753 RVA: 0x001F31B4 File Offset: 0x001F13B4
|
||||
[Token(Token = "0x6009761")]
|
||||
[Address(RVA = "0x1C48C20", Offset = "0x1C47A20", VA = "0x181C48C20")]
|
||||
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: 0x06009762 RID: 38754 RVA: 0x001F31E8 File Offset: 0x001F13E8
|
||||
[Token(Token = "0x6009762")]
|
||||
[Address(RVA = "0x1C48E90", Offset = "0x1C47C90", VA = "0x181C48E90")]
|
||||
public void AddCrl(X509Crl other)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009762)
|
||||
|
||||
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: 0x06009763 RID: 38755 RVA: 0x001F3248 File Offset: 0x001F1448
|
||||
[Token(Token = "0x6009763")]
|
||||
[Address(RVA = "0x1C49A00", Offset = "0x1C48800", VA = "0x181C49A00")]
|
||||
[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: 0x06009764 RID: 38756 RVA: 0x001F3294 File Offset: 0x001F1494
|
||||
[Token(Token = "0x6009764")]
|
||||
[Address(RVA = "0x1C49220", Offset = "0x1C48020", VA = "0x181C49220")]
|
||||
public void AddExtension(string oid, bool critical, Asn1Encodable extensionValue)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
||||
x509ExtensionsGenerator.AddExtension(derObjectIdentifier, critical, extensionValue);
|
||||
}
|
||||
|
||||
// Token: 0x06009765 RID: 38757 RVA: 0x001F32C0 File Offset: 0x001F14C0
|
||||
[Token(Token = "0x6009765")]
|
||||
[Address(RVA = "0x1C49080", Offset = "0x1C47E80", VA = "0x181C49080")]
|
||||
public void AddExtension(DerObjectIdentifier oid, bool critical, Asn1Encodable extensionValue)
|
||||
{
|
||||
this.extGenerator.AddExtension(oid, critical, extensionValue);
|
||||
}
|
||||
|
||||
// Token: 0x06009766 RID: 38758 RVA: 0x001F32E4 File Offset: 0x001F14E4
|
||||
[Token(Token = "0x6009766")]
|
||||
[Address(RVA = "0x1C49160", Offset = "0x1C47F60", VA = "0x181C49160")]
|
||||
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: 0x06009767 RID: 38759 RVA: 0x001F3318 File Offset: 0x001F1518
|
||||
[Token(Token = "0x6009767")]
|
||||
[Address(RVA = "0x1C490B0", Offset = "0x1C47EB0", VA = "0x181C490B0")]
|
||||
public void AddExtension(DerObjectIdentifier oid, bool critical, byte[] extensionValue)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
DerOctetString derOctetString = new DerOctetString(extensionValue);
|
||||
x509ExtensionsGenerator.AddExtension(oid, critical, derOctetString);
|
||||
}
|
||||
|
||||
// Token: 0x06009768 RID: 38760 RVA: 0x001F3344 File Offset: 0x001F1544
|
||||
[Token(Token = "0x6009768")]
|
||||
[Address(RVA = "0x1C49870", Offset = "0x1C48670", VA = "0x181C49870")]
|
||||
[Obsolete]
|
||||
public X509Crl Generate(AsymmetricKeyParameter privateKey)
|
||||
{
|
||||
int num;
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, num);
|
||||
num = 0;
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x06009769 RID: 38761 RVA: 0x001F3368 File Offset: 0x001F1568
|
||||
[Token(Token = "0x6009769")]
|
||||
[Address(RVA = "0x1C494F0", Offset = "0x1C482F0", VA = "0x181C494F0")]
|
||||
[Obsolete]
|
||||
public X509Crl Generate(AsymmetricKeyParameter privateKey, SecureRandom random)
|
||||
{
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, random);
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x0600976A RID: 38762 RVA: 0x001F338C File Offset: 0x001F158C
|
||||
[Token(Token = "0x600976A")]
|
||||
[Address(RVA = "0x1C49590", Offset = "0x1C48390", VA = "0x181C49590")]
|
||||
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: 0x0600976B RID: 38763 RVA: 0x001F3410 File Offset: 0x001F1610
|
||||
[Token(Token = "0x600976B")]
|
||||
[Address(RVA = "0x1C492D0", Offset = "0x1C480D0", VA = "0x181C492D0")]
|
||||
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: 0x0600976C RID: 38764 RVA: 0x001F3458 File Offset: 0x001F1658
|
||||
[Token(Token = "0x600976C")]
|
||||
[Address(RVA = "0x1C49330", Offset = "0x1C48130", VA = "0x181C49330")]
|
||||
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: 0x17001823 RID: 6179
|
||||
// (get) Token: 0x0600976D RID: 38765 RVA: 0x001F34B0 File Offset: 0x001F16B0
|
||||
[Token(Token = "0x17001823")]
|
||||
public IEnumerable SignatureAlgNames
|
||||
{
|
||||
[Token(Token = "0x600976D")]
|
||||
[Address(RVA = "0x1C49C00", Offset = "0x1C48A00", VA = "0x181C49C00")]
|
||||
get
|
||||
{
|
||||
return X509Utilities.GetAlgNames();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040066B4 RID: 26292
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40066B4")]
|
||||
private readonly X509ExtensionsGenerator extGenerator;
|
||||
|
||||
// Token: 0x040066B5 RID: 26293
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40066B5")]
|
||||
private V2TbsCertListGenerator tbsGen;
|
||||
|
||||
// Token: 0x040066B6 RID: 26294
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40066B6")]
|
||||
private DerObjectIdentifier sigOID;
|
||||
|
||||
// Token: 0x040066B7 RID: 26295
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40066B7")]
|
||||
private AlgorithmIdentifier sigAlgId;
|
||||
|
||||
// Token: 0x040066B8 RID: 26296
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40066B8")]
|
||||
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: 0x02001910 RID: 6416
|
||||
[Token(Token = "0x2001910")]
|
||||
public class X509V3CertificateGenerator
|
||||
{
|
||||
// Token: 0x0600976E RID: 38766 RVA: 0x001F34C4 File Offset: 0x001F16C4
|
||||
[Token(Token = "0x600976E")]
|
||||
[Address(RVA = "0x1C4A9C0", Offset = "0x1C497C0", VA = "0x181C4A9C0")]
|
||||
public X509V3CertificateGenerator()
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = new X509ExtensionsGenerator();
|
||||
this.extGenerator = x509ExtensionsGenerator;
|
||||
base..ctor();
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = new V3TbsCertificateGenerator();
|
||||
this.tbsGen = v3TbsCertificateGenerator;
|
||||
}
|
||||
|
||||
// Token: 0x0600976F RID: 38767 RVA: 0x001F34F4 File Offset: 0x001F16F4
|
||||
[Token(Token = "0x600976F")]
|
||||
[Address(RVA = "0x1C4A5C0", Offset = "0x1C493C0", VA = "0x181C4A5C0")]
|
||||
public void Reset()
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = new V3TbsCertificateGenerator();
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
this.tbsGen = v3TbsCertificateGenerator;
|
||||
x509ExtensionsGenerator.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x06009770 RID: 38768 RVA: 0x001F3524 File Offset: 0x001F1724
|
||||
[Token(Token = "0x6009770")]
|
||||
[Address(RVA = "0x1C4A790", Offset = "0x1C49590", VA = "0x181C4A790")]
|
||||
public void SetSerialNumber(BigInteger serialNumber)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009770)
|
||||
|
||||
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: 0x06009771 RID: 38769 RVA: 0x001F3568 File Offset: 0x001F1768
|
||||
[Token(Token = "0x6009771")]
|
||||
[Address(RVA = "0x1C4A630", Offset = "0x1C49430", VA = "0x181C4A630")]
|
||||
public void SetIssuerDN(X509Name issuer)
|
||||
{
|
||||
this.tbsGen.issuer = issuer;
|
||||
}
|
||||
|
||||
// Token: 0x06009772 RID: 38770 RVA: 0x001F3588 File Offset: 0x001F1788
|
||||
[Token(Token = "0x6009772")]
|
||||
[Address(RVA = "0x1C4A6F0", Offset = "0x1C494F0", VA = "0x181C4A6F0")]
|
||||
public void SetNotBefore(DateTime date)
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = this.tbsGen;
|
||||
Time time = new Time(date);
|
||||
v3TbsCertificateGenerator.startDate = time;
|
||||
}
|
||||
|
||||
// Token: 0x06009773 RID: 38771 RVA: 0x001F35B0 File Offset: 0x001F17B0
|
||||
[Token(Token = "0x6009773")]
|
||||
[Address(RVA = "0x1C4A680", Offset = "0x1C49480", VA = "0x181C4A680")]
|
||||
public void SetNotAfter(DateTime date)
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = this.tbsGen;
|
||||
Time time = new Time(date);
|
||||
v3TbsCertificateGenerator.endDate = time;
|
||||
}
|
||||
|
||||
// Token: 0x06009774 RID: 38772 RVA: 0x001F35D8 File Offset: 0x001F17D8
|
||||
[Token(Token = "0x6009774")]
|
||||
[Address(RVA = "0x1C4A970", Offset = "0x1C49770", VA = "0x181C4A970")]
|
||||
public void SetSubjectDN(X509Name subject)
|
||||
{
|
||||
this.tbsGen.subject = subject;
|
||||
}
|
||||
|
||||
// Token: 0x06009775 RID: 38773 RVA: 0x001F35F8 File Offset: 0x001F17F8
|
||||
[Token(Token = "0x6009775")]
|
||||
[Address(RVA = "0x1C4A760", Offset = "0x1C49560", VA = "0x181C4A760")]
|
||||
public void SetPublicKey(AsymmetricKeyParameter publicKey)
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = this.tbsGen;
|
||||
SubjectPublicKeyInfo subjectPublicKeyInfo = SubjectPublicKeyInfoFactory.CreateSubjectPublicKeyInfo(publicKey);
|
||||
v3TbsCertificateGenerator.subjectPublicKeyInfo = subjectPublicKeyInfo;
|
||||
}
|
||||
|
||||
// Token: 0x06009776 RID: 38774 RVA: 0x001F3620 File Offset: 0x001F1820
|
||||
[Token(Token = "0x6009776")]
|
||||
[Address(RVA = "0x1C4A850", Offset = "0x1C49650", VA = "0x181C4A850")]
|
||||
[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: 0x06009777 RID: 38775 RVA: 0x001F3670 File Offset: 0x001F1870
|
||||
[Token(Token = "0x6009777")]
|
||||
[Address(RVA = "0x1C4A990", Offset = "0x1C49790", VA = "0x181C4A990")]
|
||||
public void SetSubjectUniqueID(bool[] uniqueID)
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = this.tbsGen;
|
||||
DerBitString derBitString = this.booleanToBitString(uniqueID);
|
||||
v3TbsCertificateGenerator.subjectUniqueID = derBitString;
|
||||
}
|
||||
|
||||
// Token: 0x06009778 RID: 38776 RVA: 0x001F369C File Offset: 0x001F189C
|
||||
[Token(Token = "0x6009778")]
|
||||
[Address(RVA = "0x1C4A650", Offset = "0x1C49450", VA = "0x181C4A650")]
|
||||
public void SetIssuerUniqueID(bool[] uniqueID)
|
||||
{
|
||||
V3TbsCertificateGenerator v3TbsCertificateGenerator = this.tbsGen;
|
||||
DerBitString derBitString = this.booleanToBitString(uniqueID);
|
||||
v3TbsCertificateGenerator.issuerUniqueID = derBitString;
|
||||
}
|
||||
|
||||
// Token: 0x06009779 RID: 38777 RVA: 0x001F36C8 File Offset: 0x001F18C8
|
||||
[Token(Token = "0x6009779")]
|
||||
[Address(RVA = "0x1C4AA40", Offset = "0x1C49840", VA = "0x181C4AA40")]
|
||||
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: 0x0600977A RID: 38778 RVA: 0x001F3734 File Offset: 0x001F1934
|
||||
[Token(Token = "0x600977A")]
|
||||
[Address(RVA = "0x1C49DC0", Offset = "0x1C48BC0", VA = "0x181C49DC0")]
|
||||
public void AddExtension(string oid, bool critical, Asn1Encodable extensionValue)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
||||
x509ExtensionsGenerator.AddExtension(derObjectIdentifier, critical, extensionValue);
|
||||
}
|
||||
|
||||
// Token: 0x0600977B RID: 38779 RVA: 0x001F3760 File Offset: 0x001F1960
|
||||
[Token(Token = "0x600977B")]
|
||||
[Address(RVA = "0x1C49080", Offset = "0x1C47E80", VA = "0x181C49080")]
|
||||
public void AddExtension(DerObjectIdentifier oid, bool critical, Asn1Encodable extensionValue)
|
||||
{
|
||||
this.extGenerator.AddExtension(oid, critical, extensionValue);
|
||||
}
|
||||
|
||||
// Token: 0x0600977C RID: 38780 RVA: 0x001F3784 File Offset: 0x001F1984
|
||||
[Token(Token = "0x600977C")]
|
||||
[Address(RVA = "0x1C49C50", Offset = "0x1C48A50", VA = "0x181C49C50")]
|
||||
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: 0x0600977D RID: 38781 RVA: 0x001F37B8 File Offset: 0x001F19B8
|
||||
[Token(Token = "0x600977D")]
|
||||
[Address(RVA = "0x1C49D10", Offset = "0x1C48B10", VA = "0x181C49D10")]
|
||||
public void AddExtension(DerObjectIdentifier oid, bool critical, byte[] extensionValue)
|
||||
{
|
||||
X509ExtensionsGenerator x509ExtensionsGenerator = this.extGenerator;
|
||||
DerOctetString derOctetString = new DerOctetString(extensionValue);
|
||||
x509ExtensionsGenerator.AddExtension(oid, critical, derOctetString);
|
||||
}
|
||||
|
||||
// Token: 0x0600977E RID: 38782 RVA: 0x001F37E4 File Offset: 0x001F19E4
|
||||
[Token(Token = "0x600977E")]
|
||||
[Address(RVA = "0x1C49FD0", Offset = "0x1C48DD0", VA = "0x181C49FD0")]
|
||||
public void CopyAndAddExtension(string oid, bool critical, X509Certificate cert)
|
||||
{
|
||||
DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(oid);
|
||||
this.CopyAndAddExtension(derObjectIdentifier, critical, cert);
|
||||
}
|
||||
|
||||
// Token: 0x0600977F RID: 38783 RVA: 0x001F3804 File Offset: 0x001F1A04
|
||||
[Token(Token = "0x600977F")]
|
||||
[Address(RVA = "0x1C49E70", Offset = "0x1C48C70", VA = "0x181C49E70")]
|
||||
public void CopyAndAddExtension(DerObjectIdentifier oid, bool critical, X509Certificate cert)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600977F)
|
||||
|
||||
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: 0x06009780 RID: 38784 RVA: 0x001F384C File Offset: 0x001F1A4C
|
||||
[Token(Token = "0x6009780")]
|
||||
[Address(RVA = "0x1C4A530", Offset = "0x1C49330", VA = "0x181C4A530")]
|
||||
[Obsolete]
|
||||
public X509Certificate Generate(AsymmetricKeyParameter privateKey)
|
||||
{
|
||||
int num;
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, num);
|
||||
num = 0;
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x06009781 RID: 38785 RVA: 0x001F3870 File Offset: 0x001F1A70
|
||||
[Token(Token = "0x6009781")]
|
||||
[Address(RVA = "0x1C4A130", Offset = "0x1C48F30", VA = "0x181C4A130")]
|
||||
[Obsolete]
|
||||
public X509Certificate Generate(AsymmetricKeyParameter privateKey, SecureRandom random)
|
||||
{
|
||||
Asn1SignatureFactory asn1SignatureFactory = new Asn1SignatureFactory(this.signatureAlgorithm, privateKey, random);
|
||||
return this.Generate(asn1SignatureFactory);
|
||||
}
|
||||
|
||||
// Token: 0x06009782 RID: 38786 RVA: 0x001F3894 File Offset: 0x001F1A94
|
||||
[Token(Token = "0x6009782")]
|
||||
[Address(RVA = "0x1C4A1D0", Offset = "0x1C48FD0", VA = "0x181C4A1D0")]
|
||||
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: 0x06009783 RID: 38787 RVA: 0x001F3924 File Offset: 0x001F1B24
|
||||
[Token(Token = "0x6009783")]
|
||||
[Address(RVA = "0x1C4A070", Offset = "0x1C48E70", VA = "0x181C4A070")]
|
||||
private X509Certificate GenerateJcaObject(TbsCertificateStructure tbsCert, AlgorithmIdentifier sigAlg, byte[] signature)
|
||||
{
|
||||
DerBitString derBitString = new DerBitString(signature);
|
||||
return new X509Certificate(new X509CertificateStructure(tbsCert, sigAlg, derBitString));
|
||||
}
|
||||
|
||||
// Token: 0x17001824 RID: 6180
|
||||
// (get) Token: 0x06009784 RID: 38788 RVA: 0x001F3948 File Offset: 0x001F1B48
|
||||
[Token(Token = "0x17001824")]
|
||||
public IEnumerable SignatureAlgNames
|
||||
{
|
||||
[Token(Token = "0x6009784")]
|
||||
[Address(RVA = "0x1C4AB90", Offset = "0x1C49990", VA = "0x181C4AB90")]
|
||||
get
|
||||
{
|
||||
return X509Utilities.GetAlgNames();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040066B9 RID: 26297
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40066B9")]
|
||||
private readonly X509ExtensionsGenerator extGenerator;
|
||||
|
||||
// Token: 0x040066BA RID: 26298
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40066BA")]
|
||||
private V3TbsCertificateGenerator tbsGen;
|
||||
|
||||
// Token: 0x040066BB RID: 26299
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40066BB")]
|
||||
private DerObjectIdentifier sigOid;
|
||||
|
||||
// Token: 0x040066BC RID: 26300
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40066BC")]
|
||||
private AlgorithmIdentifier sigAlgId;
|
||||
|
||||
// Token: 0x040066BD RID: 26301
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40066BD")]
|
||||
private string signatureAlgorithm;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user