Files
2026-04-08 23:40:05 +02:00

179 lines
13 KiB
C#

using System;
using System.IO;
using System.Runtime.InteropServices;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
{
// Token: 0x0200183C RID: 6204
[Token(Token = "0x200183C")]
[StructLayout(3)]
public class SubjectKeyIdentifier : Asn1Encodable
{
// Token: 0x0600A735 RID: 42805 RVA: 0x0026EA64 File Offset: 0x0026CC64
[Token(Token = "0x600A735")]
[Address(RVA = "0x2B12BA0", Offset = "0x2B115A0", VA = "0x182B12BA0")]
public static SubjectKeyIdentifier GetInstance(Asn1TaggedObject obj, bool explicitly)
{
return SubjectKeyIdentifier.GetInstance(Asn1OctetString.GetInstance(obj, explicitly));
}
// Token: 0x0600A736 RID: 42806 RVA: 0x0026EA80 File Offset: 0x0026CC80
[Token(Token = "0x600A736")]
[Address(RVA = "0x2B12BC0", Offset = "0x2B115C0", VA = "0x182B12BC0")]
public static SubjectKeyIdentifier GetInstance(object obj)
{
/*
An exception occurred when decompiling this method (0600A736)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.SubjectKeyIdentifier BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.SubjectKeyIdentifier::GetInstance(System.Object)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_42:
stloc:string(var_10_48, call:string(Platform::GetTypeName, ldloc:object(obj)))
stloc:ArgumentException(var_11_5B, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("Invalid SubjectKeyIdentifier: "), ldloc:string(var_10_48))))
}
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: 0x0600A737 RID: 42807 RVA: 0x0026EAEC File Offset: 0x0026CCEC
[Token(Token = "0x600A737")]
[Address(RVA = "0x2B12F20", Offset = "0x2B11920", VA = "0x182B12F20")]
public SubjectKeyIdentifier(byte[] keyID)
{
/*
An exception occurred when decompiling this method (0600A737)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.SubjectKeyIdentifier::.ctor(System.Byte[])
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_12:
stloc:ArgumentNullException(var_0_1C, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("keyID")))
}
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: 0x0600A738 RID: 42808 RVA: 0x0026EB18 File Offset: 0x0026CD18
[Token(Token = "0x600A738")]
[Address(RVA = "0x2B12FA0", Offset = "0x2B119A0", VA = "0x182B12FA0")]
public SubjectKeyIdentifier(Asn1OctetString keyID)
{
Stream octetStream = keyID.GetOctetStream();
this.keyIdentifier = octetStream;
}
// Token: 0x0600A739 RID: 42809 RVA: 0x0026EB40 File Offset: 0x0026CD40
[Token(Token = "0x600A739")]
[Address(RVA = "0x2B12FF0", Offset = "0x2B119F0", VA = "0x182B12FF0")]
public SubjectKeyIdentifier(SubjectPublicKeyInfo spki)
{
byte[] digest = SubjectKeyIdentifier.GetDigest(spki);
this.keyIdentifier = digest;
}
// Token: 0x0600A73A RID: 42810 RVA: 0x0026EB64 File Offset: 0x0026CD64
[Token(Token = "0x600A73A")]
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0")]
public byte[] GetKeyIdentifier()
{
return this.keyIdentifier;
}
// Token: 0x0600A73B RID: 42811 RVA: 0x0026EB78 File Offset: 0x0026CD78
[Token(Token = "0x600A73B")]
[Address(RVA = "0x2B12EC0", Offset = "0x2B118C0", VA = "0x182B12EC0", Slot = "5")]
public override Asn1Object ToAsn1Object()
{
/*
An exception occurred when decompiling this method (0600A73B)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1Object BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.SubjectKeyIdentifier::ToAsn1Object()
---> System.Exception: Basic block has to end with unconditional control flow.
{
Block_0:
stloc:DerOctetString(var_0_0B, newobj:DerOctetString(DerOctetString::.ctor, ldfld:uint8[](SubjectKeyIdentifier::keyIdentifier, ldloc:SubjectKeyIdentifier(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: 0x0600A73C RID: 42812 RVA: 0x0026EB90 File Offset: 0x0026CD90
[Token(Token = "0x600A73C")]
[Address(RVA = "0x2B12940", Offset = "0x2B11340", VA = "0x182B12940")]
public static SubjectKeyIdentifier CreateSha1KeyIdentifier(SubjectPublicKeyInfo keyInfo)
{
byte[] digest = SubjectKeyIdentifier.GetDigest(keyInfo);
SubjectKeyIdentifier subjectKeyIdentifier;
subjectKeyIdentifier.keyIdentifier = digest;
return subjectKeyIdentifier;
}
// Token: 0x0600A73D RID: 42813 RVA: 0x0026EBAC File Offset: 0x0026CDAC
[Token(Token = "0x600A73D")]
[Address(RVA = "0x2B129A0", Offset = "0x2B113A0", VA = "0x182B129A0")]
public static SubjectKeyIdentifier CreateTruncatedSha1KeyIdentifier(SubjectPublicKeyInfo keyInfo)
{
byte[] digest = SubjectKeyIdentifier.GetDigest(keyInfo);
byte[] array = new byte[8];
int length = array.Length;
int num = 0;
int length2 = digest.Length;
Array.Copy(digest, length2, array, num, length);
byte b = array[0];
array[0] = b;
array[0] = b;
SubjectKeyIdentifier subjectKeyIdentifier;
subjectKeyIdentifier.keyIdentifier = array;
return subjectKeyIdentifier;
}
// Token: 0x0600A73E RID: 42814 RVA: 0x0026EC10 File Offset: 0x0026CE10
[Token(Token = "0x600A73E")]
[Address(RVA = "0x2B12AB0", Offset = "0x2B114B0", VA = "0x182B12AB0")]
private static byte[] GetDigest(SubjectPublicKeyInfo spki)
{
byte[] array = new byte[new Sha1Digest()];
int length = spki.keyData.GetOctets().Length;
return array;
}
// Token: 0x04006CB0 RID: 27824
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006CB0")]
private readonly byte[] keyIdentifier;
}
}