104 lines
5.6 KiB
C#
104 lines
5.6 KiB
C#
using System;
|
|
using System.IO;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls
|
|
{
|
|
// Token: 0x02001B20 RID: 6944
|
|
[Token(Token = "0x2001B20")]
|
|
public class DigitallySigned
|
|
{
|
|
// Token: 0x0600ACBB RID: 44219 RVA: 0x00258E24 File Offset: 0x00257024
|
|
[Token(Token = "0x600ACBB")]
|
|
[Address(RVA = "0x18B1550", Offset = "0x18B0350", VA = "0x1818B1550")]
|
|
public DigitallySigned(SignatureAndHashAlgorithm algorithm, byte[] signature)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600ACBB)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.DigitallySigned::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.SignatureAndHashAlgorithm,System.Byte[])
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_19:
|
|
stloc:ArgumentNullException(var_0_23, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("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 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x17001B5E RID: 7006
|
|
// (get) Token: 0x0600ACBC RID: 44220 RVA: 0x00258E54 File Offset: 0x00257054
|
|
[Token(Token = "0x17001B5E")]
|
|
public virtual SignatureAndHashAlgorithm Algorithm
|
|
{
|
|
[Token(Token = "0x600ACBC")]
|
|
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20", Slot = "4")]
|
|
get
|
|
{
|
|
return this.mAlgorithm;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001B5F RID: 7007
|
|
// (get) Token: 0x0600ACBD RID: 44221 RVA: 0x00258E68 File Offset: 0x00257068
|
|
[Token(Token = "0x17001B5F")]
|
|
public virtual byte[] Signature
|
|
{
|
|
[Token(Token = "0x600ACBD")]
|
|
[Address(RVA = "0x3F5F40", Offset = "0x3F4D40", VA = "0x1803F5F40", Slot = "5")]
|
|
get
|
|
{
|
|
return this.mSignature;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600ACBE RID: 44222 RVA: 0x00258E7C File Offset: 0x0025707C
|
|
[Token(Token = "0x600ACBE")]
|
|
[Address(RVA = "0x18B13F0", Offset = "0x18B01F0", VA = "0x1818B13F0", Slot = "6")]
|
|
public virtual void Encode(Stream output)
|
|
{
|
|
SignatureAndHashAlgorithm signatureAndHashAlgorithm = this.mAlgorithm;
|
|
if (signatureAndHashAlgorithm != 0)
|
|
{
|
|
byte signature = signatureAndHashAlgorithm.Signature;
|
|
}
|
|
TlsUtilities.WriteOpaque16(this.mSignature, output);
|
|
}
|
|
|
|
// Token: 0x0600ACBF RID: 44223 RVA: 0x00258EA8 File Offset: 0x002570A8
|
|
[Token(Token = "0x600ACBF")]
|
|
[Address(RVA = "0x18B1480", Offset = "0x18B0280", VA = "0x1818B1480")]
|
|
public static DigitallySigned Parse(TlsContext context, Stream input)
|
|
{
|
|
int num = 0;
|
|
if (TlsUtilities.IsTlsV12(context))
|
|
{
|
|
SignatureAndHashAlgorithm signatureAndHashAlgorithm = SignatureAndHashAlgorithm.Parse(input);
|
|
}
|
|
byte[] array = TlsUtilities.ReadOpaque16(input);
|
|
return new DigitallySigned(num, array);
|
|
}
|
|
|
|
// Token: 0x04006E61 RID: 28257
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4006E61")]
|
|
protected readonly SignatureAndHashAlgorithm mAlgorithm;
|
|
|
|
// Token: 0x04006E62 RID: 28258
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4006E62")]
|
|
protected readonly byte[] mSignature;
|
|
}
|
|
}
|