using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Agreement; using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls { // Token: 0x0200156C RID: 5484 [Token(Token = "0x200156C")] [StructLayout(3)] public class PskTlsServer : AbstractTlsServer { // Token: 0x060091AA RID: 37290 RVA: 0x00204FCC File Offset: 0x002031CC [Token(Token = "0x60091AA")] [Address(RVA = "0x1E89F40", Offset = "0x1E88940", VA = "0x181E89F40")] public PskTlsServer(TlsPskIdentityManager pskIdentityManager) { DefaultTlsCipherFactory defaultTlsCipherFactory = new DefaultTlsCipherFactory(); base..ctor(defaultTlsCipherFactory); this.mPskIdentityManager = pskIdentityManager; } // Token: 0x060091AB RID: 37291 RVA: 0x00204FF0 File Offset: 0x002031F0 [Token(Token = "0x60091AB")] [Address(RVA = "0x1E89FB0", Offset = "0x1E889B0", VA = "0x181E89FB0")] public PskTlsServer(TlsCipherFactory cipherFactory, TlsPskIdentityManager pskIdentityManager) : base(cipherFactory) { this.mPskIdentityManager = pskIdentityManager; } // Token: 0x060091AC RID: 37292 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x60091AC")] [Address(RVA = "0x1E89EF0", Offset = "0x1E888F0", VA = "0x181E89EF0", Slot = "63")] protected virtual TlsEncryptionCredentials GetRsaEncryptionCredentials() { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } // Token: 0x060091AD RID: 37293 RVA: 0x0020500C File Offset: 0x0020320C [Token(Token = "0x60091AD")] [Address(RVA = "0x1E89DE0", Offset = "0x1E887E0", VA = "0x181E89DE0", Slot = "64")] protected virtual DHParameters GetDHParameters() { return DHStandardGroups.rfc7919_ffdhe2048; } // Token: 0x060091AE RID: 37294 RVA: 0x00205020 File Offset: 0x00203220 [Token(Token = "0x60091AE")] [Address(RVA = "0x1E89CD0", Offset = "0x1E886D0", VA = "0x181E89CD0", Slot = "41")] protected override int[] GetCipherSuites() { int[] array = new int[4]; RuntimeHelpers.InitializeArray(array, fieldof(.00A4ED0900CBF010B3628AA473D0D1477DB67FFF).FieldHandle); return array; } // Token: 0x060091AF RID: 37295 RVA: 0x00205040 File Offset: 0x00203240 [Token(Token = "0x60091AF")] [Address(RVA = "0x1E89D20", Offset = "0x1E88720", VA = "0x181E89D20", 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: 0x060091B0 RID: 37296 RVA: 0x00205074 File Offset: 0x00203274 [Token(Token = "0x60091B0")] [Address(RVA = "0x1E89E40", Offset = "0x1E88840", VA = "0x181E89E40", Slot = "58")] public override TlsKeyExchange GetKeyExchange() { /* An exception occurred when decompiling this method (060091B0) 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: 0x060091B1 RID: 37297 RVA: 0x002050A0 File Offset: 0x002032A0 [Token(Token = "0x60091B1")] [Address(RVA = "0x1E89C00", Offset = "0x1E88600", VA = "0x181E89C00", Slot = "65")] protected virtual TlsKeyExchange CreatePskKeyExchange(int keyExchange) { /* An exception occurred when decompiling this method (060091B1) 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: 0x04006136 RID: 24886 [global::Cpp2IlInjected.FieldOffset(Offset = "0x88")] [Token(Token = "0x4006136")] protected TlsPskIdentityManager mPskIdentityManager; } }