132 lines
9.1 KiB
C#
132 lines
9.1 KiB
C#
using System;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls
|
|
{
|
|
// Token: 0x02001B48 RID: 6984
|
|
[Token(Token = "0x2001B48")]
|
|
public class PskTlsClient : AbstractTlsClient
|
|
{
|
|
// Token: 0x0600AD7D RID: 44413 RVA: 0x0025C4CC File Offset: 0x0025A6CC
|
|
[Token(Token = "0x600AD7D")]
|
|
[Address(RVA = "0x18BCB60", Offset = "0x18BB960", VA = "0x1818BCB60")]
|
|
public PskTlsClient(TlsPskIdentity pskIdentity)
|
|
{
|
|
DefaultTlsCipherFactory defaultTlsCipherFactory = new DefaultTlsCipherFactory();
|
|
DefaultTlsDHVerifier defaultTlsDHVerifier = new DefaultTlsDHVerifier();
|
|
base..ctor(defaultTlsCipherFactory);
|
|
this.mDHVerifier = defaultTlsDHVerifier;
|
|
this.mPskIdentity = pskIdentity;
|
|
}
|
|
|
|
// Token: 0x0600AD7E RID: 44414 RVA: 0x0025C4FC File Offset: 0x0025A6FC
|
|
[Token(Token = "0x600AD7E")]
|
|
[Address(RVA = "0x18BCC10", Offset = "0x18BBA10", VA = "0x1818BCC10")]
|
|
public PskTlsClient(TlsCipherFactory cipherFactory, TlsPskIdentity pskIdentity)
|
|
{
|
|
DefaultTlsDHVerifier defaultTlsDHVerifier = new DefaultTlsDHVerifier();
|
|
base..ctor(cipherFactory);
|
|
this.mDHVerifier = defaultTlsDHVerifier;
|
|
this.mPskIdentity = pskIdentity;
|
|
}
|
|
|
|
// Token: 0x0600AD7F RID: 44415 RVA: 0x0025C524 File Offset: 0x0025A724
|
|
[Token(Token = "0x600AD7F")]
|
|
[Address(RVA = "0x18BCC90", Offset = "0x18BBA90", VA = "0x1818BCC90")]
|
|
public PskTlsClient(TlsCipherFactory cipherFactory, TlsDHVerifier dhVerifier, TlsPskIdentity pskIdentity)
|
|
: base(cipherFactory)
|
|
{
|
|
this.mPskIdentity = pskIdentity;
|
|
this.mDHVerifier = dhVerifier;
|
|
}
|
|
|
|
// Token: 0x0600AD80 RID: 44416 RVA: 0x0025C548 File Offset: 0x0025A748
|
|
[Token(Token = "0x600AD80")]
|
|
[Address(RVA = "0x18BCA30", Offset = "0x18BB830", VA = "0x1818BCA30", Slot = "50")]
|
|
public override int[] GetCipherSuites()
|
|
{
|
|
int[] array = new int[2];
|
|
array[0] = (int)((ulong)49207L);
|
|
array[0] = (int)((ulong)49205L);
|
|
return array;
|
|
}
|
|
|
|
// Token: 0x0600AD81 RID: 44417 RVA: 0x0025C580 File Offset: 0x0025A780
|
|
[Token(Token = "0x600AD81")]
|
|
[Address(RVA = "0x18BCAB0", Offset = "0x18BB8B0", VA = "0x1818BCAB0", Slot = "57")]
|
|
public override TlsKeyExchange GetKeyExchange()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600AD81)
|
|
|
|
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: 0x0600AD82 RID: 44418 RVA: 0x0000220F File Offset: 0x0000040F
|
|
[Token(Token = "0x600AD82")]
|
|
[Address(RVA = "0x18BC9E0", Offset = "0x18BB7E0", VA = "0x1818BC9E0", Slot = "58")]
|
|
public override TlsAuthentication GetAuthentication()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x0600AD83 RID: 44419 RVA: 0x0025C5AC File Offset: 0x0025A7AC
|
|
[Token(Token = "0x600AD83")]
|
|
[Address(RVA = "0x18BC920", Offset = "0x18BB720", VA = "0x1818BC920", Slot = "61")]
|
|
protected virtual TlsKeyExchange CreatePskKeyExchange(int keyExchange)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600AD83)
|
|
|
|
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: 0x04006F77 RID: 28535
|
|
[FieldOffset(Offset = "0x50")]
|
|
[Token(Token = "0x4006F77")]
|
|
protected TlsDHVerifier mDHVerifier;
|
|
|
|
// Token: 0x04006F78 RID: 28536
|
|
[FieldOffset(Offset = "0x58")]
|
|
[Token(Token = "0x4006F78")]
|
|
protected TlsPskIdentity mPskIdentity;
|
|
}
|
|
}
|