oh dear
This commit is contained in:
@@ -0,0 +1,143 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Agreement;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls
|
||||
{
|
||||
// Token: 0x02001B49 RID: 6985
|
||||
[Token(Token = "0x2001B49")]
|
||||
public class PskTlsServer : AbstractTlsServer
|
||||
{
|
||||
// Token: 0x0600AD84 RID: 44420 RVA: 0x0025C5FC File Offset: 0x0025A7FC
|
||||
[Token(Token = "0x600AD84")]
|
||||
[Address(RVA = "0x18BD010", Offset = "0x18BBE10", VA = "0x1818BD010")]
|
||||
public PskTlsServer(TlsPskIdentityManager pskIdentityManager)
|
||||
{
|
||||
DefaultTlsCipherFactory defaultTlsCipherFactory = new DefaultTlsCipherFactory();
|
||||
base..ctor(defaultTlsCipherFactory);
|
||||
this.mPskIdentityManager = pskIdentityManager;
|
||||
}
|
||||
|
||||
// Token: 0x0600AD85 RID: 44421 RVA: 0x0025C620 File Offset: 0x0025A820
|
||||
[Token(Token = "0x600AD85")]
|
||||
[Address(RVA = "0x18BD080", Offset = "0x18BBE80", VA = "0x1818BD080")]
|
||||
public PskTlsServer(TlsCipherFactory cipherFactory, TlsPskIdentityManager pskIdentityManager)
|
||||
: base(cipherFactory)
|
||||
{
|
||||
this.mPskIdentityManager = pskIdentityManager;
|
||||
}
|
||||
|
||||
// Token: 0x0600AD86 RID: 44422 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x600AD86")]
|
||||
[Address(RVA = "0x18BCFC0", Offset = "0x18BBDC0", VA = "0x1818BCFC0", Slot = "63")]
|
||||
protected virtual TlsEncryptionCredentials GetRsaEncryptionCredentials()
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x0600AD87 RID: 44423 RVA: 0x0025C63C File Offset: 0x0025A83C
|
||||
[Token(Token = "0x600AD87")]
|
||||
[Address(RVA = "0x18BCEB0", Offset = "0x18BBCB0", VA = "0x1818BCEB0", Slot = "64")]
|
||||
protected virtual DHParameters GetDHParameters()
|
||||
{
|
||||
return DHStandardGroups.rfc7919_ffdhe2048;
|
||||
}
|
||||
|
||||
// Token: 0x0600AD88 RID: 44424 RVA: 0x0025C650 File Offset: 0x0025A850
|
||||
[Token(Token = "0x600AD88")]
|
||||
[Address(RVA = "0x18BCDA0", Offset = "0x18BBBA0", VA = "0x1818BCDA0", Slot = "41")]
|
||||
protected override int[] GetCipherSuites()
|
||||
{
|
||||
int[] array = new int[4];
|
||||
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.00A4ED0900CBF010B3628AA473D0D1477DB67FFF).FieldHandle);
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600AD89 RID: 44425 RVA: 0x0025C670 File Offset: 0x0025A870
|
||||
[Token(Token = "0x600AD89")]
|
||||
[Address(RVA = "0x18BCDF0", Offset = "0x18BBBF0", VA = "0x1818BCDF0", Slot = "56")]
|
||||
public override TlsCredentials GetCredentials()
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
int mSelectedCipherSuite = this.mSelectedCipherSuite;
|
||||
int keyExchangeAlgorithm = TlsUtilities.GetKeyExchangeAlgorithm(mSelectedCipherSuite);
|
||||
if (mSelectedCipherSuite <= 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (keyExchangeAlgorithm == 15)
|
||||
{
|
||||
TlsCompression compression = base.GetCompression();
|
||||
}
|
||||
if (keyExchangeAlgorithm == 24)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600AD8A RID: 44426 RVA: 0x0025C6A4 File Offset: 0x0025A8A4
|
||||
[Token(Token = "0x600AD8A")]
|
||||
[Address(RVA = "0x18BCF10", Offset = "0x18BBD10", VA = "0x1818BCF10", Slot = "58")]
|
||||
public override TlsKeyExchange GetKeyExchange()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600AD8A)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsKeyExchange BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.PskTlsServer::GetKeyExchange()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_17:
|
||||
stloc:TlsCompression(var_2_1D, call:TlsCompression(AbstractTlsPeer::GetCompression, ldloc:PskTlsServer[exp:AbstractTlsPeer](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: 0x0600AD8B RID: 44427 RVA: 0x0025C6D0 File Offset: 0x0025A8D0
|
||||
[Token(Token = "0x600AD8B")]
|
||||
[Address(RVA = "0x18BCCD0", Offset = "0x18BBAD0", VA = "0x1818BCCD0", Slot = "65")]
|
||||
protected virtual TlsKeyExchange CreatePskKeyExchange(int keyExchange)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600AD8B)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsKeyExchange BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.PskTlsServer::CreatePskKeyExchange(System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:TlsPskIdentityManager(var_0_06, ldfld:TlsPskIdentityManager(PskTlsServer::mPskIdentityManager, ldloc:PskTlsServer(this)))
|
||||
stloc:TlsEncryptionCredentials(var_1_0D, callvirt:TlsEncryptionCredentials(PskTlsServer::GetRsaEncryptionCredentials, ldloc:PskTlsServer(this)))
|
||||
stloc:int32[](var_2_14, ldfld:int32[](AbstractTlsServer::mNamedCurves, ldloc:PskTlsServer[exp:AbstractTlsServer](this)))
|
||||
stloc:uint8[](var_3_1B, ldfld:uint8[](AbstractTlsServer::mClientECPointFormats, ldloc:PskTlsServer[exp:AbstractTlsServer](this)))
|
||||
stloc:uint8[](var_4_22, ldfld:uint8[](AbstractTlsServer::mServerECPointFormats, ldloc:PskTlsServer[exp:AbstractTlsServer](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: 0x04006F79 RID: 28537
|
||||
[FieldOffset(Offset = "0x88")]
|
||||
[Token(Token = "0x4006F79")]
|
||||
protected TlsPskIdentityManager mPskIdentityManager;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user