422 lines
24 KiB
C#
422 lines
24 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Security;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls
|
|
{
|
|
// Token: 0x02001B68 RID: 7016
|
|
[Token(Token = "0x2001B68")]
|
|
public class TlsClientProtocol : TlsProtocol
|
|
{
|
|
// Token: 0x0600AE43 RID: 44611 RVA: 0x0025E53C File Offset: 0x0025C73C
|
|
[Token(Token = "0x600AE43")]
|
|
[Address(RVA = "0x1981550", Offset = "0x1980350", VA = "0x181981550")]
|
|
public TlsClientProtocol(Stream stream, SecureRandom secureRandom)
|
|
: base(stream, stream, secureRandom)
|
|
{
|
|
}
|
|
|
|
// Token: 0x0600AE44 RID: 44612 RVA: 0x0025E554 File Offset: 0x0025C754
|
|
[Token(Token = "0x600AE44")]
|
|
[Address(RVA = "0x1981540", Offset = "0x1980340", VA = "0x181981540")]
|
|
public TlsClientProtocol(Stream input, Stream output, SecureRandom secureRandom)
|
|
: base(input, output, secureRandom)
|
|
{
|
|
}
|
|
|
|
// Token: 0x0600AE45 RID: 44613 RVA: 0x0025E56C File Offset: 0x0025C76C
|
|
[Token(Token = "0x600AE45")]
|
|
[Address(RVA = "0x19813E0", Offset = "0x19801E0", VA = "0x1819813E0")]
|
|
public TlsClientProtocol(SecureRandom secureRandom)
|
|
{
|
|
int num;
|
|
ByteQueue byteQueue = new ByteQueue(num);
|
|
num = 0;
|
|
this.mApplicationDataQueue = byteQueue;
|
|
ByteQueue byteQueue2 = new ByteQueue(2);
|
|
this.mAlertQueue = byteQueue2;
|
|
int num2;
|
|
ByteQueue byteQueue3 = new ByteQueue(num2);
|
|
num2 = 0;
|
|
this.mHandshakeQueue = byteQueue3;
|
|
base..ctor();
|
|
ByteQueueStream byteQueueStream = new ByteQueueStream();
|
|
this.mInputBuffers = byteQueueStream;
|
|
ByteQueueStream byteQueueStream2 = new ByteQueueStream();
|
|
ByteQueueStream mInputBuffers = this.mInputBuffers;
|
|
this.mOutputBuffer = byteQueueStream2;
|
|
RecordStream recordStream = new RecordStream(this, mInputBuffers, byteQueueStream2);
|
|
this.mRecordStream = recordStream;
|
|
this.mSecureRandom = secureRandom;
|
|
}
|
|
|
|
// Token: 0x0600AE46 RID: 44614 RVA: 0x0025E5F0 File Offset: 0x0025C7F0
|
|
[Token(Token = "0x600AE46")]
|
|
[Address(RVA = "0x197E470", Offset = "0x197D270", VA = "0x18197E470", Slot = "49")]
|
|
public virtual void Connect(TlsClient tlsClient)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600AE46)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsClientProtocol::Connect(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsClient)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_10F:
|
|
stloc:InvalidOperationException(var_18_119, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("'Connect' can only be called once")))
|
|
}
|
|
|
|
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 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x0600AE47 RID: 44615 RVA: 0x0025E718 File Offset: 0x0025C918
|
|
[Token(Token = "0x600AE47")]
|
|
[Address(RVA = "0x197E390", Offset = "0x197D190", VA = "0x18197E390", Slot = "16")]
|
|
protected override void CleanupHandshake()
|
|
{
|
|
byte[] mExpectedVerifyData = this.mExpectedVerifyData;
|
|
int num = 0;
|
|
if (mExpectedVerifyData != 0)
|
|
{
|
|
int num2 = 0;
|
|
Arrays.Fill(mExpectedVerifyData, (byte)num2);
|
|
this.mExpectedVerifyData = num;
|
|
}
|
|
string text = this.mSecurityParameters.ToString();
|
|
this.mPeerCertificate = num;
|
|
this.mOfferedCipherSuites = num;
|
|
this.mOfferedCompressionMethods = num;
|
|
this.mClientExtensions = num;
|
|
this.mServerExtensions = num;
|
|
this.mResumedSession = num != 0;
|
|
this.mExpectSessionTicket = num != 0;
|
|
this.mSelectedSessionID = num;
|
|
this.mKeyExchange = num;
|
|
this.mAuthentication = num;
|
|
this.mCertificateStatus = num;
|
|
this.mCertificateRequest = num;
|
|
}
|
|
|
|
// Token: 0x17001BA3 RID: 7075
|
|
// (get) Token: 0x0600AE48 RID: 44616 RVA: 0x0025E7A8 File Offset: 0x0025C9A8
|
|
[Token(Token = "0x17001BA3")]
|
|
protected override TlsContext Context
|
|
{
|
|
[Token(Token = "0x600AE48")]
|
|
[Address(RVA = "0x536410", Offset = "0x535210", VA = "0x180536410", Slot = "4")]
|
|
get
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600AE48)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsContext BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsClientProtocol::get_Context()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:TlsClientContextImpl(var_0_06, ldfld:TlsClientContextImpl(TlsClientProtocol::mTlsClientContext, ldloc:TlsClientProtocol(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 1660
|
|
*/;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001BA4 RID: 7076
|
|
// (get) Token: 0x0600AE49 RID: 44617 RVA: 0x0025E7BC File Offset: 0x0025C9BC
|
|
[Token(Token = "0x17001BA4")]
|
|
internal override AbstractTlsContext ContextAdmin
|
|
{
|
|
[Token(Token = "0x600AE49")]
|
|
[Address(RVA = "0x536410", Offset = "0x535210", VA = "0x180536410", Slot = "5")]
|
|
get
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600AE49)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.AbstractTlsContext BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsClientProtocol::get_ContextAdmin()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:TlsClientContextImpl(var_0_06, ldfld:TlsClientContextImpl(TlsClientProtocol::mTlsClientContext, ldloc:TlsClientProtocol(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 1660
|
|
*/;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001BA5 RID: 7077
|
|
// (get) Token: 0x0600AE4A RID: 44618 RVA: 0x0025E7D0 File Offset: 0x0025C9D0
|
|
[Token(Token = "0x17001BA5")]
|
|
protected override TlsPeer Peer
|
|
{
|
|
[Token(Token = "0x600AE4A")]
|
|
[Address(RVA = "0x536430", Offset = "0x535230", VA = "0x180536430", Slot = "6")]
|
|
get
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600AE4A)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsPeer BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsClientProtocol::get_Peer()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:TlsClient(var_0_06, ldfld:TlsClient(TlsClientProtocol::mTlsClient, ldloc:TlsClientProtocol(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 1660
|
|
*/;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600AE4B RID: 44619 RVA: 0x0025E7E4 File Offset: 0x0025C9E4
|
|
[Token(Token = "0x600AE4B")]
|
|
[Address(RVA = "0x197E7F0", Offset = "0x197D5F0", VA = "0x18197E7F0", Slot = "13")]
|
|
protected override void HandleHandshakeMessage(byte type, MemoryStream buf)
|
|
{
|
|
TlsProtocol.AssertEmpty(buf);
|
|
this.ReceiveNewSessionTicketMessage(buf);
|
|
RecordStream mRecordStream = this.mRecordStream;
|
|
uint num;
|
|
this.mConnectionState = (short)num;
|
|
mRecordStream.NotifyHelloComplete();
|
|
byte[] array = this.mSelectedSessionID;
|
|
if (array.Length != 0)
|
|
{
|
|
int num2;
|
|
TlsSessionImpl tlsSessionImpl = new TlsSessionImpl(array, num2);
|
|
num2 = 0;
|
|
this.mTlsSession = tlsSessionImpl;
|
|
SessionParameters mSessionParameters = this.mSessionParameters;
|
|
SecurityParameters mSecurityParameters = this.mSecurityParameters;
|
|
byte[] array2 = Arrays.Clone(mSessionParameters.mMasterSecret);
|
|
mSecurityParameters.masterSecret = array2;
|
|
RecordStream mRecordStream2 = this.mRecordStream;
|
|
AbstractTlsContext contextAdmin = this.ContextAdmin;
|
|
AbstractTlsContext contextAdmin2 = this.ContextAdmin;
|
|
uint num3;
|
|
this.mConnectionState = (short)num3;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600AE4C RID: 44620 RVA: 0x0025EC98 File Offset: 0x0025CE98
|
|
[Token(Token = "0x600AE4C")]
|
|
[Address(RVA = "0x197F980", Offset = "0x197E780", VA = "0x18197F980", Slot = "50")]
|
|
protected virtual void HandleSupplementalData(IList serverSupplementalData)
|
|
{
|
|
TlsClient tlsClient = this.mTlsClient;
|
|
TlsClient tlsClient2 = this.mTlsClient;
|
|
this.mConnectionState = (short)((uint)3);
|
|
this.mKeyExchange = (uint)3;
|
|
string text = this.ToString();
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600AE4D RID: 44621 RVA: 0x0025ECD0 File Offset: 0x0025CED0
|
|
[Token(Token = "0x600AE4D")]
|
|
[Address(RVA = "0x197FA40", Offset = "0x197E840", VA = "0x18197FA40", Slot = "51")]
|
|
protected virtual void ReceiveNewSessionTicketMessage(MemoryStream buf)
|
|
{
|
|
NewSessionTicket newSessionTicket = NewSessionTicket.Parse(buf);
|
|
TlsProtocol.AssertEmpty(buf);
|
|
TlsClient tlsClient = this.mTlsClient;
|
|
int num = 0;
|
|
num += num;
|
|
num++;
|
|
List<string> hostNames = tlsClient.HostNames;
|
|
}
|
|
|
|
// Token: 0x0600AE4E RID: 44622 RVA: 0x0025ED0C File Offset: 0x0025CF0C
|
|
[Token(Token = "0x600AE4E")]
|
|
[Address(RVA = "0x197FB30", Offset = "0x197E930", VA = "0x18197FB30", Slot = "52")]
|
|
protected virtual void ReceiveServerHelloMessage(MemoryStream buf)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600AE4E)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsClientProtocol::ReceiveServerHelloMessage(System.IO.MemoryStream)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_437:
|
|
stloc:TlsFatalAlert(var_77_43E, newobj:TlsFatalAlert(TlsFatalAlert::.ctor, ldloc:uint64[exp:uint8](var_78)))
|
|
}
|
|
|
|
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 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x0600AE4F RID: 44623 RVA: 0x0025F158 File Offset: 0x0025D358
|
|
[Token(Token = "0x600AE4F")]
|
|
[Address(RVA = "0x1980C60", Offset = "0x197FA60", VA = "0x181980C60", Slot = "53")]
|
|
protected virtual void SendCertificateVerifyMessage(DigitallySigned certificateVerify)
|
|
{
|
|
byte[] signature = certificateVerify.Signature;
|
|
TlsProtocol.HandshakeMessage handshakeMessage;
|
|
handshakeMessage.WriteToRecordStream(this);
|
|
}
|
|
|
|
// Token: 0x0600AE50 RID: 44624 RVA: 0x0025F17C File Offset: 0x0025D37C
|
|
[Token(Token = "0x600AE50")]
|
|
[Address(RVA = "0x1980D00", Offset = "0x197FB00", VA = "0x181980D00", Slot = "54")]
|
|
protected virtual void SendClientHelloMessage()
|
|
{
|
|
bool flag;
|
|
do
|
|
{
|
|
TlsClient tlsClient = this.mTlsClient;
|
|
RecordStream mRecordStream = this.mRecordStream;
|
|
TlsClient tlsClient2 = this.mTlsClient;
|
|
}
|
|
while (flag);
|
|
TlsContext context = this.Context;
|
|
TlsSession mTlsSession = this.mTlsSession;
|
|
byte[] emptyBytes = TlsUtilities.EmptyBytes;
|
|
if (mTlsSession != 0)
|
|
{
|
|
}
|
|
TlsClient tlsClient3 = this.mTlsClient;
|
|
TlsClient tlsClient4 = this.mTlsClient;
|
|
TlsClient tlsClient5 = this.mTlsClient;
|
|
byte[] emptyBytes2;
|
|
if (emptyBytes.Length != 0)
|
|
{
|
|
SessionParameters mSessionParameters = this.mSessionParameters;
|
|
if (mSessionParameters != 0)
|
|
{
|
|
if (mSessionParameters.mExtendedMasterSecret)
|
|
{
|
|
int[] mOfferedCipherSuites = this.mOfferedCipherSuites;
|
|
int mCipherSuite = mSessionParameters.mCipherSuite;
|
|
if (Arrays.Contains(mOfferedCipherSuites, mCipherSuite))
|
|
{
|
|
SessionParameters mSessionParameters2 = this.mSessionParameters;
|
|
byte[] mOfferedCompressionMethods = this.mOfferedCompressionMethods;
|
|
byte mCompressionAlgorithm = mSessionParameters2.mCompressionAlgorithm;
|
|
if (Arrays.Contains(mOfferedCompressionMethods, mCompressionAlgorithm))
|
|
{
|
|
goto IL_B7;
|
|
}
|
|
}
|
|
}
|
|
emptyBytes2 = TlsUtilities.EmptyBytes;
|
|
}
|
|
}
|
|
IL_B7:
|
|
TlsClient tlsClient6 = this.mTlsClient;
|
|
IDictionary dictionary = Platform.CreateHashtable();
|
|
this.mClientExtensions = dictionary;
|
|
bool flag2;
|
|
if (!flag2)
|
|
{
|
|
IDictionary mClientExtensions = this.mClientExtensions;
|
|
byte[] emptyBytes3 = TlsUtilities.EmptyBytes;
|
|
}
|
|
byte[] masterSecret = this.mSecurityParameters.MasterSecret;
|
|
TlsProtocol.HandshakeMessage handshakeMessage;
|
|
int num = handshakeMessage.ReadByte();
|
|
TlsUtilities.WriteOpaque8(emptyBytes2, handshakeMessage);
|
|
byte[] extensionData = TlsUtilities.GetExtensionData(this.mClientExtensions, 65281);
|
|
bool flag3 = !Arrays.Contains(this.mOfferedCipherSuites, 255);
|
|
if (extensionData == 0 != flag3)
|
|
{
|
|
int[] array = Arrays.Append(this.mOfferedCipherSuites, 255);
|
|
this.mOfferedCipherSuites = array;
|
|
}
|
|
if (!Arrays.Contains(this.mOfferedCipherSuites, 22016))
|
|
{
|
|
int[] array2 = Arrays.Append(this.mOfferedCipherSuites, 22016);
|
|
this.mOfferedCipherSuites = array2;
|
|
}
|
|
TlsUtilities.WriteUint16ArrayWithUint16Length(this.mOfferedCipherSuites, handshakeMessage);
|
|
TlsUtilities.WriteUint8ArrayWithUint8Length(this.mOfferedCompressionMethods, handshakeMessage);
|
|
IDictionary mClientExtensions2 = this.mClientExtensions;
|
|
TlsProtocol.WriteExtensions(handshakeMessage, mClientExtensions2);
|
|
handshakeMessage.WriteToRecordStream(this);
|
|
}
|
|
|
|
// Token: 0x0600AE51 RID: 44625 RVA: 0x0025F340 File Offset: 0x0025D540
|
|
[Token(Token = "0x600AE51")]
|
|
[Address(RVA = "0x1981350", Offset = "0x1980150", VA = "0x181981350", Slot = "55")]
|
|
protected virtual void SendClientKeyExchangeMessage()
|
|
{
|
|
TlsKeyExchange tlsKeyExchange = this.mKeyExchange;
|
|
TlsProtocol.HandshakeMessage handshakeMessage;
|
|
handshakeMessage.WriteToRecordStream(this);
|
|
}
|
|
|
|
// Token: 0x04006FF1 RID: 28657
|
|
[FieldOffset(Offset = "0xA8")]
|
|
[Token(Token = "0x4006FF1")]
|
|
protected TlsClient mTlsClient;
|
|
|
|
// Token: 0x04006FF2 RID: 28658
|
|
[FieldOffset(Offset = "0xB0")]
|
|
[Token(Token = "0x4006FF2")]
|
|
internal TlsClientContextImpl mTlsClientContext;
|
|
|
|
// Token: 0x04006FF3 RID: 28659
|
|
[FieldOffset(Offset = "0xB8")]
|
|
[Token(Token = "0x4006FF3")]
|
|
protected byte[] mSelectedSessionID;
|
|
|
|
// Token: 0x04006FF4 RID: 28660
|
|
[FieldOffset(Offset = "0xC0")]
|
|
[Token(Token = "0x4006FF4")]
|
|
protected TlsKeyExchange mKeyExchange;
|
|
|
|
// Token: 0x04006FF5 RID: 28661
|
|
[FieldOffset(Offset = "0xC8")]
|
|
[Token(Token = "0x4006FF5")]
|
|
protected TlsAuthentication mAuthentication;
|
|
|
|
// Token: 0x04006FF6 RID: 28662
|
|
[FieldOffset(Offset = "0xD0")]
|
|
[Token(Token = "0x4006FF6")]
|
|
protected CertificateStatus mCertificateStatus;
|
|
|
|
// Token: 0x04006FF7 RID: 28663
|
|
[FieldOffset(Offset = "0xD8")]
|
|
[Token(Token = "0x4006FF7")]
|
|
protected CertificateRequest mCertificateRequest;
|
|
}
|
|
}
|