134 lines
9.2 KiB
C#
134 lines
9.2 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls
|
|
{
|
|
// Token: 0x0200156B RID: 5483
|
|
[Token(Token = "0x200156B")]
|
|
[StructLayout(3)]
|
|
public class PskTlsClient : AbstractTlsClient
|
|
{
|
|
// Token: 0x060091A3 RID: 37283 RVA: 0x00204E9C File Offset: 0x0020309C
|
|
[Token(Token = "0x60091A3")]
|
|
[Address(RVA = "0x1E89A90", Offset = "0x1E88490", VA = "0x181E89A90")]
|
|
public PskTlsClient(TlsPskIdentity pskIdentity)
|
|
{
|
|
DefaultTlsCipherFactory defaultTlsCipherFactory = new DefaultTlsCipherFactory();
|
|
DefaultTlsDHVerifier defaultTlsDHVerifier = new DefaultTlsDHVerifier();
|
|
base..ctor(defaultTlsCipherFactory);
|
|
this.mDHVerifier = defaultTlsDHVerifier;
|
|
this.mPskIdentity = pskIdentity;
|
|
}
|
|
|
|
// Token: 0x060091A4 RID: 37284 RVA: 0x00204ECC File Offset: 0x002030CC
|
|
[Token(Token = "0x60091A4")]
|
|
[Address(RVA = "0x1E89B40", Offset = "0x1E88540", VA = "0x181E89B40")]
|
|
public PskTlsClient(TlsCipherFactory cipherFactory, TlsPskIdentity pskIdentity)
|
|
{
|
|
DefaultTlsDHVerifier defaultTlsDHVerifier = new DefaultTlsDHVerifier();
|
|
base..ctor(cipherFactory);
|
|
this.mDHVerifier = defaultTlsDHVerifier;
|
|
this.mPskIdentity = pskIdentity;
|
|
}
|
|
|
|
// Token: 0x060091A5 RID: 37285 RVA: 0x00204EF4 File Offset: 0x002030F4
|
|
[Token(Token = "0x60091A5")]
|
|
[Address(RVA = "0x1E89BC0", Offset = "0x1E885C0", VA = "0x181E89BC0")]
|
|
public PskTlsClient(TlsCipherFactory cipherFactory, TlsDHVerifier dhVerifier, TlsPskIdentity pskIdentity)
|
|
: base(cipherFactory)
|
|
{
|
|
this.mPskIdentity = pskIdentity;
|
|
this.mDHVerifier = dhVerifier;
|
|
}
|
|
|
|
// Token: 0x060091A6 RID: 37286 RVA: 0x00204F18 File Offset: 0x00203118
|
|
[Token(Token = "0x60091A6")]
|
|
[Address(RVA = "0x1E89960", Offset = "0x1E88360", VA = "0x181E89960", Slot = "50")]
|
|
public override int[] GetCipherSuites()
|
|
{
|
|
int[] array = new int[2];
|
|
array[0] = (int)((ulong)49207L);
|
|
array[0] = (int)((ulong)49205L);
|
|
return array;
|
|
}
|
|
|
|
// Token: 0x060091A7 RID: 37287 RVA: 0x00204F50 File Offset: 0x00203150
|
|
[Token(Token = "0x60091A7")]
|
|
[Address(RVA = "0x1E899E0", Offset = "0x1E883E0", VA = "0x181E899E0", Slot = "57")]
|
|
public override TlsKeyExchange GetKeyExchange()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (060091A7)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsKeyExchange BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.PskTlsClient::GetKeyExchange()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_17:
|
|
stloc:int32[](var_2_1D, call:int32[](AbstractTlsClient::GetCipherSuites, ldloc:PskTlsClient[exp:AbstractTlsClient](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: 0x060091A8 RID: 37288 RVA: 0x0000220F File Offset: 0x0000040F
|
|
[Token(Token = "0x60091A8")]
|
|
[Address(RVA = "0x1E89910", Offset = "0x1E88310", VA = "0x181E89910", Slot = "58")]
|
|
public override TlsAuthentication GetAuthentication()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060091A9 RID: 37289 RVA: 0x00204F7C File Offset: 0x0020317C
|
|
[Token(Token = "0x60091A9")]
|
|
[Address(RVA = "0x1E89850", Offset = "0x1E88250", VA = "0x181E89850", Slot = "61")]
|
|
protected virtual TlsKeyExchange CreatePskKeyExchange(int keyExchange)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (060091A9)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsKeyExchange BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.PskTlsClient::CreatePskKeyExchange(System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:IList(var_0_06, ldfld:IList(AbstractTlsClient::mSupportedSignatureAlgorithms, ldloc:PskTlsClient[exp:AbstractTlsClient](this)))
|
|
stloc:TlsPskIdentity(var_1_0D, ldfld:TlsPskIdentity(PskTlsClient::mPskIdentity, ldloc:PskTlsClient(this)))
|
|
stloc:TlsDHVerifier(var_2_14, ldfld:TlsDHVerifier(PskTlsClient::mDHVerifier, ldloc:PskTlsClient(this)))
|
|
stloc:int32[](var_3_1B, ldfld:int32[](AbstractTlsClient::mNamedCurves, ldloc:PskTlsClient[exp:AbstractTlsClient](this)))
|
|
stloc:uint8[](var_4_22, ldfld:uint8[](AbstractTlsClient::mClientECPointFormats, ldloc:PskTlsClient[exp:AbstractTlsClient](this)))
|
|
stloc:uint8[](var_5_2A, ldfld:uint8[](AbstractTlsClient::mServerECPointFormats, ldloc:PskTlsClient[exp:AbstractTlsClient](this)))
|
|
stloc:TlsPskKeyExchange(var_6_3E, newobj:TlsPskKeyExchange(TlsPskKeyExchange::.ctor, ldloc:int32(keyExchange), ldloc:IList(var_0_06), ldloc:TlsPskIdentity(var_1_0D), ldloc:int32[exp:TlsPskIdentityManager](var_7), ldloc:TlsDHVerifier(var_2_14), ldloc:int32[exp:DHParameters](var_7), ldloc:int32[](var_3_1B), ldloc:uint8[](var_4_22), ldloc:uint8[](var_5_2A)))
|
|
stloc:int32(var_7, ldc.i4:int32(0))
|
|
}
|
|
|
|
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: 0x04006134 RID: 24884
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
|
[Token(Token = "0x4006134")]
|
|
protected TlsDHVerifier mDHVerifier;
|
|
|
|
// Token: 0x04006135 RID: 24885
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x58")]
|
|
[Token(Token = "0x4006135")]
|
|
protected TlsPskIdentity mPskIdentity;
|
|
}
|
|
}
|