Files
27Aug2021-Cpp2IL-Dump/Assembly-CSharp/BestHTTP/SecureProtocol/Org/BouncyCastle/X509/AttributeCertificateIssuer.cs
T
niko c12fbe3fc6 m
2026-04-12 16:51:38 +02:00

225 lines
5.8 KiB
C#

using System;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
{
// Token: 0x020019D9 RID: 6617
[Token(Token = "0x20019D9")]
public class AttributeCertificateIssuer : IX509Selector, ICloneable
{
// Token: 0x06009A3D RID: 39485 RVA: 0x001F84F0 File Offset: 0x001F66F0
[Token(Token = "0x6009A3D")]
[Address(RVA = "0x410EE0", Offset = "0x40FEE0", VA = "0x180410EE0")]
public AttributeCertificateIssuer(AttCertIssuer issuer)
{
Asn1Encodable obj = issuer.obj;
this.form = obj;
}
// Token: 0x06009A3E RID: 39486 RVA: 0x001F8518 File Offset: 0x001F6718
[Token(Token = "0x6009A3E")]
[Address(RVA = "0x410E30", Offset = "0x40FE30", VA = "0x180410E30")]
public AttributeCertificateIssuer(X509Name principal)
{
V2Form v2Form = new V2Form(new GeneralNames(new GeneralName(principal)));
this.form = v2Form;
}
// Token: 0x06009A3F RID: 39487 RVA: 0x001F8544 File Offset: 0x001F6744
[Token(Token = "0x6009A3F")]
[Address(RVA = "0x410530", Offset = "0x40F530", VA = "0x180410530")]
private object[] GetNames()
{
Asn1Encodable asn1Encodable;
int num;
do
{
asn1Encodable = this.form;
num = 0;
}
while ((asn1Encodable != 0 && asn1Encodable != 0 && (asn1Encodable == 0 || asn1Encodable == 0)) || asn1Encodable == 0);
GeneralName[] array;
int length = array.Length;
if (num != length)
{
GeneralName generalName = array[num];
num++;
}
object[] array2 = new object[num];
int length2 = array.Length;
if (num != length2)
{
GeneralName generalName2 = array[num];
if (generalName2.tag == 4)
{
num++;
X509Name instance = X509Name.GetInstance(generalName2.obj);
throw new ArrayTypeMismatchException();
}
num++;
}
return array2;
}
// Token: 0x06009A40 RID: 39488 RVA: 0x001F85EC File Offset: 0x001F67EC
[Token(Token = "0x6009A40")]
[Address(RVA = "0x4107F0", Offset = "0x40F7F0", VA = "0x1804107F0")]
public X509Name[] GetPrincipals()
{
object[] names = this.GetNames();
int num = 0;
int num2 = 0;
int num3 = 0;
int length = names.Length;
if (num3 != length)
{
if (names[num2] == 0)
{
}
num2++;
}
X509Name[] array = new X509Name[num];
int num4 = 0;
int num5 = 0;
int num6 = 0;
int length2 = names.Length;
if (num6 != length2)
{
object obj = names[num5];
if (obj != 0 && obj != 0)
{
num4++;
throw new ArrayTypeMismatchException();
}
num5++;
}
return array;
}
// Token: 0x06009A41 RID: 39489 RVA: 0x001F8680 File Offset: 0x001F6880
[Token(Token = "0x6009A41")]
[Address(RVA = "0x410CE0", Offset = "0x40FCE0", VA = "0x180410CE0")]
private bool MatchesDN(X509Name subject, GeneralNames targets)
{
GeneralName[] names = targets.GetNames();
int num = 0;
int length = names.Length;
if (num != length)
{
GeneralName generalName = names[num];
if (generalName.tag == 4)
{
if (!X509Name.GetInstance(generalName.obj).Equivalent(subject))
{
}
return true;
}
num++;
}
throw new NullReferenceException();
}
// Token: 0x06009A42 RID: 39490 RVA: 0x001F86D4 File Offset: 0x001F68D4
[Token(Token = "0x6009A42")]
[Address(RVA = "0x4103B0", Offset = "0x40F3B0", VA = "0x1804103B0", Slot = "5")]
public object Clone()
{
Asn1Encodable obj = AttCertIssuer.GetInstance(this.form).obj;
AttributeCertificateIssuer attributeCertificateIssuer;
attributeCertificateIssuer.form = obj;
throw new NullReferenceException();
}
// Token: 0x06009A43 RID: 39491 RVA: 0x001F8700 File Offset: 0x001F6900
[Token(Token = "0x6009A43")]
[Address(RVA = "0x4109E0", Offset = "0x40F9E0", VA = "0x1804109E0")]
public bool Match(X509Certificate x509Cert)
{
for (;;)
{
Asn1Encodable asn1Encodable = this.form;
if (asn1Encodable != 0 && asn1Encodable != 0)
{
int num = 0;
if (asn1Encodable == 0)
{
continue;
}
if (num == 0)
{
break;
}
if (x509Cert.Version == 0)
{
}
BigInteger serialNumber = x509Cert.SerialNumber;
}
X509Name issuerDN = x509Cert.IssuerDN;
Asn1Encodable asn1Encodable2 = this.form;
if (asn1Encodable2 == 0 || asn1Encodable2 != 0)
{
goto IL_53;
}
}
X509Name issuerDN2 = x509Cert.IssuerDN;
bool flag;
return flag;
IL_53:
throw new NullReferenceException();
}
// Token: 0x06009A44 RID: 39492 RVA: 0x001F8768 File Offset: 0x001F6968
[Token(Token = "0x6009A44")]
[Address(RVA = "0x410420", Offset = "0x40F420", VA = "0x180410420", Slot = "0")]
public override bool Equals(object obj)
{
while (obj != this)
{
if (obj != 0 && obj != 0)
{
if (obj == 0)
{
continue;
}
Asn1Object asn1Object = this.form.ToAsn1Object();
}
break;
}
return true;
}
// Token: 0x06009A45 RID: 39493 RVA: 0x001F87A0 File Offset: 0x001F69A0
[Token(Token = "0x6009A45")]
[Address(RVA = "0x40F2B0", Offset = "0x40E2B0", VA = "0x18040F2B0", Slot = "2")]
public override int GetHashCode()
{
Asn1Object asn1Object = this.form.ToAsn1Object();
throw new NullReferenceException();
}
// Token: 0x06009A46 RID: 39494 RVA: 0x001F87C0 File Offset: 0x001F69C0
[Token(Token = "0x6009A46")]
[Address(RVA = "0x410C00", Offset = "0x40FC00", VA = "0x180410C00", Slot = "4")]
public bool Match(object obj)
{
while (obj != 0 && obj != 0)
{
if (obj != 0)
{
bool flag;
return flag;
}
}
}
// Token: 0x04006830 RID: 26672
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006830")]
internal readonly Asn1Encodable form;
}
}