terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
UnityTlsProvider.cs
Go to the documentation of this file.
1using System;
3using System.IO;
7using System.Text;
11using Mono.Util;
12
13namespace Mono.Unity
14{
15 // Token: 0x02000046 RID: 70
16 internal class UnityTlsProvider : Mono.Net.Security.MobileTlsProvider
17 {
18 // Token: 0x1700000D RID: 13
19 // (get) Token: 0x060000A5 RID: 165 RVA: 0x00003568 File Offset: 0x00001768
20 public override string Name
21 {
22 get
23 {
24 return "unitytls";
25 }
26 }
27
28 // Token: 0x1700000E RID: 14
29 // (get) Token: 0x060000A6 RID: 166 RVA: 0x0000357C File Offset: 0x0000177C
30 public override Guid ID
31 {
32 get
33 {
34 /*
35An exception occurred when decompiling this method (060000A6)
36
37ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Guid Mono.Unity.UnityTlsProvider::get_ID()
38
39 ---> System.Exception: Basic block has to end with unconditional control flow.
40{
41 IL_0000:
42 brtrue(IL_0000, ldc.i4:bool(1))
43}
44
45 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
46 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
47 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
48 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
49 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
50 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
51 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
52 --- End of inner exception stack trace ---
53 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
54 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 1683
55*/;
56 }
57 }
58
59 // Token: 0x1700000F RID: 15
60 // (get) Token: 0x060000A7 RID: 167 RVA: 0x0000358C File Offset: 0x0000178C
61 public override bool SupportsSslStream
62 {
63 get
64 {
65 return true;
66 }
67 }
68
69 // Token: 0x17000010 RID: 16
70 // (get) Token: 0x060000A8 RID: 168 RVA: 0x0000359C File Offset: 0x0000179C
71 public override bool SupportsMonoExtensions
72 {
73 get
74 {
75 return true;
76 }
77 }
78
79 // Token: 0x17000011 RID: 17
80 // (get) Token: 0x060000A9 RID: 169 RVA: 0x000035AC File Offset: 0x000017AC
81 public override bool SupportsConnectionInfo
82 {
83 get
84 {
85 return true;
86 }
87 }
88
89 // Token: 0x17000012 RID: 18
90 // (get) Token: 0x060000AA RID: 170 RVA: 0x000035BC File Offset: 0x000017BC
91 internal override bool SupportsCleanShutdown
92 {
93 get
94 {
95 return true;
96 }
97 }
98
99 // Token: 0x17000013 RID: 19
100 // (get) Token: 0x060000AB RID: 171 RVA: 0x000035CC File Offset: 0x000017CC
101 public override global::System.Security.Authentication.SslProtocols SupportedProtocols
102 {
103 get
104 {
105 return global::System.Security.Authentication.SslProtocols.Tls | global::System.Security.Authentication.SslProtocols.Tls11 | global::System.Security.Authentication.SslProtocols.Tls12;
106 }
107 }
108
109 // Token: 0x060000AC RID: 172 RVA: 0x00002050 File Offset: 0x00000250
110 internal override Mono.Net.Security.MobileAuthenticatedStream CreateSslStream(global::System.Net.Security.SslStream sslStream, Stream innerStream, bool leaveInnerStreamOpen, MonoTlsSettings settings)
111 {
112 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
113 }
114
115 // Token: 0x060000AD RID: 173 RVA: 0x000035E0 File Offset: 0x000017E0
118 {
119 /*
120An exception occurred when decompiling this method (060000AD)
121
122ICSharpCode.Decompiler.DecompilerException: Error decompiling Mono.Unity.UnityTls/unitytls_x509verify_result Mono.Unity.UnityTlsProvider::x509verify_callback(System.Void*,Mono.Unity.UnityTls/unitytls_x509_ref,Mono.Unity.UnityTls/unitytls_x509verify_result,Mono.Unity.UnityTls/unitytls_errorstate*)
123
124 ---> System.Exception: Basic block has to end with unconditional control flow.
125{
126 Block_0:
127 stloc:unitytls_x509list_append_t(var_0_0A, ldfld:unitytls_x509list_append_t(unitytls_interface_struct::unitytls_x509list_append, callgetter:unitytls_interface_struct(UnityTls::get_NativeInterface)))
128 stloc:native int(var_1_11, ldfld:native int(Delegate::invoke_impl, ldloc:unitytls_x509list_append_t[exp:Delegate](var_0_0A)))
129 stloc:native int(var_2_18, ldfld:native int(Delegate::method_code, ldloc:unitytls_x509list_append_t[exp:Delegate](var_0_0A)))
130 stloc:native int(var_3_1F, ldfld:native int(Delegate::method, ldloc:unitytls_x509list_append_t[exp:Delegate](var_0_0A)))
131}
132
133 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
134 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
135 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
136 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
137 --- End of inner exception stack trace ---
138 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
139 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 1683
140*/;
141 }
142
143 // Token: 0x060000AE RID: 174 RVA: 0x0000360C File Offset: 0x0000180C
144 internal override bool ValidateCertificate(Mono.Net.Security.ChainValidationHelper validator, string targetHost, bool serverMode, global::System.Security.Cryptography.X509Certificates.X509CertificateCollection certificates, bool wantsChain, global::System.Security.Cryptography.X509Certificates.X509Chain chain, global::System.Net.Security.SslPolicyErrors errors, int status11)
145 {
146 UnityTls.unitytls_interface_struct.unitytls_errorstate_create_t unitytls_errorstate_create = UnityTls.NativeInterface.unitytls_errorstate_create;
147 IntPtr invoke_impl = unitytls_errorstate_create.invoke_impl;
148 IntPtr method_code = unitytls_errorstate_create.method_code;
149 IntPtr method = unitytls_errorstate_create.method;
150 global::System.Security.Cryptography.X509Certificates.X509ChainImpl x509ChainImpl;
151 if (x509ChainImpl != null)
152 {
153 }
154 if (certificates != null && certificates.Count != 0)
155 {
156 return string.IsNullOrEmpty(targetHost);
157 }
158 UnityTls.unitytls_interface_struct.unitytls_x509verify_explicit_ca_t unitytls_x509verify_explicit_ca = UnityTls.NativeInterface.unitytls_x509verify_explicit_ca;
159 Encoding encoding;
160 CodePageDataItem dataItem = encoding.dataItem;
161 IntPtr method_code2 = unitytls_x509verify_explicit_ca.method_code;
162 IntPtr invoke_impl2 = unitytls_x509verify_explicit_ca.invoke_impl;
163 IntPtr method2 = unitytls_x509verify_explicit_ca.method;
164 long num = 0L;
165 int num2 = 14;
166 UnityTls.unitytls_interface_struct.unitytls_x509list_free_t unitytls_x509list_free = UnityTls.NativeInterface.unitytls_x509list_free;
167 IntPtr method_code3 = unitytls_x509list_free.method_code;
168 IntPtr invoke_impl3 = unitytls_x509list_free.invoke_impl;
169 IntPtr method3 = unitytls_x509list_free.method;
170 if (num == 0L)
171 {
173 int num3;
174 if (num2 == 0)
175 {
176 if (encoding != null)
177 {
179 }
180 UnityTls.unitytls_interface_struct.unitytls_x509verify_default_ca_t unitytls_x509verify_default_ca = UnityTls.NativeInterface.unitytls_x509verify_default_ca;
182 method_code4 = unitytls_x509verify_default_ca.method_code;
183 IntPtr invoke_impl4 = unitytls_x509verify_default_ca.invoke_impl;
184 IntPtr method4 = unitytls_x509verify_default_ca.method;
185 num3 = 18;
186 }
187 long num4 = 0L;
192 if (num4 == 0L)
193 {
194 if (num3 == 0)
195 {
196 UnityTls.unitytls_interface_struct.unitytls_x509list_get_ref_t unitytls_x509list_get_ref = UnityTls.NativeInterface.unitytls_x509list_get_ref;
197 IntPtr invoke_impl6 = unitytls_x509list_get_ref.invoke_impl;
198 IntPtr method_code6 = unitytls_x509list_get_ref.method_code;
199 IntPtr method6 = unitytls_x509list_get_ref.method;
200 if (method_code4 == 0)
201 {
202 int num5 = 4;
204 }
205 if (method_code4 != 0)
206 {
207 }
208 }
209 }
210 throw new OutOfMemoryException();
211 }
212 throw new OutOfMemoryException();
213 }
214
215 // Token: 0x060000AF RID: 175 RVA: 0x000039A4 File Offset: 0x00001BA4
217 {
218 }
219 }
220}
class f__AnonymousType0<< Count > j__TPar
override global::System.Security.Authentication.SslProtocols SupportedProtocols
override Mono.Net.Security.MobileAuthenticatedStream CreateSslStream(global::System.Net.Security.SslStream sslStream, Stream innerStream, bool leaveInnerStreamOpen, MonoTlsSettings settings)
static unsafe UnityTls.unitytls_x509verify_result x509verify_callback(void *userData, UnityTls.unitytls_x509_ref cert, UnityTls.unitytls_x509verify_result result, UnityTls.unitytls_errorstate *errorState)
override bool ValidateCertificate(Mono.Net.Security.ChainValidationHelper validator, string targetHost, bool serverMode, global::System.Security.Cryptography.X509Certificates.X509CertificateCollection certificates, bool wantsChain, global::System.Security.Cryptography.X509Certificates.X509Chain chain, global::System.Net.Security.SslPolicyErrors errors, int status11)
static UnityTls.unitytls_interface_struct NativeInterface
Definition UnityTls.cs:47
CodePageDataItem dataItem
Definition Encoding.cs:1017