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
UnityTlsContext.cs
Go to the documentation of this file.
1using System;
9using Mono.Util;
10
11namespace Mono.Unity
12{
13 // Token: 0x02000044 RID: 68
14 internal class UnityTlsContext : Mono.Net.Security.MobileTlsContext
15 {
16 // Token: 0x06000089 RID: 137 RVA: 0x000027E8 File Offset: 0x000009E8
18 : base(parent, options)
19 {
22 UnityTls.unitytls_interface_struct.unitytls_errorstate_create_t unitytls_errorstate_create = UnityTls.NativeInterface.unitytls_errorstate_create;
23 IntPtr invoke_impl = unitytls_errorstate_create.invoke_impl;
24 IntPtr method_code = unitytls_errorstate_create.method_code;
25 IntPtr method = unitytls_errorstate_create.method;
26 }
27
28 // Token: 0x0600008A RID: 138 RVA: 0x00002B70 File Offset: 0x00000D70
30 {
31 if (cert == null)
32 {
33 return;
34 }
36 if (asymmetricAlgorithm == null)
37 {
38 return;
39 }
40 UnityTls.unitytls_interface_struct.unitytls_x509list_create_t unitytls_x509list_create = UnityTls.NativeInterface.unitytls_x509list_create;
41 IntPtr method_code = unitytls_x509list_create.method_code;
42 IntPtr invoke_impl = unitytls_x509list_create.invoke_impl;
43 IntPtr method = unitytls_x509list_create.method;
46 {
47 return;
48 }
49 UnityTls.unitytls_interface_struct.unitytls_key_parse_der_t unitytls_key_parse_der = UnityTls.NativeInterface.unitytls_key_parse_der;
50 IntPtr intPtr = (IntPtr)0;
51 IntPtr method_code2 = unitytls_key_parse_der.method_code;
52 IntPtr invoke_impl2 = unitytls_key_parse_der.invoke_impl;
53 IntPtr method2 = unitytls_key_parse_der.method;
54 }
55
56 // Token: 0x1700000A RID: 10
57 // (get) Token: 0x0600008B RID: 139 RVA: 0x00002C4C File Offset: 0x00000E4C
58 public override bool IsAuthenticated
59 {
60 get
61 {
62 return this.isAuthenticated;
63 }
64 }
65
66 // Token: 0x1700000B RID: 11
67 // (get) Token: 0x0600008C RID: 140 RVA: 0x00002C60 File Offset: 0x00000E60
69 {
70 get
71 {
72 return this.localClientCertificate;
73 }
74 }
75
76 // Token: 0x1700000C RID: 12
77 // (get) Token: 0x0600008D RID: 141 RVA: 0x00002C74 File Offset: 0x00000E74
78 public override global::System.Security.Cryptography.X509Certificates.X509Certificate2 RemoteCertificate
79 {
80 get
81 {
82 return this.remoteCertificate;
83 }
84 }
85
86 // Token: 0x0600008E RID: 142 RVA: 0x00002C88 File Offset: 0x00000E88
87 public override ValueTuple<int, bool> Read(byte[] buffer, int offset, int count)
88 {
89 /*
90An exception occurred when decompiling this method (0600008E)
91
92ICSharpCode.Decompiler.DecompilerException: Error decompiling System.ValueTuple`2<System.Int32,System.Boolean> Mono.Unity.UnityTlsContext::Read(System.Byte[],System.Int32,System.Int32)
93
94 ---> System.Exception: Basic block has to end with unconditional control flow.
95{
96 IL_0075:
97 brtrue(IL_0000, ldfld:bool(UnityTlsContext::closedGraceful, ldloc:UnityTlsContext(this)))
98}
99
100 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
101 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
102 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
103 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
104 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
105 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
106 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
107 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
108 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
109 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
110 --- End of inner exception stack trace ---
111 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
112 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
113*/;
114 }
115
116 // Token: 0x0600008F RID: 143 RVA: 0x00002D14 File Offset: 0x00000F14
117 public override ValueTuple<int, bool> Write(byte[] buffer, int offset, int count)
118 {
119 /*
120An exception occurred when decompiling this method (0600008F)
121
122ICSharpCode.Decompiler.DecompilerException: Error decompiling System.ValueTuple`2<System.Int32,System.Boolean> Mono.Unity.UnityTlsContext::Write(System.Byte[],System.Int32,System.Int32)
123
124 ---> System.Exception: Basic block has to end with unconditional control flow.
125{
126 Block_1:
127 brtrue(IL_0000, ldloc:native int[exp:bool](var_7_49))
128}
129
130 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
131 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
132 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
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 1846
134 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
135 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
136 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
137 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
138 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
139 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
140 --- End of inner exception stack trace ---
141 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
142 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
143*/;
144 }
145
146 // Token: 0x06000090 RID: 144 RVA: 0x00002050 File Offset: 0x00000250
147 public override void Renegotiate()
148 {
149 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
150 }
151
152 // Token: 0x06000091 RID: 145 RVA: 0x00002D98 File Offset: 0x00000F98
153 public override bool PendingRenegotiation()
154 {
155 }
156
157 // Token: 0x06000092 RID: 146 RVA: 0x00002DA8 File Offset: 0x00000FA8
158 public unsafe override void Shutdown()
159 {
160 MonoTlsSettings <Settings>k__BackingField = this.<Parent>k__BackingField.<Settings>k__BackingField;
161 if (<Settings>k__BackingField != null && <Settings>k__BackingField.<SendCloseNotify>k__BackingField)
162 {
163 UnityTls.unitytls_interface_struct.unitytls_errorstate_create_t unitytls_errorstate_create = UnityTls.NativeInterface.unitytls_errorstate_create;
164 IntPtr invoke_impl = unitytls_errorstate_create.invoke_impl;
165 IntPtr method_code = unitytls_errorstate_create.method_code;
166 IntPtr method = unitytls_errorstate_create.method;
167 UnityTls.unitytls_interface_struct.unitytls_tlsctx_notify_close_t unitytls_tlsctx_notify_close = UnityTls.NativeInterface.unitytls_tlsctx_notify_close;
169 IntPtr invoke_impl2 = unitytls_tlsctx_notify_close.invoke_impl;
170 IntPtr method_code2 = unitytls_tlsctx_notify_close.method_code;
171 IntPtr method2 = unitytls_tlsctx_notify_close.method;
172 }
173 UnityTls.unitytls_interface_struct.unitytls_x509list_free_t unitytls_x509list_free = UnityTls.NativeInterface.unitytls_x509list_free;
175 IntPtr invoke_impl3 = unitytls_x509list_free.invoke_impl;
176 IntPtr method_code3 = unitytls_x509list_free.method_code;
177 IntPtr method3 = unitytls_x509list_free.method;
180 IntPtr invoke_impl4 = unitytls_key_free.invoke_impl;
181 IntPtr method_code4 = unitytls_key_free.method_code;
182 IntPtr method4 = unitytls_key_free.method;
185 IntPtr invoke_impl5 = unitytls_tlsctx_free.invoke_impl;
186 IntPtr method_code5 = unitytls_tlsctx_free.method_code;
187 IntPtr method5 = unitytls_tlsctx_free.method;
188 }
189
190 // Token: 0x06000093 RID: 147 RVA: 0x00002EAC File Offset: 0x000010AC
191 protected override void Dispose(bool disposing)
192 {
193 }
194
195 // Token: 0x06000094 RID: 148 RVA: 0x00002EC8 File Offset: 0x000010C8
196 public unsafe override void StartHandshake()
197 {
198 MonoTlsSettings <Settings>k__BackingField = this.<Parent>k__BackingField.<Settings>k__BackingField;
199 if (<Settings>k__BackingField != null && <Settings>k__BackingField.<EnabledCiphers>k__BackingField != null)
200 {
203 UnityTls.unitytls_interface_struct.unitytls_errorstate_create_t unitytls_errorstate_create = UnityTls.NativeInterface.unitytls_errorstate_create;
204 IntPtr invoke_impl = unitytls_errorstate_create.invoke_impl;
205 IntPtr method_code = unitytls_errorstate_create.method_code;
206 IntPtr method = unitytls_errorstate_create.method;
207 UnityTls.unitytls_interface_struct.unitytls_tlsctx_set_supported_ciphersuites_t unitytls_tlsctx_set_supported_ciphersuites = UnityTls.NativeInterface.unitytls_tlsctx_set_supported_ciphersuites;
209 IntPtr method_code2 = unitytls_tlsctx_set_supported_ciphersuites.method_code;
210 IntPtr invoke_impl2 = unitytls_tlsctx_set_supported_ciphersuites.invoke_impl;
211 IntPtr method2 = unitytls_tlsctx_set_supported_ciphersuites.method;
212 }
213 }
214
215 // Token: 0x06000095 RID: 149 RVA: 0x00002F58 File Offset: 0x00001158
216 public unsafe override bool ProcessHandshake()
217 {
218 do
219 {
220 UnityTls.unitytls_interface_struct.unitytls_errorstate_create_t unitytls_errorstate_create = UnityTls.NativeInterface.unitytls_errorstate_create;
221 IntPtr invoke_impl = unitytls_errorstate_create.invoke_impl;
222 IntPtr method_code = unitytls_errorstate_create.method_code;
223 IntPtr method = unitytls_errorstate_create.method;
224 UnityTls.unitytls_interface_struct.unitytls_tlsctx_process_handshake_t unitytls_tlsctx_process_handshake = UnityTls.NativeInterface.unitytls_tlsctx_process_handshake;
226 IntPtr invoke_impl2 = unitytls_tlsctx_process_handshake.invoke_impl;
227 IntPtr method_code2 = unitytls_tlsctx_process_handshake.method_code;
228 IntPtr method2 = unitytls_tlsctx_process_handshake.method;
229 }
230 while (this.lastException != null);
231 if (this.<IsServer>k__BackingField)
232 {
233 }
234 return true;
235 }
236
237 // Token: 0x06000096 RID: 150 RVA: 0x00002FC8 File Offset: 0x000011C8
238 public unsafe override void FinishHandshake()
239 {
240 UnityTls.unitytls_interface_struct.unitytls_errorstate_create_t unitytls_errorstate_create = UnityTls.NativeInterface.unitytls_errorstate_create;
241 IntPtr invoke_impl = unitytls_errorstate_create.invoke_impl;
242 IntPtr method_code = unitytls_errorstate_create.method_code;
243 IntPtr method = unitytls_errorstate_create.method;
244 UnityTls.unitytls_interface_struct.unitytls_tlsctx_get_ciphersuite_t unitytls_tlsctx_get_ciphersuite = UnityTls.NativeInterface.unitytls_tlsctx_get_ciphersuite;
246 IntPtr invoke_impl2 = unitytls_tlsctx_get_ciphersuite.invoke_impl;
247 IntPtr method_code2 = unitytls_tlsctx_get_ciphersuite.method_code;
248 IntPtr method2 = unitytls_tlsctx_get_ciphersuite.method;
249 UnityTls.unitytls_interface_struct.unitytls_tlsctx_get_protocol_t unitytls_tlsctx_get_protocol = UnityTls.NativeInterface.unitytls_tlsctx_get_protocol;
251 IntPtr invoke_impl3 = unitytls_tlsctx_get_protocol.invoke_impl;
252 IntPtr method_code3 = unitytls_tlsctx_get_protocol.method_code;
253 IntPtr method3 = unitytls_tlsctx_get_protocol.method;
254 }
255
256 // Token: 0x06000097 RID: 151 RVA: 0x00003068 File Offset: 0x00001268
259 {
261 if (((GCHandle)intPtr).Target != null)
262 {
263 }
265 return intPtr2;
266 }
267
268 // Token: 0x06000098 RID: 152 RVA: 0x0000308C File Offset: 0x0000128C
270 {
271 if (this.writeBuffer != null)
272 {
273 int num = (int)bufferLen;
274 }
275 int num2 = (int)bufferLen;
276 byte[] array = this.writeBuffer;
277 int num3 = (int)bufferLen;
278 long num4 = 0L;
280 Marshal.Copy(intPtr, array, (int)num4, num3);
282 byte[] array2 = this.writeBuffer;
283 int num5 = (int)bufferLen;
284 long num6 = 0L;
285 bool flag = <Parent>k__BackingField.InternalWrite(array2, (int)num6, num5);
286 UnityTls.unitytls_interface_struct.unitytls_errorstate_raise_error_t unitytls_errorstate_raise_error = UnityTls.NativeInterface.unitytls_errorstate_raise_error;
287 IntPtr method_code = unitytls_errorstate_raise_error.method_code;
288 IntPtr invoke_impl = unitytls_errorstate_raise_error.invoke_impl;
289 IntPtr method = unitytls_errorstate_raise_error.method;
290 long num7 = 0L;
291 return (IntPtr)((int)num7);
292 }
293
294 // Token: 0x06000099 RID: 153 RVA: 0x00003188 File Offset: 0x00001388
297 {
299 if (((GCHandle)intPtr).Target != null)
300 {
301 }
303 return intPtr2;
304 }
305
306 // Token: 0x0600009A RID: 154 RVA: 0x000031AC File Offset: 0x000013AC
308 {
309 if (this.readBuffer != null)
310 {
311 int num = (int)bufferLen;
312 }
313 int num2 = (int)bufferLen;
314 byte[] array = this.readBuffer;
316 int num3 = (int)bufferLen;
317 int num4;
318 if (num4 != 0)
319 {
320 byte[] array2 = this.readBuffer;
321 int num5 = (int)bufferLen;
322 long num6 = 0L;
325 UnityTls.unitytls_interface_struct.unitytls_errorstate_raise_error_t unitytls_errorstate_raise_error = UnityTls.NativeInterface.unitytls_errorstate_raise_error;
326 IntPtr method_code = unitytls_errorstate_raise_error.method_code;
327 IntPtr invoke_impl = unitytls_errorstate_raise_error.invoke_impl;
328 IntPtr method = unitytls_errorstate_raise_error.method;
329 return method_code;
330 }
335 return method_code2;
336 }
337
338 // Token: 0x0600009B RID: 155 RVA: 0x00003300 File Offset: 0x00001500
341 {
343 if (((GCHandle)intPtr).Target != null)
344 {
345 }
346 UnityTls.unitytls_x509verify_result unitytls_x509verify_result;
347 return unitytls_x509verify_result;
348 }
349
350 // Token: 0x0600009C RID: 156 RVA: 0x00003324 File Offset: 0x00001524
352 {
353 long num = 0L;
354 global::System.Security.Cryptography.X509Certificates.X509ChainElementCollection x509ChainElementCollection;
355 global::System.Security.Cryptography.X509Certificates.X509Certificate2 certificate = x509ChainElementCollection[(int)num].certificate;
356 this.remoteCertificate = certificate;
357 long num2 = 0L;
358 int num3 = 3;
359 if (num2 != 0L || num3 != 0)
360 {
361 throw new OutOfMemoryException();
362 }
363 Exception ex;
364 if (!false)
365 {
366 ex = this.lastException;
367 if (ex == null)
368 {
369 }
370 }
371 long num4 = 0L;
372 if (ex != null)
373 {
374 }
375 if (num4 != 0L)
376 {
377 throw new OutOfMemoryException();
378 }
379 }
380
381 // Token: 0x0600009D RID: 157 RVA: 0x000033B4 File Offset: 0x000015B4
389
390 // Token: 0x0600009E RID: 158 RVA: 0x000033DC File Offset: 0x000015DC
392 {
393 if (this.remoteCertificate == null)
394 {
395 return;
396 }
397 X509Certificate x509Certificate;
398 this.localClientCertificate = x509Certificate;
399 if (x509Certificate != null)
400 {
401 UnityTls.unitytls_interface_struct.unitytls_x509list_free_t unitytls_x509list_free = UnityTls.NativeInterface.unitytls_x509list_free;
403 IntPtr method_code = unitytls_x509list_free.method_code;
404 IntPtr invoke_impl = unitytls_x509list_free.invoke_impl;
405 IntPtr method = unitytls_x509list_free.method;
408 IntPtr method_code2 = unitytls_key_free.method_code;
409 IntPtr invoke_impl2 = unitytls_key_free.invoke_impl;
410 IntPtr method2 = unitytls_key_free.method;
412 UnityTls.unitytls_interface_struct.unitytls_x509list_get_ref_t unitytls_x509list_get_ref = UnityTls.NativeInterface.unitytls_x509list_get_ref;
413 IntPtr method_code3 = unitytls_x509list_get_ref.method_code;
414 IntPtr invoke_impl3 = unitytls_x509list_get_ref.invoke_impl;
415 IntPtr method3 = unitytls_x509list_get_ref.method;
416 chain->handle = (ulong)method_code3;
418 IntPtr method_code4 = unitytls_key_get_ref.method_code;
419 IntPtr invoke_impl4 = unitytls_key_get_ref.invoke_impl;
420 IntPtr method4 = unitytls_key_get_ref.method;
421 return;
422 }
423 ulong unitytls_INVALID_HANDLE = UnityTls.NativeInterface.UNITYTLS_INVALID_HANDLE;
424 chain->handle = unitytls_INVALID_HANDLE;
425 ulong unitytls_INVALID_HANDLE2 = UnityTls.NativeInterface.UNITYTLS_INVALID_HANDLE;
427 }
428
429 // Token: 0x04000085 RID: 133
431
432 // Token: 0x04000086 RID: 134
434
435 // Token: 0x04000087 RID: 135
437
438 // Token: 0x04000088 RID: 136
440
441 // Token: 0x04000089 RID: 137
443
444 // Token: 0x0400008A RID: 138
446
447 // Token: 0x0400008B RID: 139
449
450 // Token: 0x0400008C RID: 140
452
453 // Token: 0x0400008D RID: 141
454 private global::System.Security.Cryptography.X509Certificates.X509Certificate2 remoteCertificate;
455
456 // Token: 0x0400008E RID: 142
458
459 // Token: 0x0400008F RID: 143
460 private bool isAuthenticated;
461
462 // Token: 0x04000090 RID: 144
463 private bool hasContext;
464
465 // Token: 0x04000091 RID: 145
466 private bool closedGraceful;
467
468 // Token: 0x04000092 RID: 146
469 private byte[] writeBuffer;
470
471 // Token: 0x04000093 RID: 147
472 private byte[] readBuffer;
473
474 // Token: 0x04000094 RID: 148
476
477 // Token: 0x04000095 RID: 149
479 }
480}
class f__AnonymousType0<< Count > j__TPar
MobileAuthenticatedStream Parent
readonly MonoSslAuthenticationOptions< Options > k__BackingField
global::System.Security.Cryptography.X509Certificates.X509Certificate2 remoteCertificate
override bool PendingRenegotiation()
UnityTlsContext(Mono.Net.Security.MobileAuthenticatedStream parent, Mono.Net.Security.MonoSslAuthenticationOptions options)
unsafe void CertificateCallback(UnityTls.unitytls_tlsctx *ctx, byte *cn, IntPtr cnLen, UnityTls.unitytls_x509name *caList, IntPtr caListLen, UnityTls.unitytls_x509list_ref *chain, UnityTls.unitytls_key_ref *key, UnityTls.unitytls_errorstate *errorState)
static unsafe void ExtractNativeKeyAndChainFromManagedCertificate(X509Certificate cert, UnityTls.unitytls_errorstate *errorState, [Out] UnityTls.unitytls_x509list *nativeCertChain, [Out] UnityTls.unitytls_key *nativeKey)
MonoTlsConnectionInfo connectioninfo
static unsafe UnityTls.unitytls_x509verify_result VerifyCallback(void *userData, UnityTls.unitytls_x509list_ref chain, UnityTls.unitytls_errorstate *errorState)
unsafe IntPtr WriteCallback(byte *data, IntPtr bufferLen, UnityTls.unitytls_errorstate *errorState)
override ValueTuple< int, bool > Write(byte[] buffer, int offset, int count)
override global::System.Security.Cryptography.X509Certificates.X509Certificate2 RemoteCertificate
override void Dispose(bool disposing)
static unsafe IntPtr ReadCallback(void *userData, byte *buffer, IntPtr bufferLen, UnityTls.unitytls_errorstate *errorState)
X509Certificate localClientCertificate
unsafe UnityTls.unitytls_tlsctx * tlsContext
unsafe override void StartHandshake()
unsafe override void Shutdown()
unsafe override bool ProcessHandshake()
unsafe UnityTls.unitytls_key * requestedClientKey
UnityTls.unitytls_tlsctx_write_callback writeCallback
UnityTls.unitytls_tlsctx_read_callback readCallback
unsafe UnityTls.unitytls_x509verify_result VerifyCallback(UnityTls.unitytls_x509list_ref chain, UnityTls.unitytls_errorstate *errorState)
static unsafe void CertificateCallback(void *userData, UnityTls.unitytls_tlsctx *ctx, byte *cn, IntPtr cnLen, UnityTls.unitytls_x509name *caList, IntPtr caListLen, UnityTls.unitytls_x509list_ref *chain, UnityTls.unitytls_key_ref *key, UnityTls.unitytls_errorstate *errorState)
unsafe IntPtr ReadCallback(byte *buffer, IntPtr bufferLen, UnityTls.unitytls_errorstate *errorState)
override ValueTuple< int, bool > Read(byte[] buffer, int offset, int count)
override X509Certificate LocalClientCertificate
unsafe override void FinishHandshake()
static unsafe IntPtr WriteCallback(void *userData, byte *data, IntPtr bufferLen, UnityTls.unitytls_errorstate *errorState)
unsafe UnityTls.unitytls_x509list * requestedClientCertChain
UnityTls.unitytls_tlsctx_x509verify_callback verifyCallback
UnityTls.unitytls_tlsctx_certificate_callback certificateCallback
static UnityTls.unitytls_interface_struct NativeInterface
Definition UnityTls.cs:47
static void Copy(byte[] source, int startIndex, IntPtr destination, int length)
Definition Marshal.cs:55
static GCHandle Alloc(object value)
Definition GCHandle.cs:97