Files
Jan2021-Cpp2Il-Dump/Assembly-CSharp/BestHTTP/SecureProtocol/Org/BouncyCastle/X509/AttributeCertificateIssuer.cs
T
2026-04-08 23:40:05 +02:00

227 lines
5.8 KiB
C#

using System;
using System.Runtime.InteropServices;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509.Store;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.X509
{
// Token: 0x0200131C RID: 4892
[Token(Token = "0x200131C")]
[StructLayout(3)]
public class AttributeCertificateIssuer : IX509Selector, ICloneable
{
// Token: 0x06007A95 RID: 31381 RVA: 0x00197A7C File Offset: 0x00195C7C
[Token(Token = "0x6007A95")]
[Address(RVA = "0x5294A0", Offset = "0x527EA0", VA = "0x1805294A0")]
public AttributeCertificateIssuer(AttCertIssuer issuer)
{
Asn1Encodable obj = issuer.obj;
this.form = obj;
}
// Token: 0x06007A96 RID: 31382 RVA: 0x00197AA4 File Offset: 0x00195CA4
[Token(Token = "0x6007A96")]
[Address(RVA = "0x5293F0", Offset = "0x527DF0", VA = "0x1805293F0")]
public AttributeCertificateIssuer(X509Name principal)
{
V2Form v2Form = new V2Form(new GeneralNames(new GeneralName(principal)));
this.form = v2Form;
}
// Token: 0x06007A97 RID: 31383 RVA: 0x00197AD0 File Offset: 0x00195CD0
[Token(Token = "0x6007A97")]
[Address(RVA = "0x528AF0", Offset = "0x5274F0", VA = "0x180528AF0")]
private object[] GetNames()
{
Asn1Encodable asn1Encodable;
int num;
do
{
asn1Encodable = this.form;
num = 0;
}
while ((asn1Encodable != 0 && asn1Encodable != 0 && (asn1Encodable == 0 || asn1Encodable == 0)) || asn1Encodable == 0);
GeneralName[] array;
int length = array.Length;
if (num != length)
{
GeneralName generalName = array[num];
num++;
}
object[] array2 = new object[num];
int length2 = array.Length;
if (num != length2)
{
GeneralName generalName2 = array[num];
if (generalName2.tag == 4)
{
num++;
X509Name instance = X509Name.GetInstance(generalName2.obj);
throw new ArrayTypeMismatchException();
}
num++;
}
return array2;
}
// Token: 0x06007A98 RID: 31384 RVA: 0x00197B78 File Offset: 0x00195D78
[Token(Token = "0x6007A98")]
[Address(RVA = "0x528DB0", Offset = "0x5277B0", VA = "0x180528DB0")]
public X509Name[] GetPrincipals()
{
object[] names = this.GetNames();
int num = 0;
int num2 = 0;
int num3 = 0;
int length = names.Length;
if (num3 != length)
{
if (names[num2] == 0)
{
}
num2++;
}
X509Name[] array = new X509Name[num];
int num4 = 0;
int num5 = 0;
int num6 = 0;
int length2 = names.Length;
if (num6 != length2)
{
object obj = names[num5];
if (obj != 0 && obj != 0)
{
num4++;
throw new ArrayTypeMismatchException();
}
num5++;
}
return array;
}
// Token: 0x06007A99 RID: 31385 RVA: 0x00197C0C File Offset: 0x00195E0C
[Token(Token = "0x6007A99")]
[Address(RVA = "0x5292A0", Offset = "0x527CA0", VA = "0x1805292A0")]
private bool MatchesDN(X509Name subject, GeneralNames targets)
{
GeneralName[] names = targets.GetNames();
int num = 0;
int length = names.Length;
if (num != length)
{
GeneralName generalName = names[num];
if (generalName.tag == 4)
{
if (!X509Name.GetInstance(generalName.obj).Equivalent(subject))
{
}
return true;
}
num++;
}
throw new NullReferenceException();
}
// Token: 0x06007A9A RID: 31386 RVA: 0x00197C60 File Offset: 0x00195E60
[Token(Token = "0x6007A9A")]
[Address(RVA = "0x528940", Offset = "0x527340", VA = "0x180528940", Slot = "5")]
public object Clone()
{
Asn1Encodable obj = AttCertIssuer.GetInstance(this.form).obj;
AttributeCertificateIssuer attributeCertificateIssuer;
attributeCertificateIssuer.form = obj;
throw new NullReferenceException();
}
// Token: 0x06007A9B RID: 31387 RVA: 0x00197C8C File Offset: 0x00195E8C
[Token(Token = "0x6007A9B")]
[Address(RVA = "0x528FA0", Offset = "0x5279A0", VA = "0x180528FA0")]
public bool Match(X509Certificate x509Cert)
{
for (;;)
{
Asn1Encodable asn1Encodable = this.form;
if (asn1Encodable != 0 && asn1Encodable != 0)
{
int num = 0;
if (asn1Encodable == 0)
{
continue;
}
if (num == 0)
{
break;
}
if (x509Cert.Version == 0)
{
}
BigInteger serialNumber = x509Cert.SerialNumber;
}
X509Name issuerDN = x509Cert.IssuerDN;
Asn1Encodable asn1Encodable2 = this.form;
if (asn1Encodable2 == 0 || asn1Encodable2 != 0)
{
goto IL_53;
}
}
X509Name issuerDN2 = x509Cert.IssuerDN;
bool flag;
return flag;
IL_53:
throw new NullReferenceException();
}
// Token: 0x06007A9C RID: 31388 RVA: 0x00197CF4 File Offset: 0x00195EF4
[Token(Token = "0x6007A9C")]
[Address(RVA = "0x5289B0", Offset = "0x5273B0", VA = "0x1805289B0", Slot = "0")]
public override bool Equals(object obj)
{
while (obj != this)
{
if (obj != 0 && obj != 0)
{
if (obj == 0)
{
continue;
}
Asn1Object asn1Object = this.form.ToAsn1Object();
}
break;
}
return true;
}
// Token: 0x06007A9D RID: 31389 RVA: 0x00197D2C File Offset: 0x00195F2C
[Token(Token = "0x6007A9D")]
[Address(RVA = "0x528AC0", Offset = "0x5274C0", VA = "0x180528AC0", Slot = "2")]
public override int GetHashCode()
{
Asn1Object asn1Object = this.form.ToAsn1Object();
throw new NullReferenceException();
}
// Token: 0x06007A9E RID: 31390 RVA: 0x00197D4C File Offset: 0x00195F4C
[Token(Token = "0x6007A9E")]
[Address(RVA = "0x5291C0", Offset = "0x527BC0", VA = "0x1805291C0", Slot = "4")]
public bool Match(object obj)
{
while (obj != 0 && obj != 0)
{
if (obj != 0)
{
bool flag;
return flag;
}
}
}
// Token: 0x04005834 RID: 22580
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x4005834")]
internal readonly Asn1Encodable form;
}
}