169 lines
9.9 KiB
C#
169 lines
9.9 KiB
C#
using System;
|
|
using System.Collections;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls
|
|
{
|
|
// Token: 0x02001C39 RID: 7225
|
|
[Token(Token = "0x2001C39")]
|
|
public class SrpTlsClient : AbstractTlsClient
|
|
{
|
|
// Token: 0x0600B1C2 RID: 45506 RVA: 0x002669B4 File Offset: 0x00264BB4
|
|
[Token(Token = "0x600B1C2")]
|
|
[Address(RVA = "0x4996B0", Offset = "0x4986B0", VA = "0x1804996B0")]
|
|
public SrpTlsClient(byte[] identity, byte[] password)
|
|
{
|
|
DefaultTlsCipherFactory defaultTlsCipherFactory = new DefaultTlsCipherFactory();
|
|
DefaultTlsSrpGroupVerifier defaultTlsSrpGroupVerifier = new DefaultTlsSrpGroupVerifier();
|
|
}
|
|
|
|
// Token: 0x0600B1C3 RID: 45507 RVA: 0x002669D0 File Offset: 0x00264BD0
|
|
[Token(Token = "0x600B1C3")]
|
|
[Address(RVA = "0x499760", Offset = "0x498760", VA = "0x180499760")]
|
|
public SrpTlsClient(TlsCipherFactory cipherFactory, byte[] identity, byte[] password)
|
|
{
|
|
DefaultTlsSrpGroupVerifier defaultTlsSrpGroupVerifier = new DefaultTlsSrpGroupVerifier();
|
|
}
|
|
|
|
// Token: 0x0600B1C4 RID: 45508 RVA: 0x002669E4 File Offset: 0x00264BE4
|
|
[Token(Token = "0x600B1C4")]
|
|
[Address(RVA = "0x499610", Offset = "0x498610", VA = "0x180499610")]
|
|
public SrpTlsClient(TlsCipherFactory cipherFactory, TlsSrpGroupVerifier groupVerifier, byte[] identity, byte[] password)
|
|
: base(cipherFactory)
|
|
{
|
|
this.mGroupVerifier = groupVerifier;
|
|
byte[] array = Arrays.Clone(identity);
|
|
this.mIdentity = array;
|
|
byte[] array2;
|
|
this.mPassword = array2;
|
|
}
|
|
|
|
// Token: 0x17001C35 RID: 7221
|
|
// (get) Token: 0x0600B1C5 RID: 45509 RVA: 0x00266A14 File Offset: 0x00264C14
|
|
[Token(Token = "0x17001C35")]
|
|
protected virtual bool RequireSrpServerExtension
|
|
{
|
|
[Token(Token = "0x600B1C5")]
|
|
[Address(RVA = "0x424690", Offset = "0x423690", VA = "0x180424690", Slot = "61")]
|
|
get
|
|
{
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600B1C6 RID: 45510 RVA: 0x00266A24 File Offset: 0x00264C24
|
|
[Token(Token = "0x600B1C6")]
|
|
[Address(RVA = "0x4993C0", Offset = "0x4983C0", VA = "0x1804993C0", Slot = "50")]
|
|
public override int[] GetCipherSuites()
|
|
{
|
|
return new int[] { (int)((ulong)49182L) };
|
|
}
|
|
|
|
// Token: 0x0600B1C7 RID: 45511 RVA: 0x00266A50 File Offset: 0x00264C50
|
|
[Token(Token = "0x600B1C7")]
|
|
[Address(RVA = "0x499420", Offset = "0x498420", VA = "0x180499420", Slot = "47")]
|
|
public override IDictionary GetClientExtensions()
|
|
{
|
|
IDictionary clientExtensions = base.GetClientExtensions();
|
|
if (clientExtensions == 0)
|
|
{
|
|
IDictionary dictionary = Platform.CreateHashtable();
|
|
}
|
|
byte[] array = this.mIdentity;
|
|
TlsSrpUtilities.AddSrpExtension(clientExtensions, array);
|
|
return clientExtensions;
|
|
}
|
|
|
|
// Token: 0x0600B1C8 RID: 45512 RVA: 0x00266A80 File Offset: 0x00264C80
|
|
[Token(Token = "0x600B1C8")]
|
|
[Address(RVA = "0x499550", Offset = "0x498550", VA = "0x180499550", Slot = "55")]
|
|
public override void ProcessServerExtensions(IDictionary serverExtensions)
|
|
{
|
|
bool flag;
|
|
if (!flag)
|
|
{
|
|
}
|
|
base.ProcessServerExtensions(serverExtensions);
|
|
}
|
|
|
|
// Token: 0x0600B1C9 RID: 45513 RVA: 0x00266A98 File Offset: 0x00264C98
|
|
[Token(Token = "0x600B1C9")]
|
|
[Address(RVA = "0x4994A0", Offset = "0x4984A0", VA = "0x1804994A0", Slot = "57")]
|
|
public override TlsKeyExchange GetKeyExchange()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B1C9)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsKeyExchange BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.SrpTlsClient::GetKeyExchange()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:int32[](var_2_18, call:int32[](AbstractTlsClient::GetCipherSuites, ldloc:SrpTlsClient[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: 0x0600B1CA RID: 45514 RVA: 0x0000220F File Offset: 0x0000040F
|
|
[Token(Token = "0x600B1CA")]
|
|
[Address(RVA = "0x499370", Offset = "0x498370", VA = "0x180499370", Slot = "58")]
|
|
public override TlsAuthentication GetAuthentication()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x0600B1CB RID: 45515 RVA: 0x00266AC0 File Offset: 0x00264CC0
|
|
[Token(Token = "0x600B1CB")]
|
|
[Address(RVA = "0x4992D0", Offset = "0x4982D0", VA = "0x1804992D0", Slot = "62")]
|
|
protected virtual TlsKeyExchange CreateSrpKeyExchange(int keyExchange)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B1CB)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsKeyExchange BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.SrpTlsClient::CreateSrpKeyExchange(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:SrpTlsClient[exp:AbstractTlsClient](this)))
|
|
stloc:TlsSrpGroupVerifier(var_1_0D, ldfld:TlsSrpGroupVerifier(SrpTlsClient::mGroupVerifier, ldloc:SrpTlsClient(this)))
|
|
stloc:uint8[](var_2_14, ldfld:uint8[](SrpTlsClient::mIdentity, ldloc:SrpTlsClient(this)))
|
|
stloc:uint8[](var_3_1B, ldfld:uint8[](SrpTlsClient::mPassword, ldloc:SrpTlsClient(this)))
|
|
stloc:TlsSrpKeyExchange(var_4_26, newobj:TlsSrpKeyExchange(TlsSrpKeyExchange::.ctor, ldloc:int32(keyExchange), ldloc:IList(var_0_06), ldloc:TlsSrpGroupVerifier(var_1_0D), ldloc:uint8[](var_2_14), ldloc:uint8[](var_3_1B)))
|
|
}
|
|
|
|
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: 0x04007181 RID: 29057
|
|
[FieldOffset(Offset = "0x50")]
|
|
[Token(Token = "0x4007181")]
|
|
protected TlsSrpGroupVerifier mGroupVerifier;
|
|
|
|
// Token: 0x04007182 RID: 29058
|
|
[FieldOffset(Offset = "0x58")]
|
|
[Token(Token = "0x4007182")]
|
|
protected byte[] mIdentity;
|
|
|
|
// Token: 0x04007183 RID: 29059
|
|
[FieldOffset(Offset = "0x60")]
|
|
[Token(Token = "0x4007183")]
|
|
protected byte[] mPassword;
|
|
}
|
|
}
|