290 lines
13 KiB
C#
290 lines
13 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.IO;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
|
|
{
|
|
// Token: 0x02001ED5 RID: 7893
|
|
[Token(Token = "0x2001ED5")]
|
|
public class AuthorityKeyIdentifier : Asn1Encodable
|
|
{
|
|
// Token: 0x0600C5CD RID: 50637 RVA: 0x002CAC20 File Offset: 0x002C8E20
|
|
[Token(Token = "0x600C5CD")]
|
|
[Address(RVA = "0x2D84D20", Offset = "0x2D83D20", VA = "0x182D84D20")]
|
|
public static AuthorityKeyIdentifier GetInstance(Asn1TaggedObject obj, bool explicitly)
|
|
{
|
|
return AuthorityKeyIdentifier.GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
|
|
}
|
|
|
|
// Token: 0x0600C5CE RID: 50638 RVA: 0x002CAC3C File Offset: 0x002C8E3C
|
|
[Token(Token = "0x600C5CE")]
|
|
[Address(RVA = "0x2D84A90", Offset = "0x2D83A90", VA = "0x182D84A90")]
|
|
public static AuthorityKeyIdentifier GetInstance(object obj)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600C5CE)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.AuthorityKeyIdentifier BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.AuthorityKeyIdentifier::GetInstance(System.Object)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_3C:
|
|
stloc:string(var_9_42, call:string(Platform::GetTypeName, ldloc:object(obj)))
|
|
stloc:ArgumentException(var_10_5A, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("unknown object in factory: "), ldloc:string(var_9_42)), 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: 0x0600C5CF RID: 50639 RVA: 0x002CACA4 File Offset: 0x002C8EA4
|
|
[Token(Token = "0x600C5CF")]
|
|
[Address(RVA = "0x2D854B0", Offset = "0x2D844B0", VA = "0x182D854B0")]
|
|
protected internal AuthorityKeyIdentifier(Asn1Sequence seq)
|
|
{
|
|
int num;
|
|
do
|
|
{
|
|
num = 0;
|
|
base..ctor();
|
|
IEnumerator enumerator = seq.GetEnumerator();
|
|
Asn1OctetString asn1OctetString;
|
|
if (enumerator != 0)
|
|
{
|
|
if (enumerator == 0)
|
|
{
|
|
goto IL_56;
|
|
}
|
|
uint num2;
|
|
if (num2 != (uint)0)
|
|
{
|
|
if (num2 != (uint)0)
|
|
{
|
|
if (num2 != (uint)1)
|
|
{
|
|
goto IL_4A;
|
|
}
|
|
DerInteger derInteger;
|
|
this.certserno = derInteger;
|
|
}
|
|
GeneralNames generalNames;
|
|
this.certissuer = generalNames;
|
|
}
|
|
this.keyidentifier = asn1OctetString;
|
|
}
|
|
if (asn1OctetString != 0)
|
|
{
|
|
}
|
|
}
|
|
while (num != 0);
|
|
return;
|
|
IL_4A:
|
|
ArgumentException ex = new ArgumentException("illegal tag");
|
|
IL_56:
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600C5D0 RID: 50640 RVA: 0x002CAD14 File Offset: 0x002C8F14
|
|
[Token(Token = "0x600C5D0")]
|
|
[Address(RVA = "0x2D85380", Offset = "0x2D84380", VA = "0x182D85380")]
|
|
public AuthorityKeyIdentifier(SubjectPublicKeyInfo spki)
|
|
{
|
|
byte[] array = new byte[new Sha1Digest()];
|
|
int length = spki.keyData.GetOctets().Length;
|
|
DerOctetString derOctetString = new DerOctetString(array);
|
|
this.keyidentifier = derOctetString;
|
|
}
|
|
|
|
// Token: 0x0600C5D1 RID: 50641 RVA: 0x002CAD5C File Offset: 0x002C8F5C
|
|
[Token(Token = "0x600C5D1")]
|
|
[Address(RVA = "0x2D85170", Offset = "0x2D84170", VA = "0x182D85170")]
|
|
public AuthorityKeyIdentifier(SubjectPublicKeyInfo spki, GeneralNames name, BigInteger serialNumber)
|
|
{
|
|
byte[] array = new byte[new Sha1Digest()];
|
|
int length = spki.keyData.GetOctets().Length;
|
|
DerOctetString derOctetString = new DerOctetString(array);
|
|
this.keyidentifier = derOctetString;
|
|
this.certissuer = name;
|
|
DerInteger derInteger = new DerInteger(serialNumber);
|
|
this.certserno = derInteger;
|
|
}
|
|
|
|
// Token: 0x0600C5D2 RID: 50642 RVA: 0x002CADB8 File Offset: 0x002C8FB8
|
|
[Token(Token = "0x600C5D2")]
|
|
[Address(RVA = "0x2D852D0", Offset = "0x2D842D0", VA = "0x182D852D0")]
|
|
public AuthorityKeyIdentifier(GeneralNames name, BigInteger serialNumber)
|
|
{
|
|
this.keyidentifier = (ulong)0L;
|
|
GeneralNames instance = GeneralNames.GetInstance(name.ToAsn1Object());
|
|
this.certissuer = instance;
|
|
DerInteger derInteger = new DerInteger(serialNumber);
|
|
this.certserno = derInteger;
|
|
}
|
|
|
|
// Token: 0x0600C5D3 RID: 50643 RVA: 0x002CADFC File Offset: 0x002C8FFC
|
|
[Token(Token = "0x600C5D3")]
|
|
[Address(RVA = "0x2D856B0", Offset = "0x2D846B0", VA = "0x182D856B0")]
|
|
public AuthorityKeyIdentifier(byte[] keyIdentifier)
|
|
{
|
|
DerOctetString derOctetString = new DerOctetString(keyIdentifier);
|
|
int num = 0;
|
|
this.keyidentifier = derOctetString;
|
|
this.certissuer = num;
|
|
this.certserno = num;
|
|
}
|
|
|
|
// Token: 0x0600C5D4 RID: 50644 RVA: 0x002CAE30 File Offset: 0x002C9030
|
|
[Token(Token = "0x600C5D4")]
|
|
[Address(RVA = "0x2D85090", Offset = "0x2D84090", VA = "0x182D85090")]
|
|
public AuthorityKeyIdentifier(byte[] keyIdentifier, GeneralNames name, BigInteger serialNumber)
|
|
{
|
|
DerOctetString derOctetString = new DerOctetString(keyIdentifier);
|
|
this.keyidentifier = derOctetString;
|
|
GeneralNames instance = GeneralNames.GetInstance(name.ToAsn1Object());
|
|
this.certissuer = instance;
|
|
DerInteger derInteger = new DerInteger(serialNumber);
|
|
this.certserno = derInteger;
|
|
}
|
|
|
|
// Token: 0x0600C5D5 RID: 50645 RVA: 0x002CAE78 File Offset: 0x002C9078
|
|
[Token(Token = "0x600C5D5")]
|
|
[Address(RVA = "0x2D84D40", Offset = "0x2D83D40", VA = "0x182D84D40")]
|
|
public byte[] GetKeyIdentifier()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600C5D5)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.AuthorityKeyIdentifier::GetKeyIdentifier()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_0D:
|
|
stloc:Stream(var_2_13, call:Stream(Asn1OctetStringParser::GetOctetStream, ldloc:Asn1OctetString[exp:Asn1OctetStringParser](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: 0x17001E90 RID: 7824
|
|
// (get) Token: 0x0600C5D6 RID: 50646 RVA: 0x002CAE98 File Offset: 0x002C9098
|
|
[Token(Token = "0x17001E90")]
|
|
public GeneralNames AuthorityCertIssuer
|
|
{
|
|
[Token(Token = "0x600C5D6")]
|
|
[Address(RVA = "0x4157B0", Offset = "0x4147B0", VA = "0x1804157B0")]
|
|
get
|
|
{
|
|
return this.certissuer;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001E91 RID: 7825
|
|
// (get) Token: 0x0600C5D7 RID: 50647 RVA: 0x002CAEAC File Offset: 0x002C90AC
|
|
[Token(Token = "0x17001E91")]
|
|
public BigInteger AuthorityCertSerialNumber
|
|
{
|
|
[Token(Token = "0x600C5D7")]
|
|
[Address(RVA = "0x2D85730", Offset = "0x2D84730", VA = "0x182D85730")]
|
|
get
|
|
{
|
|
DerInteger derInteger = this.certserno;
|
|
if (derInteger == 0)
|
|
{
|
|
}
|
|
return derInteger.Value;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600C5D8 RID: 50648 RVA: 0x002CAECC File Offset: 0x002C90CC
|
|
[Token(Token = "0x600C5D8")]
|
|
[Address(RVA = "0x2D84D60", Offset = "0x2D83D60", VA = "0x182D84D60", Slot = "5")]
|
|
public override Asn1Object ToAsn1Object()
|
|
{
|
|
Asn1EncodableVector asn1EncodableVector;
|
|
if (this.keyidentifier != (ulong)0L)
|
|
{
|
|
Asn1Encodable[] array = new Asn1Encodable[1];
|
|
Asn1OctetString asn1OctetString = this.keyidentifier;
|
|
int num;
|
|
int num2;
|
|
DerTaggedObject derTaggedObject = new DerTaggedObject(num != 0, num2, asn1OctetString);
|
|
num2 = 0;
|
|
num = 0;
|
|
if (derTaggedObject != 0)
|
|
{
|
|
}
|
|
array[0] = derTaggedObject;
|
|
asn1EncodableVector.Add(array);
|
|
}
|
|
if (this.certissuer != (ulong)0L)
|
|
{
|
|
Asn1Encodable[] array2 = new Asn1Encodable[1];
|
|
GeneralNames generalNames = this.certissuer;
|
|
int num3;
|
|
DerTaggedObject derTaggedObject2 = new DerTaggedObject(num3 != 0, 1, generalNames);
|
|
num3 = 0;
|
|
if (derTaggedObject2 != 0)
|
|
{
|
|
}
|
|
array2[0] = derTaggedObject2;
|
|
asn1EncodableVector.Add(array2);
|
|
}
|
|
if (this.certserno != (ulong)0L)
|
|
{
|
|
Asn1Encodable[] array3 = new Asn1Encodable[1];
|
|
DerInteger derInteger = this.certserno;
|
|
int num4;
|
|
DerTaggedObject derTaggedObject3 = new DerTaggedObject(num4 != 0, 2, derInteger);
|
|
num4 = 0;
|
|
if (derTaggedObject3 != 0)
|
|
{
|
|
}
|
|
array3[0] = derTaggedObject3;
|
|
asn1EncodableVector.Add(array3);
|
|
}
|
|
DerSequence derSequence = new DerSequence(asn1EncodableVector);
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600C5D9 RID: 50649 RVA: 0x002CAFA8 File Offset: 0x002C91A8
|
|
[Token(Token = "0x600C5D9")]
|
|
[Address(RVA = "0x2D85020", Offset = "0x2D84020", VA = "0x182D85020", Slot = "3")]
|
|
public override string ToString()
|
|
{
|
|
Stream octetStream = this.keyidentifier.GetOctetStream();
|
|
return "AuthorityKeyIdentifier: KeyID(" + octetStream + ")";
|
|
}
|
|
|
|
// Token: 0x04007C24 RID: 31780
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4007C24")]
|
|
internal readonly Asn1OctetString keyidentifier;
|
|
|
|
// Token: 0x04007C25 RID: 31781
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4007C25")]
|
|
internal readonly GeneralNames certissuer;
|
|
|
|
// Token: 0x04007C26 RID: 31782
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4007C26")]
|
|
internal readonly DerInteger certserno;
|
|
}
|
|
}
|